Ticket #343 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Packages referred by ID in API

Reported by: dread Owned by: johnbywater
Priority: awaiting triage Milestone:
Component: ckan Keywords:
Cc: Repository:
Theme:

Description (last modified by johnbywater) (diff)

When you do a Package Search or query a Package Relationship in the API version 2, the responses have relationships which refer to packages by name, not by ID.

Change History

comment:1 Changed 4 years ago by johnbywater

Regarding the package search, if I do:

$ paster db clean && paster db init && paster create-test-data

and then:

$ paster serve development.ini &

and then:

$ curl http://127.0.0.1:5000/api/1/search/package?name=warandpeace

I get:

{"count": 1, "results": warandpeace?}

and with:

$ curl http://127.0.0.1:5000/api/2/search/package?name=warandpeace

I get:

{"count": 1, "results": c90b6c00-9496-4c8c-b7fa-7bdd3ef65c72?}

Am I missing something?

comment:2 Changed 4 years ago by johnbywater

  • Description modified (diff)

comment:3 Changed 4 years ago by johnbywater

Okay, so in version 2, names were still being used in the relationships part of the packages entity. But I don't know why these entities can't be retrieved independently, and references to the entities returned in representations of the entities which reference them.

comment:4 Changed 4 years ago by johnbywater

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.