Created
June 16, 2014 18:39
-
-
Save saulshanabrook/98425ea1b91f2f9a35c8 to your computer and use it in GitHub Desktop.
Open Data DC API Data Upload
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 POST http://www.opendatadc.org/api/3/action/resource_update id=4010146d-bf4f-4c42-a838-20a1ab86945e id=techforelissa Authorization:4010146d-**** | |
HTTP/1.1 404 Not Found | |
Access-Control-Allow-Headers: X-CKAN-API-KEY, Authorization, Content-Type | |
Access-Control-Allow-Methods: POST, PUT, GET, DELETE, OPTIONS | |
Access-Control-Allow-Origin: * | |
Cache-Control: no-cache | |
Content-Length: 441 | |
Content-Type: application/json;charset=utf-8 | |
Date: Mon, 16 Jun 2014 18:43:28 GMT | |
Pragma: no-cache | |
Server: Apache/2.2.22 (Ubuntu) | |
{ | |
"error": { | |
"__type": "Not Found Error", | |
"message": "Not found: Resource was not found." | |
}, | |
"help": "Update a resource.\n\n To update a resource you must be authorized to update the dataset that the\n resource belongs to.\n\n For further parameters see ``resource_create()``.\n\n :param id: the id of the resource to update\n :type id: string\n\n :returns: the updated resource\n :rtype: string\n\n ", | |
"success": false | |
} |
Do you know why this is giving me a 404?
Ooops I was passing the wrong ID.
$ http POST http://www.opendatadc.org/api/3/action/resource_update id=4010146d-bf4f-4c42-a838-20a1ab86945e upload='test' Authorization****
HTTP/1.1 403 Forbidden
Access-Control-Allow-Headers: X-CKAN-API-KEY, Authorization, Content-Type
Access-Control-Allow-Methods: POST, PUT, GET, DELETE, OPTIONS
Access-Control-Allow-Origin: *
Cache-Control: no-cache
Content-Length: 424
Content-Type: application/json;charset=utf-8
Date: Mon, 16 Jun 2014 18:54:50 GMT
Pragma: no-cache
Server: Apache/2.2.22 (Ubuntu)
{
"error": {
"__type": "Authorization Error",
"message": "Access denied"
},
"help": "Update a resource.\n\n To update a resource you must be authorized to update the dataset that the\n resource belongs to.\n\n For further parameters see ``resource_create()``.\n\n :param id: the id of the resource to update\n :type id: string\n\n :returns: the updated resource\n :rtype: string\n\n ",
"success": false
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to update http://www.opendatadc.org/dataset/campaign-finance/resource/4010146d-bf4f-4c42-a838-20a1ab86945e