Ticket #343 (closed defect: fixed)
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: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.
Note: See
TracTickets for help on using
tickets.
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?