[ckan-dev] Deleting tags with the api

Aaron McGlinchy McGlinchyA at landcareresearch.co.nz
Tue Nov 3 23:37:13 UTC 2015


Hi,
    I am using the ckanapi to test out tidying up tags.  I'm using the python client, and httpie

I can get these commands to work fine

List all tags :
http http://test.ckan.zen.landcareresearch.co.nz/api/3/action/tag_list

Delete tag taxonomist:
http http://test.ckan.zen.landcareresearch.co.nz/api/3/action/tag_delete id=taxonomist Authorization:XXXXXXXXXXXXXXXXXXXXXX

but when the tag contains spaces I am struggling e.g. " vegetation survey" (inc leading space)  or "vegetation survey"
http http://test.ckan.zen.landcareresearch.co.nz/api/3/action/tag_delete id=vegetation survey Authorization: XXXXXXXXXXXXXXXXXXXXXX

I've tried various ways of specifying the words with spaces,  such as in quotes, inside braces, with underscore for space... but keep getting errors.

How do I deal with a tag value that includes spaces?

Thanks
Aaron

________________________________

Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz



More information about the ckan-dev mailing list