REST API - retrieving the predecessors of a job stream from the database
Use REST APIs to retrieve the list of a job stream predecessors from the database.
About this task
This process involves retrieving a job stream definition through a GET REST API and then inspecting its various dependency arrays, such as externalPredecessors, in the response body.
Procedure
-
First, get the definition of the job stream for which you want to find
predecessors. Use the GET/twsd/api/v2/model/jobstream
endpoint.
-
For each predecessor identified in the dependency arrays, use its unique ID to retrieve its full definition.
- To get a predecessor job definition, use the GET/twsd/api/v2/model/jobdefinition/{job_abstract_id} endpoint, pasting the jobAbstractId into the ID parameter.
- To get a predecessor job stream definition, use the GET/twsd/api/v2/model/jobstream/{jobstream_abstract_id} endpoint, pasting the jobStreamAbstractId into the ID parameter.
- Click Execute for each request.
The response for each call contains the detailed definition for that specific predecessor object. Repeat this process for every dependency to get the complete list of predecessors.