Users can use REST API to check for agents at job level for Unix and Windows jobs.
Workload Automation DE: 25.0 or above
Create Personal Access Token (PAT) to connect and list jobs using any REST client (curl, Postman etc.).
1. Create a PAT in Desktop Client CLI.
2. Use command PATCREATE:
PATCREATE NAME("jobs-test") SCOPE("write") EXPIRY(10)3. Give any name and expiry in days, maximum expiry 365 days, scope can be read / write.
4. Using any REST client, make the API call to list jobs.
Here is an example for curl. I exported the PAT as TOKEN, you can put the whole token if you want.
curl -k --tls-max 1.3 -G "https://webui-server.example.com8443/de/api/v1/jobs" \
-H "content-type: application/json" \
-H "authorization: Bearer $TOKEN" \
-H "TLSSSLEnabledServer: true"
Make sure the webui-server and port are correct. Use the hostname and port from the browser link, when you login to WebUI via browser. Use "TLSSSLEnabledServer: true" only if DE server uses SSL to talk to clients.
To list all the jobs within an appplication, run this:
curl -k --tls-max 1.3 -G "https://webui-server.example.com:25443/de/api/v1/jobs" \
--data-urlencode 'query=applicationName=="SOME_APPLICATION"' \
--data-urlencode 'size=200' \
--data-urlencode 'offset=0' \
-H "content-type: application/json" \
-H "authorization: Bearer $TOKEN" \
-H "TLSSSLEnabledServer: true" | jq '.records'
Note: The 'jq' is to beautify the JSON, it is not needed. If jq is not available then use other methods like python3 -m json.tool etc.
For Windows, use Powershell to access jobs / application list via API:
curl -k --tls-max 1.3 -X GET "https://webui-server.example.com:25443/de/api/v1/jobs" `
-H "content-type: application/json" `
-H "authorization: Bearer $env:TOKEN" `
-H "TLSSSLEnabledServer: true" | ConvertFrom-Json | ConvertTo-JsonNote: Export Token as:
$env:TOKEN="E50BF6A............"