- Users can find API calls via the UI -> Question mark icon (in the right upper corner) -> RESTful API.
- Go to Manage > API Credentials > Use the '+' button to add a credentials
- Give a name to your credentials, then click Save & Generate
- This will generate the authentication token, copy the credential id and token
- Export your ID and token:
- export CRED_ID=”<your ID>”
- export CRED_TOKEN="<your token>”
- Now you can make calls to the API, for example:
curl -X GET https://na01.hub.streamsets.com/security/rest/v1/currentUser -H "Content-Type:application/json" -H "X-Requested-By:curl" -H "X-SS-REST-CALL:true" -H "X-SS-App-Component-Id: $CRED_ID" -H "X-SS-App-Auth-Token: $CRED_TOKEN" -i
curl -X GET https://na01.hub.streamsets.com/jobrunner/rest/v1/metrics/executors -H "Content-Type:application/json" -H "X-Requested-By:curl" -H "X-SS-REST-CALL:true" -H "X-SS-App-Component-Id: $CRED_ID" -H "X-SS-App-Auth-Token: $CRED_TOKEN" -i
(Users can find API calls via the UI -> Question mark icon (in the right upper corner) -> RESTful API)