-
Notifications
You must be signed in to change notification settings - Fork 115
Update metadata #22
Description
Just noticed there's a create method and a get_metadata method using the same endpoint, but no update method. Here's some relevant info from Socrata on the /api/views.json endpoint:
PUTto/api/views/unique_id.jsonwith a subset of what you want to update. For instance, if you want to add tags to the previously created dataset (currently this is the only way to add tags), you can simplyPUTto the endpoint with:{ "tags": ["these", "words", "are", "tags"] }You'll probably also want to make this dataset public and publish it, so you'll want to perform the two following operations as well:
PUT /views/unique_id?method=setPermission&value=public.read
POST /api/views/unique_id/publication.jsonOne important thing to note about updates is that if you want to update something within the "custom metadata", you will have to copy the entire metadata object since it does a replace.
Note that I've heard over the year(s) that the views endpoint is/will be deprecated, but until there's a clear alternative it probably makes sense to continue to use it.
Anyway, I may get a chance to work on this, but wanted to post the details here in case anyone else is interested.