harvest

Preview an harvesting from a source created with the given payload

Changed on
post/harvest/source/preview/

Request

  • Base URL
    https://dados.gov.pt/api/1
  • URL
    https://dados.gov.pt/api/1/harvest/source/preview/
  • Auth
    none declared

Headers

X-Fieldsstring mask

An optional fields mask

Request body

activeboolean required

Is this source active

autoarchiveboolean required

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

backend'ckan' | 'ckanpt' | 'csw-dcat' | 'csw-iso-19139' | 'cswudata' | 'dcat' | 'dgt' | 'dkan' | 'ine' | 'inehvd' | 'odspt' | 'ogc' required

The source backend

configobject

The configuration as key-value pairs, served only to readers who may edit the source

created_atstring date-time required

The source creation date

datasets_countinteger

Number of datasets harvested by this source

deletedstring date-time

The source deletion date

descriptionstring markdown

The source description

idstring

The source unique identifier

namestring required

The source display name

schedulestring

The source schedule (interval or cron expression)

urlstring required

The source base URL

Example request

{
  "backend": "ckan",
  "last_job": {
    "items": [
      {
        "dataservice": {
          "title": "My awesome API"
        },
        "status": "pending"
      }
    ],
    "status": "pending"
  },
  "validation": {
    "state": "pending"
  }
}

Response

Success

createdstring date-time required

The job creation date

endedstring date-time

The job end date

idstring required

The job execution ID

sourcestring required

The source owning the job

startedstring date-time

The job start date

status'pending' | 'initializing' | 'initialized' | 'processing' | 'done' | 'done-errors' | 'failed' required

The job status

Example response

{
  "items": [
    {
      "dataservice": {
        "title": "My awesome API"
      },
      "dataset": {
        "access_audiences": [
          {
            "condition": "yes",
            "role": "local_authority_and_administration"
          }
        ],
        "community_resources": [
          {
            "checksum": {
              "type": "sha1"
            },
            "filetype": "file",
            "type": "main"
          }
        ],
        "contact_points": [
          {
            "role": "contact"
          }
        ],
        "frequency": "continuous",
        "resources": [
          {
            "checksum": {
              "type": "sha1"
            },
            "filetype": "file",
            "type": "main"
          }
        ],
        "spatial": {
          "geom": {
            "type": "Point"
          }
        }
      },
      "status": "pending"
    }
  ],
  "status": "pending"
}

Changes