harvest

Harvest related operations

List all jobs for a given source

get
Paramètres de chemin
identanyRequis
Paramètres de requête
pageintegerOptionnel

The page to fetch

page_sizeintegerOptionnel

The page size to fetch

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

An optional fields mask

Réponses
200

Success

application/json
get
GET /api/1/harvest/job/{ident}/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

{
  "created": "2025-08-12T20:52:31.142Z",
  "ended": "2025-08-12T20:52:31.142Z",
  "errors": [
    {
      "level": "text",
      "message": "text"
    }
  ],
  "id": "text",
  "items": [
    {
      "args": [
        "text"
      ],
      "created": "2025-08-12T20:52:31.142Z",
      "dataservice": {
        "class": "text",
        "id": "text",
        "self_web_url": "text",
        "title": "My awesome API"
      },
      "dataset": {
        "class": "text",
        "id": "text",
        "acronym": "text",
        "page": "text",
        "title": "text",
        "uri": "text"
      },
      "ended": "2025-08-12T20:52:31.142Z",
      "errors": [
        {
          "level": "text",
          "message": "text"
        }
      ],
      "kwargs": {},
      "logs": [
        {
          "level": "text",
          "message": "text"
        }
      ],
      "remote_id": "text",
      "started": "2025-08-12T20:52:31.142Z",
      "status": "pending"
    }
  ],
  "source": "text",
  "started": "2025-08-12T20:52:31.142Z",
  "status": "pending"
}

List all harvest sources

get
Paramètres de requête
pageintegerOptionnel

The page to fetch

page_sizeintegerOptionnel

The page size to fetch

ownerstringOptionnel

The organization or user ID to filter on

deletedbooleanOptionnel

Include sources flaggued as deleted

qstringOptionnel

The search query

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

An optional fields mask

Réponses
200

Success

application/json
get
GET /api/1/harvest/sources/ HTTP/1.1
Host: www.data.gouv.fr
Accept: */*
200

Success

[
  {
    "data": [
      {
        "active": false,
        "autoarchive": true,
        "backend": "ckan",
        "config": {},
        "created_at": "2025-08-12T20:52:31.142Z",
        "deleted": "2025-08-12T20:52:31.142Z",
        "description": "text",
        "id": "text",
        "last_job": {
          "created": "2025-08-12T20:52:31.142Z",
          "ended": "2025-08-12T20:52:31.142Z",
          "errors": [
            {
              "level": "text",
              "message": "text"
            }
          ],
          "id": "text",
          "items": [
            {
              "args": [
                "text"
              ],
              "created": "2025-08-12T20:52:31.142Z",
              "dataservice": {
                "class": "text",
                "id": "text",
                "self_web_url": "text",
                "title": "My awesome API"
              },
              "dataset": {
                "class": "text",
                "id": "text",
                "acronym": "text",
                "page": "text",
                "title": "text",
                "uri": "text"
              },
              "ended": "2025-08-12T20:52:31.142Z",
              "errors": [
                {
                  "level": "text",
                  "message": "text"
                }
              ],
              "kwargs": {},
              "logs": [
                {
                  "level": "text",
                  "message": "text"
                }
              ],
              "remote_id": "text",
              "started": "2025-08-12T20:52:31.142Z",
              "status": "pending"
            }
          ],
          "source": "text",
          "started": "2025-08-12T20:52:31.142Z",
          "status": "pending"
        },
        "name": "text",
        "organization": {
          "class": "text",
          "id": "text",
          "acronym": "text",
          "badges": [
            {
              "kind": "text"
            }
          ],
          "logo": "text",
          "logo_thumbnail": "text",
          "name": "text",
          "page": "text",
          "slug": "text",
          "uri": "text"
        },
        "owner": {
          "class": "text",
          "id": "text",
          "avatar": "text",
          "avatar_thumbnail": "text",
          "first_name": "text",
          "last_name": "text",
          "page": "text",
          "slug": "text",
          "uri": "text"
        },
        "schedule": "text",
        "url": "text",
        "validation": {
          "by": {
            "class": "text",
            "id": "text",
            "avatar": "text",
            "avatar_thumbnail": "text",
            "first_name": "text",
            "last_name": "text",
            "page": "text",
            "slug": "text",
            "uri": "text"
          },
          "comment": "text",
          "on": "2025-08-12T20:52:31.142Z",
          "state": "pending"
        }
      }
    ],
    "next_page": "text",
    "page": 1,
    "page_size": 1,
    "previous_page": "text",
    "total": 1
  }
]

Create a new harvest source

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

An optional fields mask

Corps
activebooleanRequis

Is this source active

Default: false
autoarchivebooleanRequis

If enabled, datasets not present on the remote source will be automatically archived

Default: true
backendstring · enumRequis

The source backend

Example: ckanValeurs possibles:
configobjectOptionnel

The configuration as key-value pairs

created_atstring · date-timeLecture seuleRequis

The source creation date

deletedstring · date-timeLecture seuleOptionnel

The source deletion date

descriptionstring · markdownOptionnel

The source description

idstringLecture seuleOptionnel

The source unique identifier

last_joball ofLecture seuleOptionnel

The last job for this source

namestringRequis

The source display name

organizationall ofOptionnel

The producer organization

ownerall ofOptionnel

The owner information

schedulestringLecture seuleOptionnel

The source schedule (interval or cron expression)

urlstringRequis

The source base URL

validationall ofLecture seuleOptionnel

Has the source been validated

Réponses
200

Success

application/json
post
POST /api/1/harvest/sources/ HTTP/1.1
Host: www.data.gouv.fr
Content-Type: application/json
Accept: */*
Content-Length: 318

{
  "active": false,
  "autoarchive": true,
  "backend": "ckan",
  "config": {},
  "description": "text",
  "name": "text",
  "organization": {
    "class": "text",
    "id": "text",
    "acronym": "text",
    "logo": "text",
    "logo_thumbnail": "text",
    "slug": "text"
  },
  "owner": {
    "class": "text",
    "id": "text",
    "avatar": "text",
    "avatar_thumbnail": "text",
    "slug": "text"
  },
  "url": "text"
}
200

Success

{
  "active": false,
  "autoarchive": true,
  "backend": "ckan",
  "config": {},
  "created_at": "2025-08-12T20:52:31.142Z",
  "deleted": "2025-08-12T20:52:31.142Z",
  "description": "text",
  "id": "text",
  "last_job": {
    "created": "2025-08-12T20:52:31.142Z",
    "ended": "2025-08-12T20:52:31.142Z",
    "errors": [
      {
        "level": "text",
        "message": "text"
      }
    ],
    "id": "text",
    "items": [
      {
        "args": [
          "text"
        ],
        "created": "2025-08-12T20:52:31.142Z",
        "dataservice": {
          "class": "text",
          "id": "text",
          "self_web_url": "text",
          "title": "My awesome API"
        },
        "dataset": {
          "class": "text",
          "id": "text",
          "acronym": "text",
          "page": "text",
          "title": "text",
          "uri": "text"
        },
        "ended": "2025-08-12T20:52:31.142Z",
        "errors": [
          {
            "level": "text",
            "message": "text"
          }
        ],
        "kwargs": {},
        "logs": [
          {
            "level": "text",
            "message": "text"
          }
        ],
        "remote_id": "text",
        "started": "2025-08-12T20:52:31.142Z",
        "status": "pending"
      }
    ],
    "source": "text",
    "started": "2025-08-12T20:52:31.142Z",
    "status": "pending"
  },
  "name": "text",
  "organization": {
    "class": "text",
    "id": "text",
    "acronym": "text",
    "badges": [
      {
        "kind": "text"
      }
    ],
    "logo": "text",
    "logo_thumbnail": "text",
    "name": "text",
    "page": "text",
    "slug": "text",
    "uri": "text"
  },
  "owner": {
    "class": "text",
    "id": "text",
    "avatar": "text",
    "avatar_thumbnail": "text",
    "first_name": "text",
    "last_name": "text",
    "page": "text",
    "slug": "text",
    "uri": "text"
  },
  "schedule": "text",
  "url": "text",
  "validation": {
    "by": {
      "class": "text",
      "id": "text",
      "avatar": "text",
      "avatar_thumbnail": "text",
      "first_name": "text",
      "last_name": "text",
      "page": "text",
      "slug": "text",
      "uri": "text"
    },
    "comment": "text",
    "on": "2025-08-12T20:52:31.142Z",
    "state": "pending"
  }
}

Mis à jour

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