How To
Summary
How to use the RESTful API in StreamSets Platform
Steps
You want to interact with StreamSets Platform programmatically using its REST API.
Users can find API calls via the UI -> Question mark icon (in the upper right 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
Results
Following the steps provided we make our desired RESTful API request.
Additional Information
StreamSets Control Hub equivalent RESTful API request article: Control Hub RESTful API: How to make a request
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
16 March 2025
UID
ibm17186376