How to Verify the odata.count for Running Jobs in UiPath Orchestrator Using Swagger
Purpose:
This article provides a step-by-step guide on how to verify the odata.count field in job responses using the Swagger interface in UiPath Orchestrator. The odata.count field helps to determine the total number of jobs in a specified state, such as "Running."
Steps to verify odata.count for Running Jobs:
1. Access the Swagger Interface
Open the Swagger interface for your UiPath Orchestrator by navigating to the following URL:
https:///swagger
Replace with your specific Orchestrator URL.
2. Locate the /odata/Jobs Endpoint
Scroll down to the GET /odata/Jobs endpoint. This endpoint is used to retrieve job details from UiPath Orchestrator.
3. Enter Query Parameters
In the filter field, you will need to specify the following:
- Filter: State eq 'Running' to filter for jobs in the "Running" state.
- $count: If a $count field is available, set it to true. If not, manually append $count=true to the request URL.
4. Modify the URL (if needed)
If there is no direct option for $count, you can manually modify the URL as follows:
/odata/Jobs?$filter=State eq 'Running'&$count=true
5. Execute the Request
Click on the Try it out button to execute the request. This will send a request to the Orchestrator to retrieve job details with the specified parameters.
6. Check the Response
In the response, look for the @odata.count field. This field displays the total number of running jobs. Job details will be listed under the value field.
Example
GET /odata/Jobs?$filter=State eq 'Running'&$count=true
Response:
{
"@odata.count": 5,
"value": [
{
"Id": 123,
"State": "Running",
// additional job details
},
// more jobs
]
}
Additional Notes
- Ensure that your Orchestrator URL is correctly set up to access Swagger.
- The odata.count field will only appear if $count=true is specified in the query.
Conclusion:
Following the steps outlined above will allow you to verify whether the odata.count field is included in the job responses. This can help in quickly identifying the total number of jobs in a specific state.