| Version 9 (modified by johnbywater, 6 years ago) (diff) |
|---|
The CKAN RESTful API
Design Questions
- What are the URIs?
- What's the format?
- What methods are supported at each URI?
- What status codes could be returned?
URLs
- http://ckan.net/api/rest/package/list/:page
- http://ckan.net/api/rest/package/create/:name
- http://ckan.net/api/rest/package/update/:name
- http://ckan.net/api/rest/package/read/:name
Data Formats
| Request | HTTP Parameters |
| Response | JSON |
Methods
| Action | Methods |
| list/ | GET |
| create/ | POST |
| update/ | POST |
| read/ | GET |
Status Codes
| Action-Method | Success | Exception |
| list/ GET | 200 | 400 Invalid Request, 404 Not Found |
| create/ POST | 200 | 400 Invalid Request, 409 Conflict |
| update/ POST | 200 | 400 Invalid Request |
| read/ GET | 200 | 404 Not Found |
POST Method Params
Create POST
| Name | Value |
| name | lower case alphanumeric string, optionally with dashes and underscores, string length at least 2 characters |
Update POST
| Name | Value |
| name | established name string (can't be updated) |
| title | string |
| url | string |
| download_url | string |
| licences | list of license ids |
| tags | space-separated list of tag strings |
| notes | multi-line string |
| log_message | string |
Current Development Issues
- How does a machine client acquire and select from the package license options?
- Can the above POST parameter data types be specified more formally?
