List Jobs
List jobs with filters and pagination. Pass next_cursor as cursor.
GET
/
jobs
cURL
curl --request GET \
--url http://127.0.0.1:{port}/jobs \
--header 'Authorization: Bearer <token>'from harbor import Harbor
client = Harbor()
result = client.list_jobs(limit=10)
print(result)
client.close()
{
"jobs": [
{
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state": "queued",
"rollouts": {
"n_total": 1,
"n_queued": 0,
"n_running": 0,
"n_paused": 0,
"n_cancelling": 0,
"n_cancelled": 0,
"n_finished": 0
},
"n_retries": 0,
"n_errors": 0,
"agent_names": [
"<string>"
],
"model_names": [
"<string>"
],
"model_providers": [
"<string>"
],
"reasoning_efforts": [
"<string>"
],
"sources": [
"<string>"
],
"rewards": {},
"usage": {
"n_input_tokens": {
"sum": 123,
"count": 0
},
"n_cached_input_tokens": {
"sum": 123,
"count": 0
},
"n_output_tokens": {
"sum": 123,
"count": 0
},
"cost_usd": {
"sum": 123,
"count": 0
}
}
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Required only when the server has HARBOR_API_KEY configured.
Headers
Query Parameters
Required range:
1 <= x <= 1000Maximum string length:
4096Task names across versions, or name@sha256: pins. Repeated values use OR.
Maximum array length:
100Required string length:
1 - 4096Available options:
queued, running, paused, cancelling, finished, cancelled Maximum string length:
200Maximum string length:
200Maximum array length:
100Maximum array length:
100Maximum array length:
100Maximum array length:
100Maximum array length:
100Maximum array length:
100Sort field; prefix '-' for descending. Nulls sort last.
Available options:
id, name, state, created_at, updated_at, started_at, finished_at, -id, -name, -state, -created_at, -updated_at, -started_at, -finished_at Maximum string length:
100Was this page helpful?
⌘I
cURL
curl --request GET \
--url http://127.0.0.1:{port}/jobs \
--header 'Authorization: Bearer <token>'from harbor import Harbor
client = Harbor()
result = client.list_jobs(limit=10)
print(result)
client.close()
{
"jobs": [
{
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state": "queued",
"rollouts": {
"n_total": 1,
"n_queued": 0,
"n_running": 0,
"n_paused": 0,
"n_cancelling": 0,
"n_cancelled": 0,
"n_finished": 0
},
"n_retries": 0,
"n_errors": 0,
"agent_names": [
"<string>"
],
"model_names": [
"<string>"
],
"model_providers": [
"<string>"
],
"reasoning_efforts": [
"<string>"
],
"sources": [
"<string>"
],
"rewards": {},
"usage": {
"n_input_tokens": {
"sum": 123,
"count": 0
},
"n_cached_input_tokens": {
"sum": 123,
"count": 0
},
"n_output_tokens": {
"sum": 123,
"count": 0
},
"cost_usd": {
"sum": 123,
"count": 0
}
}
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}
