NomonoPlatform docs

Getting started

Pagination

GET /v1/sessions and GET /v1/jobs return results a page at a time, newest first, with a cursor for the next page.

Pages

Both lists take the same two parameters for paging:

ParameterValue
limitThe number of objects on a page, from 1 to 200, with a default of 50.
cursorThe next_cursor of the previous page. Leave it out for the first page.

The response has the objects under sessions or jobs, and next_cursor, which is null on the last page:

GET /v1/sessions?limit=2
{  "sessions": [    {"session_id": "ses_01a14471a03b7c56a1e28d9f4b6c7d8e", "status": "ready", ...},    {"session_id": "ses_01a14470f61c7a3e8b2d4c6f1e0a9b87", "status": "ready", ...}  ],  "next_cursor": "ses_01a14470f61c7a3e8b2d4c6f1e0a9b87"}

Reading every page

Send each response's next_cursor as the cursor of the next request, until it is null:

curl -sS "https://platform-api.nomono.co/v1/sessions?limit=2" \  -H "Authorization: Bearer $NOMONO_API_KEY"curl -sS "https://platform-api.nomono.co/v1/sessions?limit=2&cursor=ses_01a14470f61c7a3e8b2d4c6f1e0a9b87" \  -H "Authorization: Bearer $NOMONO_API_KEY"

Objects created while you page don't shift the pages you're reading. Deleted sessions and their jobs are left out of the lists.

Filtering jobs

GET /v1/jobs can be filtered by session_id and by status, and you send the same filters with every page's cursor. An unknown session_id returns an empty list.

curl -sS "https://platform-api.nomono.co/v1/jobs?session_id=ses_01a14471a03b7c56a1e28d9f4b6c7d8e&status=done" \  -H "Authorization: Bearer $NOMONO_API_KEY"

Errors

An invalid limit or status gets a 400 validation_error:

400 Bad Request
{  "error": {    "code": "validation_error",    "message": "The request is not valid",    "details": {      "fields": [        {"field": "query.limit", "message": "Input should be less than or equal to 200"}      ]    }  }}