workers

Asynchronous workers related operations

List all scheduled jobs

get
Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Réponses
200
Success
application/json
get
GET /api/1/workers/jobs/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

[
  {
    "args": [
      {}
    ],
    "crontab": {
      "day_of_month": "*",
      "day_of_week": "*",
      "hour": "*",
      "minute": "*",
      "month_of_year": "*"
    },
    "description": "text",
    "enabled": false,
    "id": "text",
    "interval": {
      "every": 1,
      "period": "days"
    },
    "kwargs": {},
    "last_run_at": "2025-08-05T07:34:09.990Z",
    "last_run_id": "text",
    "name": "text",
    "schedule": "text",
    "task": "test-high-queue"
  }
]

Create a new scheduled job

post
Paramètres d'en-tête
X-Fieldsstring · maskOptionnel

An optional fields mask

Corps
argsobject[]Optionnel

The job execution arguments

Default: []
descriptionstringOptionnel

The job description

enabledbooleanOptionnel

Is this job enabled

Default: false
idstringLecture seuleOptionnel

The job unique identifier

kwargsobjectOptionnel

The job execution keyword arguments

Default: {}
last_run_atstring · date-timeLecture seuleOptionnel

The last job execution date

last_run_idstringLecture seuleOptionnel

The last execution task id

namestringRequis

The job unique name

schedulestringLecture seuleOptionnel

The schedule display

taskstring · enumRequis

The task name

Example: test-high-queueValeurs possibles:
Réponses
200
Success
application/json
post
POST /api/1/workers/jobs/ HTTP/1.1
Host: www.data.gouv.fr
Content-Type: application/json
Accept: */*
Content-Length: 233

{
  "args": [
    {}
  ],
  "crontab": {
    "day_of_month": "*",
    "day_of_week": "*",
    "hour": "*",
    "minute": "*",
    "month_of_year": "*"
  },
  "description": "text",
  "enabled": false,
  "interval": {
    "every": 1,
    "period": "days"
  },
  "kwargs": {},
  "name": "text",
  "task": "test-high-queue"
}
200

Success

{
  "args": [
    {}
  ],
  "crontab": {
    "day_of_month": "*",
    "day_of_week": "*",
    "hour": "*",
    "minute": "*",
    "month_of_year": "*"
  },
  "description": "text",
  "enabled": false,
  "id": "text",
  "interval": {
    "every": 1,
    "period": "days"
  },
  "kwargs": {},
  "last_run_at": "2025-08-05T07:34:09.990Z",
  "last_run_id": "text",
  "name": "text",
  "schedule": "text",
  "task": "test-high-queue"
}

Mis à jour

Ce contenu vous a-t-il été utile ?