Using Query Parameters in API Requests
  • 22 Jul 2024
  • Dark
    Light
  • PDF

Using Query Parameters in API Requests

  • Dark
    Light
  • PDF

Article summary

Query parameters in IAP are a defined set of parameters (params) attached to the end of a GET request. They are used to help define specific content or actions based on the data being passed. More specifically, query parameters allow you to sort and filter data from APIs, or to implement pagination of large datasets using one or more query parameters.

Note:

Be advised, not all query parameters are supported in all GET requests.

Potential Use Case

Customers can use a pagination value to return more than 25 results in an API call when their environment has more than 25 adapters. For example:

GET health/adapters?limit=100

Query Parameters

The following is a non-exhaustive list of query parameters supported by Itential in several GET calls. To append query params to the end of a GET call, a ‘?’ is added followed immediately by the query parameter.

Query Parameter Description Example
limit Specifies the maximum number of query results to return. GET /automation_studio/templates?limit=25
skip Used to bypass a set number of items in a set of results that span multiple pages. GET /automation_studio/templates?skip=5
sort Specifies the field name to sort query results by. GET /automation_studio/templates?sort=name
order Specifies the sort order for results; 1 for ascending and -1 for descending. GET /automation_studio/templates?order=1
equals
equalsField
Use equals to specify a value and perform an exact match on the equalsField. GET /automation_studio/templates?equals=:name&equalsField=name
greaterThanEquals
greaterThanEqualsField
Use greaterThanEquals to return a boolean (true or false) if the value is greater than or equal to the value specified in the greaterThanEqualsField. GET /workflow_engine/tasks/metrics?greaterThanEquals=:value&greaterThanEqualsField=metrics.startDate
contains
containsField
Use contains to check if the containsField has the specified string value. GET /workflow_engine/tasks/metrics?contains=:value&containsField=workflow.name
include Specifies the parameters to include in the query results; formatted as a comma-delineated list. GET /automation-studio/templates?include=name,description
exclude Specifies the parameters to ignore (leave out) in the query results; formatted as a comma-delineated list. GET /automation-studio/templates?exclude=name,description
in Used to check if a parameter exists in a given list of field options. GET /automation-studio/templates?in[name]=template1,template2
not-in Used to check if a parameter does not exist in a given list of field options. GET /automation-studio/templates?not-in[name]=template1,template2
starts-with Returns results where the specified field starts with the characters specified in a given string. GET /automation-studio/templates?starts-with[name]=template1,template2
ends-with Returns results where the specified field ends with the characters specified in a given string. GET /automation-studio/templates?ends-with[name]=template1,template2

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.