Pagination for Child Task Executions and Execution Lists

Pagination can be useful if a request to the AE REST API returns numerous results, because the result set, which can change fast and often, is divided into chunks (pages) per request/response. For example, if you send a request to get all the child task executions of a specific execution, thousands of records may be retrieved. In AE REST API, you can use pagination to make results easy to handle.

This page includes the following:

Limit Parameters

AE REST API allows you to set the following limit parameters:

  • max_results

    Defines the maximum number of results per page.

    Default value: 50

    If this parameter is omitted, the default value is used.

  • start_at_run_id

    Defines the RunID of the last entry of the previous page. If this parameter is omitted, the first page is returned.

URI Structure with Pagination Parameters

The URI including the pagination parameters consists of the following elements:

http://{host}:{port}/ae/api/v1/{client}/executions/{runid}/children?max_results={number}&start_at_run_id={runid}

Example

http://192.168.40.116:8088/ae/api/v1/100/executions/1003003/children?max_results=10&start_at_run_id=100301

In this example, the requested parent execution 1003003 has 25 child task executions requested. The paginated response is distributed as follows:

  • Page 1

    Request URI: ../executions/1003003/children?max_results=10

    Response Payload: List of the first 10 executions

    RunID of last execution listed =1003045

    "hasmore"=true(*)

    "total"=25(**)

    Comment: If the parameter start_at_run_id is omitted, the first page is returned.

  • Page 2

    Request URI: ../executions/1003003/children?max_results=10&start_at_run_id=1003045

    Response Payload: List of the next 10 executions

    RunID of first execution listed <1003045

    RunID of last execution listed =1003034

    "hasmore"=true(*)

    "total"=25(**)

    Comment: The RunID of the first execution on page 2 is lower than the RunID of the last execution on page 1, thus avoiding duplicate listings.

  • Page 3

    Request URI: ../executions/1003003/children?max_results=10&start_at_run_id=1003034

    Response Payload: List of the next 5 executions

    RunID of first execution listed <1003034

    RunID of last execution listed =1003028

    "hasmore"=false(*)

    "total"=25(**)

    Comment: "hasmore"=false indicates that this is the last page.

  • * total: indicates the total number of resources in the collection and helps determine how many pages the result would have.

  • **hasmore: has the following possible values:

    • true = more pages are available

    • false = you have reached the last page

Notes:

  • The executions that are displayed on a given page are ordered by activation time and RunID descending.

  • Pagination might provide an incomplete list of child task executions. For example, if a requested page P lists all executions with activation time >=T1 and RunID < R1 and a new execution E is generated at a later point with the same activation time but with RunID < R1, the execution E is not listed neither on page P nor in any following page.

See also: