Retrieving application query data from ESP RESTAPI
search cancel

Retrieving application query data from ESP RESTAPI

book

Article ID: 424002

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

When using a script to query applications for a jobs list on RESTAPI, some records/jobs are not written on the report.

Environment

Component: ESP Workload Automation RESTAPI

Release: All Releases 

Resolution

On Swagger The maximum number of records to be returned from the query is the default of 100. The minimum is 1, and the maximum is 200.

This request has to be set in the script versus an option in the STC itself. From research we can add multiple parameters to the request. Within the script we are setting the query parameter. This will allow to append multiple parameters using an ampersand sign (&). Update the script below to increase the output to 200.

From:
job_endpoint = f"/api/v3/applications?query={job_query}"
To:
job_endpoint = f"/api/v3/applications?query={job_query}&size=200"