-
-
Save aron/97447d0b28bf52f3e06b to your computer and use it in GitHub Desktop.
Example responses from CKAN API: http://test.ckan.net/api/2/rest/package/ec9cb930-d15f-441f-a1e1-36f4d5df19bf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Date: Thu, 07 Jul 2011 15:39:32 GMT | |
Server: Apache/2.2.14 (Ubuntu) | |
Access-Control-Allow-Origin: * | |
Access-Control-Allow-Methods: POST, PUT, GET, OPTIONS | |
Access-Control-Allow-Headers: X-CKAN-API-KEY, Content-Type | |
Pragma: no-cache | |
Cache-Control: no-cache | |
Content-Length: 754 | |
Content-Type: application/json;charset=utf-8 | |
{ "author" : "", | |
"author_email" : "", | |
"ckan_url" : "http://test.ckan.net/package/my-test-package", | |
"extras" : { "Custom" : { "key" : "value" } }, | |
"groups" : [ ], | |
"id" : "ec9cb930-d15f-441f-a1e1-36f4d5df19bf", | |
"license" : null, | |
"license_id" : "", | |
"maintainer" : "aron", | |
"maintainer_email" : "", | |
"metadata_created" : "2007-04-10T21:19:38", | |
"metadata_modified" : "2011-07-07T15:25:43.722256", | |
"name" : "my-test-package", | |
"notes" : "Heading\r\n===\r\nThis _is_ some text", | |
"notes_rendered" : "<h1>Heading</h1>\n<p>This <em>is</em> some text\n</p>", | |
"ratings_average" : null, | |
"ratings_count" : 0, | |
"relationships" : [ ], | |
"resources" : [ ], | |
"revision_id" : "688d33fb-5629-4ab3-9f59-a649fc7caa00", | |
"state" : "active", | |
"tags" : [ "test-tag" ], | |
"title" : "My Test Package", | |
"url" : "", | |
"version" : "" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "author" : "", | |
"author_email" : "", | |
"extras" : [ { "id" : "43d46aa3-be0a-4178-b1b9-99d9c5c58417", | |
"key" : "Custom", | |
"package_id" : "ec9cb930-d15f-441f-a1e1-36f4d5df19bf", | |
"revision_id" : "ba6c0a3f-4685-47f5-86c1-4e3092c93bf7", | |
"revision_timestamp" : "2011-07-06T13:12:08.664808", | |
"state" : "active", | |
"value" : "{\"key\": \"value\"}" | |
} ], | |
"groups" : [ ], | |
"id" : "ec9cb930-d15f-441f-a1e1-36f4d5df19bf", | |
"license_id" : "", | |
"maintainer" : "aron", | |
"maintainer_email" : "", | |
"name" : "my-test-package", | |
"notes" : "Heading\r\n===\r\nThis _is_ some text", | |
"relationships_as_object" : [ ], | |
"relationships_as_subject" : [ ], | |
"resources" : [ ], | |
"revision_id" : "688d33fb-5629-4ab3-9f59-a649fc7caa00", | |
"revision_timestamp" : "2011-07-06T10:37:50.182894", | |
"state" : "active", | |
"tags" : [ { "id" : "600dc72e-6127-4704-b801-bee00474ec0c", | |
"name" : "test-tag", | |
"revision_timestamp" : "2011-07-06T09:09:21.578034", | |
"state" : "active" | |
} ], | |
"title" : "My Test Package", | |
"url" : "", | |
"version" : "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GET Request:
PUT Request:
In the PUT response each tag in the
"tags"
array is represented as an object rather than a string. This is the same for the"extras"
key where extras is an array of objects rather than a single object.