Configure Collection to Execute Remote Quick Command
You will find three endpoints in this collection:
- 'POST 1 - Auth - Generate Token': Generate the authentication token and automatically set the second and third endpoints.
- 'POST 2—Create Remote Quick Command': Generate the Remote Quick Command execution using the
qc_command_name
and save the execution ID in a variable. - '3 - Callback Execution': Retrieve the execution ID and get the callback.
To test this collection, follow the next steps:
- You need to have Postman installed.
- Download this collection
Step 1. Open Postman and click on 'Collection';
Step 2. Then click on the 'Import' button and select the collection;
Step 3. Click the 'Environment quick look' button on the right side. Then, click 'edit' and add the following variables:
client_id
andclient_secret
. You will find it on the StackSpot EDP Access Token page
Step 4 Click the 'POST 1 - Auth - Generate Token'.
- On the 'Params' tab add the following:
- On the 'Path Variable', add your account_name.
- For example, the value at https://idm.stackspot.com/stackspot/oidc/oauth/token is stackspot.
- Key: account_name
- Value: stackspot
Step 5. Click 'Send'. The script will get the access token for your next request;
Step 6. Now, it's time to call the Remote Quick Command. Click on 'POST 2—Create Remote Quick Command'.
- On 'Path Variable', add the Remote Quick Command slug you want to execute;
For example:
- Key: qc_command_name
- Value: translate-english-to-spanish
Step 7. Click on the 'Body' tab, make your changes, and click 'Send':
{
"input_data": "CHANGE HERE, add your string or JSON object",
"custom_inputs": {}
}
Step 8. Click the '3 - Execution Callback' to retrieve the RQC. Now, click 'Send'. You will see the result on the tab.