diff --git a/.changelog/11648.txt b/.changelog/11648.txt new file mode 100644 index 000000000000..ce58748aa83c --- /dev/null +++ b/.changelog/11648.txt @@ -0,0 +1,3 @@ +```release-note:improvement +api: Add pagination and filtering to Evaluations List API +``` diff --git a/website/content/api-docs/evaluations.mdx b/website/content/api-docs/evaluations.mdx index 4f5ece72a684..f831b7815b19 100644 --- a/website/content/api-docs/evaluations.mdx +++ b/website/content/api-docs/evaluations.mdx @@ -31,6 +31,24 @@ The table below shows this endpoint's support for even number of hexadecimal characters (0-9a-f). This is specified as a query string parameter. +- `last_token` `(string: "")` - This endpoint supports paging. The + `last_token` parameter accepts a string which is the `ID` field of + the last evaluation seen in the previous response, to request the + next page of responses. + +- `per_page` `(int: 0)` - Specifies a maximum number of evaluations to + return for this request. If omitted, the response is not + paginated. The `ID` of the last evaluation in the response can be + used as the `last_token` of the next request to fetch additional + pages. + +- `job` `(string: "")` - Filter the list of evaluations to a specific + job ID. + +- `status` `(string: "")` - Filter the list of evaluations to a + specific evaluation status (one of "blocked", "pending", "complete", + "failed", or "canceled"). + ### Sample Request ```shell-session