Created
June 18, 2014 16:19
-
-
Save saulshanabrook/955ec4bc23ad3c6d435e to your computer and use it in GitHub Desktop.
Delete Resource from OpenData DC
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
In [11]: headers | |
Out[11]: | |
{'Authorization': '7f99fd94-****', | |
'Content-Type': 'application/x-www-form-urlencoded'} | |
In [12]: url | |
Out[12]: 'http://www.opendatadc.org/api/3/action/resource_delete' | |
In [13]: requests.post(url, headers=headers, data=json.dumps({'id': 'b0f4af1f-fbd4-45a6-82cd-86fab9140038'})).text | |
Out[13]: u'{"help": "Delete a resource from a dataset.\\n\\n You must be a sysadmin or the owner of the resource to delete it.\\n\\n :param id: the id of the resource\\n :type id: string\\n\\n ", "success": false, "error": {"message": "Access denied", "__type": "Authorization Error"}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There doesn't seem to be a delete button the website for resources and the API is not letting me. Any ideas?