# harvest

## GET /harvest/backends/

> List all available harvest backends

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/backends/":{"get":{"operationId":"harvest_backends","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestBackend"}}}}},"summary":"List all available harvest backends","tags":["harvest"]}}},"components":{"schemas":{"HarvestBackend":{"properties":{"extra_configs":{"description":"The backend extra configuration variables","items":{"$ref":"#/components/schemas/HarvestExtraConfig"},"type":"array"},"features":{"description":"The backend optional features","items":{"$ref":"#/components/schemas/HarvestFeature"},"type":"array"},"filters":{"description":"The backend supported filters","items":{"$ref":"#/components/schemas/HarvestFilter"},"type":"array"},"id":{"description":"The backend identifier","type":"string"},"label":{"description":"The backend display name","type":"string"}},"type":"object"},"HarvestExtraConfig":{"properties":{"default":{"description":"The config default value","type":"string"},"description":{"description":"Some details about the behavior","type":"string"},"key":{"description":"The config key","type":"string"},"label":{"description":"A localized human-readable and descriptive label","type":"string"}},"type":"object"},"HarvestFeature":{"properties":{"default":{"description":"The feature default state (true is enabled)","type":"boolean"},"description":{"description":"Some details about the behavior","type":"string"},"key":{"description":"The feature key","type":"string"},"label":{"description":"A localized human-readable and descriptive label","type":"string"}},"type":"object"},"HarvestFilter":{"properties":{"description":{"description":"The filter details","type":"string"},"key":{"description":"The filter key","type":"string"},"label":{"description":"A localized human-readable label","type":"string"},"type":{"description":"The filter expected type","type":"string"}},"type":"object"}}}}
```

## GET /harvest/sources/

> List all harvest sources

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/sources/":{"get":{"operationId":"list_harvest_sources","parameters":[{"schema":{"type":"integer","default":1},"description":"The page to fetch","in":"query","name":"page"},{"schema":{"type":"integer","default":20},"description":"The page size to fetch","in":"query","name":"page_size"},{"schema":{"type":"string"},"description":"The organization or user ID to filter on","in":"query","name":"owner"},{"schema":{"type":"boolean","default":false},"description":"Include sources flaggued as deleted","in":"query","name":"deleted"},{"schema":{"type":"string"},"description":"The search query","in":"query","name":"q"},{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HarvestSourcePage"},"type":"array"}}}}},"summary":"List all harvest sources","tags":["harvest"]}}},"components":{"schemas":{"HarvestSourcePage":{"properties":{"data":{"description":"The page data","items":{"$ref":"#/components/schemas/HarvestSource"},"type":"array"},"next_page":{"description":"The next page URL if exists","type":"string"},"page":{"description":"The current page","minimum":1,"type":"integer"},"page_size":{"description":"The page size used for pagination","minimum":0,"type":"integer"},"previous_page":{"description":"The previous page URL if exists","type":"string"},"total":{"description":"The total paginated items","minimum":0,"type":"integer"}},"required":["page","page_size","total"],"type":"object"},"HarvestSource":{"properties":{"active":{"default":false,"description":"Is this source active","type":"boolean"},"autoarchive":{"default":true,"description":"If enabled, datasets not present on the remote source will be automatically archived","type":"boolean"},"backend":{"description":"The source backend","enum":["ckan","csw-dcat","csw-iso-19139","dcat","dkan","maaf"],"type":"string"},"config":{"description":"The configuration as key-value pairs","type":"object"},"created_at":{"description":"The source creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The source deletion date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The source description","format":"markdown","type":"string"},"id":{"description":"The source unique identifier","readOnly":true,"type":"string"},"last_job":{"allOf":[{"$ref":"#/components/schemas/HarvestJob"}],"description":"The last job for this source","readOnly":true},"name":{"description":"The source display name","type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The owner information"},"permissions":{"allOf":[{"$ref":"#/components/schemas/HarvestSourcePermissions"}],"readOnly":true},"schedule":{"description":"The source schedule (interval or cron expression)","readOnly":true,"type":"string"},"url":{"description":"The source base URL","type":"string"},"validation":{"allOf":[{"$ref":"#/components/schemas/HarvestSourceValidation"}],"description":"Has the source been validated","readOnly":true}},"required":["active","autoarchive","backend","created_at","name","url"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"HarvestSourcePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"preview":{"type":"boolean"},"run":{"type":"boolean"},"schedule":{"type":"boolean"},"validate":{"type":"boolean"}},"type":"object"},"HarvestSourceValidation":{"properties":{"by":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Who performed the validation","readOnly":true},"comment":{"description":"A comment about the validation. Required on rejection","type":"string"},"on":{"description":"Date date on which validation was performed","format":"date-time","readOnly":true,"type":"string"},"state":{"description":"Is it validated or not","enum":["pending","accepted","refused"],"type":"string"}},"required":["state"],"type":"object"}}}}
```

## PUT /harvest/source/{source}/

> Update a harvest source

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/source/{source}/":{"put":{"operationId":"update_harvest_source","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}}}},"summary":"Update a harvest source","tags":["harvest"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}},"required":true}}}},"components":{"schemas":{"HarvestSource":{"properties":{"active":{"default":false,"description":"Is this source active","type":"boolean"},"autoarchive":{"default":true,"description":"If enabled, datasets not present on the remote source will be automatically archived","type":"boolean"},"backend":{"description":"The source backend","enum":["ckan","csw-dcat","csw-iso-19139","dcat","dkan","maaf"],"type":"string"},"config":{"description":"The configuration as key-value pairs","type":"object"},"created_at":{"description":"The source creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The source deletion date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The source description","format":"markdown","type":"string"},"id":{"description":"The source unique identifier","readOnly":true,"type":"string"},"last_job":{"allOf":[{"$ref":"#/components/schemas/HarvestJob"}],"description":"The last job for this source","readOnly":true},"name":{"description":"The source display name","type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The owner information"},"permissions":{"allOf":[{"$ref":"#/components/schemas/HarvestSourcePermissions"}],"readOnly":true},"schedule":{"description":"The source schedule (interval or cron expression)","readOnly":true,"type":"string"},"url":{"description":"The source base URL","type":"string"},"validation":{"allOf":[{"$ref":"#/components/schemas/HarvestSourceValidation"}],"description":"Has the source been validated","readOnly":true}},"required":["active","autoarchive","backend","created_at","name","url"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"HarvestSourcePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"preview":{"type":"boolean"},"run":{"type":"boolean"},"schedule":{"type":"boolean"},"validate":{"type":"boolean"}},"type":"object"},"HarvestSourceValidation":{"properties":{"by":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Who performed the validation","readOnly":true},"comment":{"description":"A comment about the validation. Required on rejection","type":"string"},"on":{"description":"Date date on which validation was performed","format":"date-time","readOnly":true,"type":"string"},"state":{"description":"Is it validated or not","enum":["pending","accepted","refused"],"type":"string"}},"required":["state"],"type":"object"}}}}
```

## GET /harvest/job/{ident}/

> Get a single job given an ID

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/job/{ident}/":{"get":{"operationId":"get_harvest_job","parameters":[{"schema":{"type":"integer","default":1},"description":"The page to fetch","in":"query","name":"page"},{"schema":{"type":"integer","default":20},"description":"The page size to fetch","in":"query","name":"page_size"},{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestJob"}}}}},"summary":"Get a single job given an ID","tags":["harvest"]}}},"components":{"schemas":{"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]}}}}
```

## GET /harvest/source/{source}/

> Get a single source given an ID or a slug

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/source/{source}/":{"get":{"operationId":"get_harvest_source","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}}}},"summary":"Get a single source given an ID or a slug","tags":["harvest"]}}},"components":{"schemas":{"HarvestSource":{"properties":{"active":{"default":false,"description":"Is this source active","type":"boolean"},"autoarchive":{"default":true,"description":"If enabled, datasets not present on the remote source will be automatically archived","type":"boolean"},"backend":{"description":"The source backend","enum":["ckan","csw-dcat","csw-iso-19139","dcat","dkan","maaf"],"type":"string"},"config":{"description":"The configuration as key-value pairs","type":"object"},"created_at":{"description":"The source creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The source deletion date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The source description","format":"markdown","type":"string"},"id":{"description":"The source unique identifier","readOnly":true,"type":"string"},"last_job":{"allOf":[{"$ref":"#/components/schemas/HarvestJob"}],"description":"The last job for this source","readOnly":true},"name":{"description":"The source display name","type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The owner information"},"permissions":{"allOf":[{"$ref":"#/components/schemas/HarvestSourcePermissions"}],"readOnly":true},"schedule":{"description":"The source schedule (interval or cron expression)","readOnly":true,"type":"string"},"url":{"description":"The source base URL","type":"string"},"validation":{"allOf":[{"$ref":"#/components/schemas/HarvestSourceValidation"}],"description":"Has the source been validated","readOnly":true}},"required":["active","autoarchive","backend","created_at","name","url"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"HarvestSourcePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"preview":{"type":"boolean"},"run":{"type":"boolean"},"schedule":{"type":"boolean"},"validate":{"type":"boolean"}},"type":"object"},"HarvestSourceValidation":{"properties":{"by":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Who performed the validation","readOnly":true},"comment":{"description":"A comment about the validation. Required on rejection","type":"string"},"on":{"description":"Date date on which validation was performed","format":"date-time","readOnly":true,"type":"string"},"state":{"description":"Is it validated or not","enum":["pending","accepted","refused"],"type":"string"}},"required":["state"],"type":"object"}}}}
```

## POST /harvest/source/{source}/run/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/source/{source}/run/":{"post":{"operationId":"run_harvest_source","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}}}},"tags":["harvest"]}}},"components":{"schemas":{"HarvestSource":{"properties":{"active":{"default":false,"description":"Is this source active","type":"boolean"},"autoarchive":{"default":true,"description":"If enabled, datasets not present on the remote source will be automatically archived","type":"boolean"},"backend":{"description":"The source backend","enum":["ckan","csw-dcat","csw-iso-19139","dcat","dkan","maaf"],"type":"string"},"config":{"description":"The configuration as key-value pairs","type":"object"},"created_at":{"description":"The source creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The source deletion date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The source description","format":"markdown","type":"string"},"id":{"description":"The source unique identifier","readOnly":true,"type":"string"},"last_job":{"allOf":[{"$ref":"#/components/schemas/HarvestJob"}],"description":"The last job for this source","readOnly":true},"name":{"description":"The source display name","type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The owner information"},"permissions":{"allOf":[{"$ref":"#/components/schemas/HarvestSourcePermissions"}],"readOnly":true},"schedule":{"description":"The source schedule (interval or cron expression)","readOnly":true,"type":"string"},"url":{"description":"The source base URL","type":"string"},"validation":{"allOf":[{"$ref":"#/components/schemas/HarvestSourceValidation"}],"description":"Has the source been validated","readOnly":true}},"required":["active","autoarchive","backend","created_at","name","url"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"HarvestSourcePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"preview":{"type":"boolean"},"run":{"type":"boolean"},"schedule":{"type":"boolean"},"validate":{"type":"boolean"}},"type":"object"},"HarvestSourceValidation":{"properties":{"by":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Who performed the validation","readOnly":true},"comment":{"description":"A comment about the validation. Required on rejection","type":"string"},"on":{"description":"Date date on which validation was performed","format":"date-time","readOnly":true,"type":"string"},"state":{"description":"Is it validated or not","enum":["pending","accepted","refused"],"type":"string"}},"required":["state"],"type":"object"}}}}
```

## POST /harvest/sources/

> Create a new harvest source

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/sources/":{"post":{"operationId":"create_harvest_source","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}}}},"summary":"Create a new harvest source","tags":["harvest"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}},"required":true}}}},"components":{"schemas":{"HarvestSource":{"properties":{"active":{"default":false,"description":"Is this source active","type":"boolean"},"autoarchive":{"default":true,"description":"If enabled, datasets not present on the remote source will be automatically archived","type":"boolean"},"backend":{"description":"The source backend","enum":["ckan","csw-dcat","csw-iso-19139","dcat","dkan","maaf"],"type":"string"},"config":{"description":"The configuration as key-value pairs","type":"object"},"created_at":{"description":"The source creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The source deletion date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The source description","format":"markdown","type":"string"},"id":{"description":"The source unique identifier","readOnly":true,"type":"string"},"last_job":{"allOf":[{"$ref":"#/components/schemas/HarvestJob"}],"description":"The last job for this source","readOnly":true},"name":{"description":"The source display name","type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The owner information"},"permissions":{"allOf":[{"$ref":"#/components/schemas/HarvestSourcePermissions"}],"readOnly":true},"schedule":{"description":"The source schedule (interval or cron expression)","readOnly":true,"type":"string"},"url":{"description":"The source base URL","type":"string"},"validation":{"allOf":[{"$ref":"#/components/schemas/HarvestSourceValidation"}],"description":"Has the source been validated","readOnly":true}},"required":["active","autoarchive","backend","created_at","name","url"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"HarvestSourcePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"preview":{"type":"boolean"},"run":{"type":"boolean"},"schedule":{"type":"boolean"},"validate":{"type":"boolean"}},"type":"object"},"HarvestSourceValidation":{"properties":{"by":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Who performed the validation","readOnly":true},"comment":{"description":"A comment about the validation. Required on rejection","type":"string"},"on":{"description":"Date date on which validation was performed","format":"date-time","readOnly":true,"type":"string"},"state":{"description":"Is it validated or not","enum":["pending","accepted","refused"],"type":"string"}},"required":["state"],"type":"object"}}}}
```

## GET /harvest/source/{source}/jobs/

> List all jobs for a given source

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/source/{source}/jobs/":{"get":{"operationId":"list_harvest_jobs","parameters":[{"schema":{"type":"integer","default":1},"description":"The page to fetch","in":"query","name":"page"},{"schema":{"type":"integer","default":20},"description":"The page size to fetch","in":"query","name":"page_size"},{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestJobPage"}}}}},"summary":"List all jobs for a given source","tags":["harvest"]}}},"components":{"schemas":{"HarvestJobPage":{"properties":{"data":{"description":"The page data","items":{"$ref":"#/components/schemas/HarvestJob"},"type":"array"},"next_page":{"description":"The next page URL if exists","type":"string"},"page":{"description":"The current page","minimum":1,"type":"integer"},"page_size":{"description":"The page size used for pagination","minimum":0,"type":"integer"},"previous_page":{"description":"The previous page URL if exists","type":"string"},"total":{"description":"The total paginated items","minimum":0,"type":"integer"}},"required":["page","page_size","total"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]}}}}
```

## POST /harvest/source/preview/

> Preview an harvesting from a source created with the given payload

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/source/preview/":{"post":{"operationId":"preview_harvest_source_config","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestJobPreview"}}}}},"summary":"Preview an harvesting from a source created with the given payload","tags":["harvest"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}},"required":true}}}},"components":{"schemas":{"HarvestJobPreview":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItemPreview"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItemPreview":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataservicePreview"}],"description":"The processed dataset"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetPreview"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataservicePreview":{"properties":{"self_api_url":{"description":"The dataservice API URL (fake)","type":"object"},"self_web_url":{"description":"The dataservice webpage URL (fake)","type":"object"},"title":{"type":"string"}},"required":["title"],"type":"object"},"DatasetPreview":{"properties":{"access_audiences":{"items":{"$ref":"#/components/schemas/AccessAudience (read)"},"type":"array"},"access_type":{"type":"string"},"access_type_reason":{"type":"string"},"access_type_reason_category":{"type":"string"},"acronym":{"description":"An optional dataset acronym","type":"string"},"archived":{"description":"The archival date if archived","format":"date-time","type":"string"},"authorization_request_url":{"type":"string"},"badges":{"description":"The dataset badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"community_resources":{"items":{"allOf":[{"$ref":"#/components/schemas/CommunityResource"}],"description":"The dataset community submitted resources"},"type":"array"},"contact_points":{"items":{"allOf":[{"$ref":"#/components/schemas/ContactPoint (read)"}],"description":"The dataset contact points"},"type":"array"},"created_at":{"description":"This date is computed between harvested creation date if any and site's internal creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The deletion date if deleted","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The dataset description in markdown","format":"markdown","type":"string"},"description_short":{"description":"The dataset short description","type":"string"},"extras":{"description":"Extras attributes as key-value pairs","type":"object"},"featured":{"description":"Is the dataset featured","type":"boolean"},"frequency":{"default":"unknown","description":"The update frequency","enum":["continuous","oneMinute","fiveMinutes","tenMinutes","fifteenMinutes","thirtyMinutes","hourly","bihourly","trihourly","twelveHours","severalTimesADay","threeTimesADay","semidaily","daily","fiveTimesAWeek","threeTimesAWeek","semiweekly","weekly","biweekly","threeTimesAMonth","semimonthly","monthly","bimonthly","quarterly","threeTimesAYear","semiannual","annual","biennial","triennial","quadrennial","quinquennial","decennial","bidecennial","tridecennial","punctual","irregular","never","notPlanned","other","unknown"],"type":"string"},"frequency_date":{"description":"Next expected update date, you will be notified once that date is reached.","format":"date-time","type":"string"},"harvest":{"allOf":[{"$ref":"#/components/schemas/HarvestDatasetMetadata"}],"description":"Dataset harvest metadata attributes","readOnly":true},"id":{"description":"The dataset identifier","readOnly":true,"type":"string"},"internal":{"allOf":[{"$ref":"#/components/schemas/DatasetInternals"}],"description":"Site internal and specific object's data","readOnly":true},"last_modified":{"description":"The dataset last modification date","format":"date-time","readOnly":true,"type":"string"},"last_update":{"description":"The resources last modification date","format":"date-time","type":"string"},"license":{"default":"notspecified","description":"The dataset license","type":"string"},"metrics":{"description":"The dataset metrics","type":"object"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The user information"},"page":{"description":"The dataset page URL (fake)","type":"object"},"permissions":{"$ref":"#/components/schemas/DatasetPermissions"},"private":{"description":"Is the dataset private to the owner or the organization","type":"boolean"},"quality":{"description":"The dataset quality","readOnly":true,"type":"object"},"resources":{"items":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"The dataset resources"},"type":"array"},"schema":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"description":"Reference to the associated schema"},"slug":{"description":"The dataset permalink string","readOnly":true,"type":"string"},"spatial":{"allOf":[{"$ref":"#/components/schemas/SpatialCoverage"}],"description":"The spatial coverage"},"tags":{"items":{"type":"string"},"type":"array"},"temporal_coverage":{"allOf":[{"$ref":"#/components/schemas/TemporalCoverage"}],"description":"The temporal coverage"},"title":{"description":"The dataset title","type":"string"},"uri":{"description":"The dataset API URL (fake)","type":"object"}},"required":["created_at","description","frequency","last_modified","last_update","title"],"type":"object"},"AccessAudience (read)":{"properties":{"condition":{"enum":["yes","no","under_condition"],"type":"string"},"role":{"enum":["local_authority_and_administration","company_and_association","private"],"type":"string"}},"type":"object"},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"CommunityResource":{"allOf":[{"$ref":"#/components/schemas/Resource"},{"properties":{"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"Reference to the associated dataset"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The user information"},"permissions":{"$ref":"#/components/schemas/DatasetPermissions"}},"type":"object"}]},"Resource":{"properties":{"checksum":{"allOf":[{"$ref":"#/components/schemas/Checksum"}],"description":"A checksum to validate file validity"},"created_at":{"description":"The resource creation date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The resource markdown description","format":"markdown","type":"string"},"extras":{"description":"Extra attributes as key-value pairs","type":"object"},"filesize":{"description":"The resource file size in bytes","type":"integer"},"filetype":{"description":"Whether the resource is an uploaded file, a remote file or an API","enum":["file","remote"],"type":"string"},"format":{"description":"The resource format","type":"string"},"harvest":{"allOf":[{"$ref":"#/components/schemas/HarvestResourceMetadata"}],"description":"Harvest attributes metadata information","readOnly":true},"id":{"description":"The resource unique ID","readOnly":true,"type":"string"},"internal":{"allOf":[{"$ref":"#/components/schemas/ResourceInternals"}],"description":"Site internal and specific object's data","readOnly":true},"last_modified":{"description":"The resource last modification date","format":"date-time","readOnly":true,"type":"string"},"latest":{"description":"The permanent URL redirecting to the latest version of the resource. When the resource data is updated, the URL will change, the latest URL won't.","readOnly":true,"type":"string"},"metrics":{"description":"The resource metrics","readOnly":true,"type":"object"},"mime":{"description":"The resource mime type","type":"string"},"preview_url":{"description":"An optional preview URL to be loaded as a standalone page (ie. iframe or new page)","readOnly":true,"type":"string"},"schema":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"description":"Reference to the associated schema"},"title":{"description":"The resource title","type":"string"},"type":{"description":"Resource type (documentation, API...)","enum":["main","documentation","update","api","code","other"],"type":"string"},"url":{"description":"The resource URL","type":"string"}},"required":["filetype","format","title","type","url"],"type":"object"},"Checksum":{"properties":{"type":{"default":"sha1","description":"The hashing algorithm used to compute the checksum","enum":["sha1","sha2","sha256","md5","crc"],"type":"string"},"value":{"description":"The resulting checksum/hash","type":"string"}},"required":["value"],"type":"object"},"HarvestResourceMetadata":{"properties":{"issued_at":{"description":"The resource harvested release date","format":"date-time","readOnly":true,"type":"string"},"modified_at":{"description":"The resource harvest last modification date","format":"date-time","readOnly":true,"type":"string"},"uri":{"description":"The resource harvest uri","type":"string"}},"type":"object"},"ResourceInternals":{"properties":{"created_at_internal":{"description":"The resource's internal creation date on the site","format":"date-time","type":"string"},"last_modified_internal":{"description":"The resource's internal last modification date","format":"date-time","type":"string"}},"required":["created_at_internal","last_modified_internal"],"type":"object"},"Schema":{"properties":{"name":{"type":"string"},"url":{"type":"string"},"version":{"type":"string"}},"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"DatasetPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"edit_resources":{"type":"boolean"}},"type":"object"},"ContactPoint (read)":{"properties":{"contact_form":{"type":"string"},"email":{"maxLength":255,"type":"string"},"id":{"readOnly":true,"type":"string"},"name":{"maxLength":255,"type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"Only present if owner is not set. Can only be set to an organization of the current authenticated user."},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Only present if organization is not set. Can only be set to the current authenticated user."},"role":{"enum":["contact","creator","publisher","rightsHolder","custodian","distributor","originator","principalInvestigator","processor","resourceProvider","user"],"type":"string"}},"required":["id","name","role"],"type":"object"},"HarvestDatasetMetadata":{"properties":{"archived":{"description":"The reason the dataset has been archived","type":"string"},"archived_at":{"description":"The archive date","format":"date-time","type":"string"},"backend":{"description":"Harvest backend used","type":"string"},"created_at":{"description":"The dataset harvested creation date","format":"date-time","readOnly":true,"type":"string"},"dct_identifier":{"description":"The dct:identifier property from the harvested dataset","type":"string"},"domain":{"description":"The harvested domain","type":"string"},"issued_at":{"description":"The dataset harvested release date","format":"date-time","readOnly":true,"type":"string"},"last_update":{"description":"The last harvest date","format":"date-time","type":"string"},"modified_at":{"description":"The dataset harvest last modification date","format":"date-time","readOnly":true,"type":"string"},"remote_id":{"description":"The dataset remote id on the source portal","type":"string"},"remote_url":{"description":"The dataset remote url","type":"string"},"source_id":{"description":"The harvester id","type":"string"},"uri":{"description":"The dataset harveted uri","type":"string"}},"type":"object"},"DatasetInternals":{"properties":{"created_at_internal":{"description":"The dataset's internal creation date on the site","format":"date-time","type":"string"},"last_modified_internal":{"description":"The dataset's internal last modification date","format":"date-time","type":"string"}},"required":["created_at_internal","last_modified_internal"],"type":"object"},"SpatialCoverage":{"properties":{"geom":{"allOf":[{"$ref":"#/components/schemas/GeoJSON"}],"description":"A multipolygon for the whole coverage"},"granularity":{"default":"other","description":"The spatial/territorial granularity (full Granularity object if `X-Get-Datasets-Full-Objects` is set, ID of the granularity otherwise)","type":"object"},"zones":{"description":"The covered zones identifiers (full GeoZone objects if `X-Get-Datasets-Full-Objects` is set, IDs of the zones otherwise)","type":"object"}},"type":"object"},"GeoJSON":{"properties":{"coordinates":{"description":"The geometry as coordinates lists","items":{"type":"object"},"type":"array"},"type":{"description":"The GeoJSON Type","enum":["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"],"type":"string"}},"required":["coordinates","type"],"type":"object"},"TemporalCoverage":{"properties":{"end":{"description":"The temporal coverage end date","format":"date-time","type":"string"},"start":{"description":"The temporal coverage start date","format":"date-time","type":"string"}},"required":["start"],"type":"object"},"HarvestSource":{"properties":{"active":{"default":false,"description":"Is this source active","type":"boolean"},"autoarchive":{"default":true,"description":"If enabled, datasets not present on the remote source will be automatically archived","type":"boolean"},"backend":{"description":"The source backend","enum":["ckan","csw-dcat","csw-iso-19139","dcat","dkan","maaf"],"type":"string"},"config":{"description":"The configuration as key-value pairs","type":"object"},"created_at":{"description":"The source creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The source deletion date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The source description","format":"markdown","type":"string"},"id":{"description":"The source unique identifier","readOnly":true,"type":"string"},"last_job":{"allOf":[{"$ref":"#/components/schemas/HarvestJob"}],"description":"The last job for this source","readOnly":true},"name":{"description":"The source display name","type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The owner information"},"permissions":{"allOf":[{"$ref":"#/components/schemas/HarvestSourcePermissions"}],"readOnly":true},"schedule":{"description":"The source schedule (interval or cron expression)","readOnly":true,"type":"string"},"url":{"description":"The source base URL","type":"string"},"validation":{"allOf":[{"$ref":"#/components/schemas/HarvestSourceValidation"}],"description":"Has the source been validated","readOnly":true}},"required":["active","autoarchive","backend","created_at","name","url"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"HarvestSourcePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"preview":{"type":"boolean"},"run":{"type":"boolean"},"schedule":{"type":"boolean"},"validate":{"type":"boolean"}},"type":"object"},"HarvestSourceValidation":{"properties":{"by":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Who performed the validation","readOnly":true},"comment":{"description":"A comment about the validation. Required on rejection","type":"string"},"on":{"description":"Date date on which validation was performed","format":"date-time","readOnly":true,"type":"string"},"state":{"description":"Is it validated or not","enum":["pending","accepted","refused"],"type":"string"}},"required":["state"],"type":"object"}}}}
```

## GET /harvest/source/{source}/preview/

> Preview a single harvest source given an ID or a slug

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/source/{source}/preview/":{"get":{"operationId":"preview_harvest_source","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestJobPreview"}}}}},"summary":"Preview a single harvest source given an ID or a slug","tags":["harvest"]}}},"components":{"schemas":{"HarvestJobPreview":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItemPreview"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItemPreview":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataservicePreview"}],"description":"The processed dataset"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetPreview"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataservicePreview":{"properties":{"self_api_url":{"description":"The dataservice API URL (fake)","type":"object"},"self_web_url":{"description":"The dataservice webpage URL (fake)","type":"object"},"title":{"type":"string"}},"required":["title"],"type":"object"},"DatasetPreview":{"properties":{"access_audiences":{"items":{"$ref":"#/components/schemas/AccessAudience (read)"},"type":"array"},"access_type":{"type":"string"},"access_type_reason":{"type":"string"},"access_type_reason_category":{"type":"string"},"acronym":{"description":"An optional dataset acronym","type":"string"},"archived":{"description":"The archival date if archived","format":"date-time","type":"string"},"authorization_request_url":{"type":"string"},"badges":{"description":"The dataset badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"community_resources":{"items":{"allOf":[{"$ref":"#/components/schemas/CommunityResource"}],"description":"The dataset community submitted resources"},"type":"array"},"contact_points":{"items":{"allOf":[{"$ref":"#/components/schemas/ContactPoint (read)"}],"description":"The dataset contact points"},"type":"array"},"created_at":{"description":"This date is computed between harvested creation date if any and site's internal creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The deletion date if deleted","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The dataset description in markdown","format":"markdown","type":"string"},"description_short":{"description":"The dataset short description","type":"string"},"extras":{"description":"Extras attributes as key-value pairs","type":"object"},"featured":{"description":"Is the dataset featured","type":"boolean"},"frequency":{"default":"unknown","description":"The update frequency","enum":["continuous","oneMinute","fiveMinutes","tenMinutes","fifteenMinutes","thirtyMinutes","hourly","bihourly","trihourly","twelveHours","severalTimesADay","threeTimesADay","semidaily","daily","fiveTimesAWeek","threeTimesAWeek","semiweekly","weekly","biweekly","threeTimesAMonth","semimonthly","monthly","bimonthly","quarterly","threeTimesAYear","semiannual","annual","biennial","triennial","quadrennial","quinquennial","decennial","bidecennial","tridecennial","punctual","irregular","never","notPlanned","other","unknown"],"type":"string"},"frequency_date":{"description":"Next expected update date, you will be notified once that date is reached.","format":"date-time","type":"string"},"harvest":{"allOf":[{"$ref":"#/components/schemas/HarvestDatasetMetadata"}],"description":"Dataset harvest metadata attributes","readOnly":true},"id":{"description":"The dataset identifier","readOnly":true,"type":"string"},"internal":{"allOf":[{"$ref":"#/components/schemas/DatasetInternals"}],"description":"Site internal and specific object's data","readOnly":true},"last_modified":{"description":"The dataset last modification date","format":"date-time","readOnly":true,"type":"string"},"last_update":{"description":"The resources last modification date","format":"date-time","type":"string"},"license":{"default":"notspecified","description":"The dataset license","type":"string"},"metrics":{"description":"The dataset metrics","type":"object"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The user information"},"page":{"description":"The dataset page URL (fake)","type":"object"},"permissions":{"$ref":"#/components/schemas/DatasetPermissions"},"private":{"description":"Is the dataset private to the owner or the organization","type":"boolean"},"quality":{"description":"The dataset quality","readOnly":true,"type":"object"},"resources":{"items":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"The dataset resources"},"type":"array"},"schema":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"description":"Reference to the associated schema"},"slug":{"description":"The dataset permalink string","readOnly":true,"type":"string"},"spatial":{"allOf":[{"$ref":"#/components/schemas/SpatialCoverage"}],"description":"The spatial coverage"},"tags":{"items":{"type":"string"},"type":"array"},"temporal_coverage":{"allOf":[{"$ref":"#/components/schemas/TemporalCoverage"}],"description":"The temporal coverage"},"title":{"description":"The dataset title","type":"string"},"uri":{"description":"The dataset API URL (fake)","type":"object"}},"required":["created_at","description","frequency","last_modified","last_update","title"],"type":"object"},"AccessAudience (read)":{"properties":{"condition":{"enum":["yes","no","under_condition"],"type":"string"},"role":{"enum":["local_authority_and_administration","company_and_association","private"],"type":"string"}},"type":"object"},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"CommunityResource":{"allOf":[{"$ref":"#/components/schemas/Resource"},{"properties":{"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"Reference to the associated dataset"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The user information"},"permissions":{"$ref":"#/components/schemas/DatasetPermissions"}},"type":"object"}]},"Resource":{"properties":{"checksum":{"allOf":[{"$ref":"#/components/schemas/Checksum"}],"description":"A checksum to validate file validity"},"created_at":{"description":"The resource creation date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The resource markdown description","format":"markdown","type":"string"},"extras":{"description":"Extra attributes as key-value pairs","type":"object"},"filesize":{"description":"The resource file size in bytes","type":"integer"},"filetype":{"description":"Whether the resource is an uploaded file, a remote file or an API","enum":["file","remote"],"type":"string"},"format":{"description":"The resource format","type":"string"},"harvest":{"allOf":[{"$ref":"#/components/schemas/HarvestResourceMetadata"}],"description":"Harvest attributes metadata information","readOnly":true},"id":{"description":"The resource unique ID","readOnly":true,"type":"string"},"internal":{"allOf":[{"$ref":"#/components/schemas/ResourceInternals"}],"description":"Site internal and specific object's data","readOnly":true},"last_modified":{"description":"The resource last modification date","format":"date-time","readOnly":true,"type":"string"},"latest":{"description":"The permanent URL redirecting to the latest version of the resource. When the resource data is updated, the URL will change, the latest URL won't.","readOnly":true,"type":"string"},"metrics":{"description":"The resource metrics","readOnly":true,"type":"object"},"mime":{"description":"The resource mime type","type":"string"},"preview_url":{"description":"An optional preview URL to be loaded as a standalone page (ie. iframe or new page)","readOnly":true,"type":"string"},"schema":{"allOf":[{"$ref":"#/components/schemas/Schema"}],"description":"Reference to the associated schema"},"title":{"description":"The resource title","type":"string"},"type":{"description":"Resource type (documentation, API...)","enum":["main","documentation","update","api","code","other"],"type":"string"},"url":{"description":"The resource URL","type":"string"}},"required":["filetype","format","title","type","url"],"type":"object"},"Checksum":{"properties":{"type":{"default":"sha1","description":"The hashing algorithm used to compute the checksum","enum":["sha1","sha2","sha256","md5","crc"],"type":"string"},"value":{"description":"The resulting checksum/hash","type":"string"}},"required":["value"],"type":"object"},"HarvestResourceMetadata":{"properties":{"issued_at":{"description":"The resource harvested release date","format":"date-time","readOnly":true,"type":"string"},"modified_at":{"description":"The resource harvest last modification date","format":"date-time","readOnly":true,"type":"string"},"uri":{"description":"The resource harvest uri","type":"string"}},"type":"object"},"ResourceInternals":{"properties":{"created_at_internal":{"description":"The resource's internal creation date on the site","format":"date-time","type":"string"},"last_modified_internal":{"description":"The resource's internal last modification date","format":"date-time","type":"string"}},"required":["created_at_internal","last_modified_internal"],"type":"object"},"Schema":{"properties":{"name":{"type":"string"},"url":{"type":"string"},"version":{"type":"string"}},"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"DatasetPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"edit_resources":{"type":"boolean"}},"type":"object"},"ContactPoint (read)":{"properties":{"contact_form":{"type":"string"},"email":{"maxLength":255,"type":"string"},"id":{"readOnly":true,"type":"string"},"name":{"maxLength":255,"type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"Only present if owner is not set. Can only be set to an organization of the current authenticated user."},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Only present if organization is not set. Can only be set to the current authenticated user."},"role":{"enum":["contact","creator","publisher","rightsHolder","custodian","distributor","originator","principalInvestigator","processor","resourceProvider","user"],"type":"string"}},"required":["id","name","role"],"type":"object"},"HarvestDatasetMetadata":{"properties":{"archived":{"description":"The reason the dataset has been archived","type":"string"},"archived_at":{"description":"The archive date","format":"date-time","type":"string"},"backend":{"description":"Harvest backend used","type":"string"},"created_at":{"description":"The dataset harvested creation date","format":"date-time","readOnly":true,"type":"string"},"dct_identifier":{"description":"The dct:identifier property from the harvested dataset","type":"string"},"domain":{"description":"The harvested domain","type":"string"},"issued_at":{"description":"The dataset harvested release date","format":"date-time","readOnly":true,"type":"string"},"last_update":{"description":"The last harvest date","format":"date-time","type":"string"},"modified_at":{"description":"The dataset harvest last modification date","format":"date-time","readOnly":true,"type":"string"},"remote_id":{"description":"The dataset remote id on the source portal","type":"string"},"remote_url":{"description":"The dataset remote url","type":"string"},"source_id":{"description":"The harvester id","type":"string"},"uri":{"description":"The dataset harveted uri","type":"string"}},"type":"object"},"DatasetInternals":{"properties":{"created_at_internal":{"description":"The dataset's internal creation date on the site","format":"date-time","type":"string"},"last_modified_internal":{"description":"The dataset's internal last modification date","format":"date-time","type":"string"}},"required":["created_at_internal","last_modified_internal"],"type":"object"},"SpatialCoverage":{"properties":{"geom":{"allOf":[{"$ref":"#/components/schemas/GeoJSON"}],"description":"A multipolygon for the whole coverage"},"granularity":{"default":"other","description":"The spatial/territorial granularity (full Granularity object if `X-Get-Datasets-Full-Objects` is set, ID of the granularity otherwise)","type":"object"},"zones":{"description":"The covered zones identifiers (full GeoZone objects if `X-Get-Datasets-Full-Objects` is set, IDs of the zones otherwise)","type":"object"}},"type":"object"},"GeoJSON":{"properties":{"coordinates":{"description":"The geometry as coordinates lists","items":{"type":"object"},"type":"array"},"type":{"description":"The GeoJSON Type","enum":["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"],"type":"string"}},"required":["coordinates","type"],"type":"object"},"TemporalCoverage":{"properties":{"end":{"description":"The temporal coverage end date","format":"date-time","type":"string"},"start":{"description":"The temporal coverage start date","format":"date-time","type":"string"}},"required":["start"],"type":"object"}}}}
```

## DELETE /harvest/source/{source}/

>

```json
{"openapi":"3.1.1","info":{"title":"uData API","version":"1.0"},"tags":[{"description":"Harvest related operations","name":"harvest"}],"servers":[{"url":"http://www.data.gouv.fr/api/1"}],"paths":{"/harvest/source/{source}/":{"delete":{"operationId":"delete_harvest_source","parameters":[{"schema":{"type":"string","format":"mask"},"description":"An optional fields mask","in":"header","name":"X-Fields"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarvestSource"}}}}},"tags":["harvest"]}}},"components":{"schemas":{"HarvestSource":{"properties":{"active":{"default":false,"description":"Is this source active","type":"boolean"},"autoarchive":{"default":true,"description":"If enabled, datasets not present on the remote source will be automatically archived","type":"boolean"},"backend":{"description":"The source backend","enum":["ckan","csw-dcat","csw-iso-19139","dcat","dkan","maaf"],"type":"string"},"config":{"description":"The configuration as key-value pairs","type":"object"},"created_at":{"description":"The source creation date","format":"date-time","readOnly":true,"type":"string"},"deleted":{"description":"The source deletion date","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"The source description","format":"markdown","type":"string"},"id":{"description":"The source unique identifier","readOnly":true,"type":"string"},"last_job":{"allOf":[{"$ref":"#/components/schemas/HarvestJob"}],"description":"The last job for this source","readOnly":true},"name":{"description":"The source display name","type":"string"},"organization":{"allOf":[{"$ref":"#/components/schemas/OrganizationReference"}],"description":"The producer organization"},"owner":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"The owner information"},"permissions":{"allOf":[{"$ref":"#/components/schemas/HarvestSourcePermissions"}],"readOnly":true},"schedule":{"description":"The source schedule (interval or cron expression)","readOnly":true,"type":"string"},"url":{"description":"The source base URL","type":"string"},"validation":{"allOf":[{"$ref":"#/components/schemas/HarvestSourceValidation"}],"description":"Has the source been validated","readOnly":true}},"required":["active","autoarchive","backend","created_at","name","url"],"type":"object"},"HarvestJob":{"properties":{"created":{"description":"The job creation date","format":"date-time","type":"string"},"ended":{"description":"The job end date","format":"date-time","type":"string"},"errors":{"description":"The job initialization errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"id":{"description":"The job execution ID","type":"string"},"items":{"description":"The job collected items","items":{"$ref":"#/components/schemas/HarvestItem"},"type":"array"},"source":{"description":"The source owning the job","type":"string"},"started":{"description":"The job start date","format":"date-time","type":"string"},"status":{"description":"The job status","enum":["pending","initializing","initialized","processing","done","done-errors","failed"],"type":"string"}},"required":["created","id","source","status"],"type":"object"},"HarvestError":{"properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"],"type":"object"},"HarvestItem":{"properties":{"args":{"default":[],"description":"The item positional arguments","items":{"type":"string"},"type":"array"},"created":{"description":"The item creation date","format":"date-time","type":"string"},"dataservice":{"allOf":[{"$ref":"#/components/schemas/DataserviceReference"}],"description":"The processed dataservice"},"dataset":{"allOf":[{"$ref":"#/components/schemas/DatasetReference"}],"description":"The processed dataset"},"ended":{"description":"The item end date","format":"date-time","type":"string"},"errors":{"description":"The item errors","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"kwargs":{"default":{},"description":"The item keyword arguments","type":"object"},"logs":{"description":"The item logs","items":{"$ref":"#/components/schemas/HarvestError"},"type":"array"},"remote_id":{"description":"The item remote ID to process","type":"string"},"remote_url":{"description":"The item remote url (if available)","type":"string"},"started":{"description":"The item start date","format":"date-time","type":"string"},"status":{"description":"The item status","enum":["pending","started","done","failed","skipped","archived"],"type":"string"}},"required":["created","remote_id","status"],"type":"object"},"DataserviceReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"self_api_url":{"description":"Link to the API endpoint for this dataservice","readOnly":true,"type":"string"},"self_web_url":{"description":"Link to the udata web page for this dataservice","readOnly":true,"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"}]},"BaseReference":{"discriminator":"class","properties":{"class":{"description":"The object class","type":"string"},"id":{"description":"The object unique identifier","type":"string"}},"required":["class","id"],"type":"object"},"DatasetReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{},"type":"object"}]},"OrganizationReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"acronym":{"description":"The organization acronym","type":"string"},"badges":{"description":"The organization badges","items":{"$ref":"#/components/schemas/Badge (read)"},"readOnly":true,"type":"array"},"logo":{"description":"The organization logo URL","type":"string"},"logo_thumbnail":{"description":"The organization logo thumbnail URL. This is the square (100x100) and cropped version.","type":"string"},"name":{"description":"The organization name","readOnly":true,"type":"string"},"page":{"description":"The organization web page URL","readOnly":true,"type":"string"},"permissions":{"allOf":[{"$ref":"#/components/schemas/OrganizationPermissions"}],"readOnly":true},"slug":{"description":"The organization string used as permalink","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this organization","readOnly":true,"type":"string"}},"type":"object"}]},"Badge (read)":{"properties":{"kind":{"type":"string"}},"required":["kind"],"type":"object"},"OrganizationPermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"harvest":{"type":"boolean"},"members":{"type":"boolean"},"private":{"type":"boolean"}},"type":"object"},"UserReference":{"allOf":[{"$ref":"#/components/schemas/BaseReference"},{"properties":{"avatar":{"description":"The user avatar URL","type":"string"},"avatar_thumbnail":{"description":"The user avatar thumbnail URL. This is the square (500x500) and cropped version.","type":"string"},"first_name":{"description":"The user first name","readOnly":true,"type":"string"},"last_name":{"description":"The user larst name","readOnly":true,"type":"string"},"page":{"description":"The user web page URL","readOnly":true,"type":"string"},"slug":{"description":"The user permalink string","readOnly":true,"type":"string"},"uri":{"description":"The API URI for this user","readOnly":true,"type":"string"}},"type":"object"}]},"HarvestSourcePermissions":{"properties":{"delete":{"type":"boolean"},"edit":{"type":"boolean"},"preview":{"type":"boolean"},"run":{"type":"boolean"},"schedule":{"type":"boolean"},"validate":{"type":"boolean"}},"type":"object"},"HarvestSourceValidation":{"properties":{"by":{"allOf":[{"$ref":"#/components/schemas/UserReference"}],"description":"Who performed the validation","readOnly":true},"comment":{"description":"A comment about the validation. Required on rejection","type":"string"},"on":{"description":"Date date on which validation was performed","format":"date-time","readOnly":true,"type":"string"},"state":{"description":"Is it validated or not","enum":["pending","accepted","refused"],"type":"string"}},"required":["state"],"type":"object"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.data.gouv.fr/api-de-data.gouv.fr/reference/harvest.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
