REST API - submitting a job stream in the current plan
Use REST APIs to submit a job stream in the plan.
About this task
This process involves retrieving a job stream's ID through a GET REST API and then submitting it into the current plan through a POST REST API.
Procedure
-
First, get the unique ID of the job stream you want to submit. Use the
GET/twsd/api/v2/model/jobstream endpoint to find your job
stream.
You can query for the job stream using either model filters or OQL. The following substeps show how to retrieve a job stream named JS-API.
-
Now, use the ID you retrieved to submit the job stream with the
POST/twsd/api/v2/plan/jobstream/{model_jobstream_id}/submit
endpoint.
- In the Swagger UI, expand the endpoint and paste the job stream ID into the ID parameter field.
- In the Request body field, delete the entire content. No request body is required for this action.
- Click Execute.
The API returns a success message with the ID of the job stream in the plan. Your job stream is now scheduled to run in the current plan. - To verify the submission, run the GET/twsd/api/v2/plan/jobstream API endpoint. Confirm that the response body contains the JSON object for the job stream you submitted.