Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

This endpoint is available from version 2version 3.10.0^.

Warning
titleIMPORTANT

THIS ENDPOINT IS STILL IN DEVELOPMENT.


This endpoint allows to get all the different stats gathered by the API filtered by a single ID, by type (we can get stats from stages, pipelines and endpoints) or get all stats stored.

Get Stat by ID

This route has the ability to get a single stat by the ID (name of the stage, pipeline or endpoint). It receives the ID as part of the route and returns a JSON object with all the stat properties of the item searched.

Parameters

ParameterTypeDescription
stat_idstringID (name) of the stat to get

Table of Contents
maxLevel2

Example

Code Block
languagebash
GET /es/api/v1/stats/id/{stat_id}

Response

Successful Response [200]

Code Block
{
    "engine_id": "search-1710972953954.685",
    "id": "search",
    "worker_id": "584",
    "execution_id": "1710972953954.685",
    "server_id": "encrypted:q5LnUhxp7uk9C6O/TKuixg==:em165TSJ3GuMiXR5PBgL",
    "stats_type": "pipeline",
    "since": "2024-03-20T16:16:04.635765",
    "count": 0,
    "average": 0.0,
    "minimum": 0.0,
    "maximum": 0.0,
    "failure_count": 0,
    "init_count": 1,
    "init_average": 0.529282,
    "init_minimum": 0.529282,
    "init_maximum": 0.529282,
    "modified_date": "2024-03-20T16:16:04.635765",
    "stage_count": 5
}

Not Found Error [404]

Code Block
{
    "detail": "Stat ID: <stat_id> does not exist."
}

Get Stats by Type

This route has the ability to get a list of stats by type (stage, pipeline or endpoint). It receives the type as a string and returns a JSON object with all the stat properties of the type searched.

Also, you set the list size and the sort_by options to customize the response.

Parameters

ParameterTypeDescription
stat_typestringStatistic type to get data from. 

Query Parameters

ParameterTypeDescriptionRequired
sizeinteger

Size limit for results.

No

sort_bystring

Stat property value to sort results by.

No

sorting_asc
bool

To sort results from low to high. (Default is descending sort)

No

Examples

Code Block
languagebash
GET /es/api/v1/stats/{stat_type}
Code Block
languagebash
GET /es/api/v1/stats/{stat_type}?size=10

Response

Successful Response [200]

Code Block
collapsetrue
[
    {
        "engine_id": "search-highlight-1710972953954.685",
        "id": "search-highlight",
        "worker_id": "584",
        "execution_id": "1710972953954.685",
        "server_id": "encrypted:q5LnUhxp7uk9C6O/TKuixg==:em165TSJ3GuMiXR5PBgL",
        "stats_type": "stage",
        "since": "2024-03-20T16:16:04.636764",
        "count": 0,
        "average": 0.0,
        "minimum": 0.0,
        "maximum": 0.0,
        "failure_count": 0,
        "init_count": 1,
        "init_average": 0.0,
        "init_minimum": 0.0,
        "init_maximum": 0.0,
        "process_count": 0,
        "process_average": 0.0,
        "process_minimum": 0.0,
        "process_maximum": 0.0,
        "post_process_count": 0,
        "post_process_average": 0.0,
        "post_process_minimum": 0.0,
        "post_process_maximum": 0.0,
        "modified_date": "2024-03-20T16:16:04.636764",
        "stage_count": 0
    },
    ...,
    {
        "engine_id": "search-search-1710974449010.7778",
        "id": "search-search",
        "worker_id": "28172",
        "execution_id": "1710974449010.7778",
        "server_id": "encrypted:0wrUU8puI3BeuhDpOvwzJQ==:P8+beW8Q0UUpj5nmJTtq",
        "stats_type": "stage",
        "since": "2024-03-20T16:41:15.238136",
        "count": 0,
        "average": 0.0,
        "minimum": 0.0,
        "maximum": 0.0,
        "failure_count": 0,
        "init_count": 1,
        "init_average": 0.564749,
        "init_minimum": 0.564749,
        "init_maximum": 0.564749,
        "process_count": 0,
        "process_average": 0.0,
        "process_minimum": 0.0,
        "process_maximum": 0.0,
        "post_process_count": 0,
        "post_process_average": 0.0,
        "post_process_minimum": 0.0,
        "post_process_maximum": 0.0,
        "modified_date": "2024-03-20T16:41:15.238136",
        "stage_count": 0
    }
]

Get All Stats

This route has the ability to get a list of all stored stats (stages, pipelines and endpoints).

Also, you set the list size and the sort_by options to customize the response.

Parameters

Info

This endpoint does not have parameters.


Query Parameters

ParameterTypeDescriptionRequired
sizeinteger

Size limit for results.

No

sort_bystring

Stat property value to sort results by.

No

sorting_asc
bool

To sort results from low to high. (Default is descending sort)

No

Examples

Code Block
languagebash
GET /es/api/v1/stats/all
Code Block
languagebash
GET /es/api/v1/stats/all?size=10

Response

Successful Response [200]

Code Block
collapsetrue
[
    {
        "engine_id": "search-highlight-1710972953954.685",
        "id": "search-highlight",
        "worker_id": "584",
        "execution_id": "1710972953954.685",
        "server_id": "encrypted:q5LnUhxp7uk9C6O/TKuixg==:em165TSJ3GuMiXR5PBgL",
        "stats_type": "stage",
        "since": "2024-03-20T16:16:04.636764",
        "count": 0,
        "average": 0.0,
        "minimum": 0.0,
        "maximum": 0.0,
        "failure_count": 0,
        "init_count": 1,
        "init_average": 0.0,
        "init_minimum": 0.0,
        "init_maximum": 0.0,
        "process_count": 0,
        "process_average": 0.0,
        "process_minimum": 0.0,
        "process_maximum": 0.0,
        "post_process_count": 0,
        "post_process_average": 0.0,
        "post_process_minimum": 0.0,
        "post_process_maximum": 0.0,
        "modified_date": "2024-03-20T16:16:04.636764",
        "stage_count": 0
    },
    ...,
    {
        "engine_id": "search-search-1710974449010.7778",
        "id": "search-search",
        "worker_id": "28172",
        "execution_id": "1710974449010.7778",
        "server_id": "encrypted:0wrUU8puI3BeuhDpOvwzJQ==:P8+beW8Q0UUpj5nmJTtq",
        "stats_type": "stage",
        "since": "2024-03-20T16:41:15.238136",
        "count": 0,
        "average": 0.0,
        "minimum": 0.0,
        "maximum": 0.0,
        "failure_count": 0,
        "init_count": 1,
        "init_average": 0.564749,
        "init_minimum": 0.564749,
        "init_maximum": 0.564749,
        "process_count": 0,
        "process_average": 0.0,
        "process_minimum": 0.0,
        "process_maximum": 0.0,
        "post_process_count": 0,
        "post_process_average": 0.0,
        "post_process_minimum": 0.0,
        "post_process_maximum": 0.0,
        "modified_date": "2024-03-20T16:41:15.238136",
        "stage_count": 0
    }
]