Skip to content

Use CKAN API version 3 #90

@danielgavrilov

Description

@danielgavrilov

If a CKAN API version 3 URL is passed to DataKitten::Dataset, it makes the request, extracts the id and makes a second request to the version 2 endpoint, which it uses to extract metadata. Not only is this inefficient, but version 2 is also missing some fields available in 3. So far, I've noticed that schema and codelists are missing in data.gov.uk version 2 (which are useful in answering questions for ODC).

Example data.gov.uk dataset that has both a codelist & schema:

The differences I'm aware of between the two versions are:

  1. Metadata in v3 is in the result field, whereas in v2 metadata is the response itself
  2. extras field contains an array of key-value hashes in v3 ([{ key: "id", value: 1 }]), whereas in v2 it is a hash ({id: 1})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions