This endpoint allows you to get all your tags used in account

Collection /tag

GET all the tags in your account and the videos that use them

GET /tag

GET all the tags in your account and a count of videos that use them

item value
Access user
Full url https://api.buto.tv/v2/tag
verb GET

Collection /tag/video

To work with the tags on a video

GET /tag/video/:video_id

Get all the tags for a video

Notes


  • This endpoint is protected with an API key, SYSTEM and USER ONLY

  • string:video_id The video_id you want the tags for

item value
Access system, user
Full url https://api.buto.tv/v2/tag/video/${video_id}
verb GET
params string:video_id

Example


api_key=<your api key> video_id=12345 curl -X GET -u ${api_key}:x --include https://api.buto.tv/v2/tag/video/${video_id}

returns


HTTP/1.1 200 OK ... Content-Type: application/json ["animation","buto","cms","internet","motiongraphics","narrative","platform","promo","story","voiceover"]

POST /tag/video/add/:video_id/:tags

Add tag(s) from a video

Notes


  • This endpoint is protected with an API key, SYSTEM and USER ONLY

  • string:video_id The video_id you want to remove tags for

  • string:tags A json array of the tags you wish to add (NB you may need to urlencode this json string depending on your client)
item value
Access system, user
Full url https://api.buto.tv/v2/tag/video/add/${video_id}/${tags}
verb POST
params string:video_id, 'string:tags'

Example


api_key=<your api key> video_id=12345 #NB we have to url encode our json string to use curl on the command line, luckily curl can do this for us tags='["motiongraphics","cms","potato"]' curl -X POST -u ${api_key_system}:x --data-urlencode "tags=${tags}" ${api_url}/v2/tag/video/add/${video_id}

returns


HTTP/1.1 200 OK ... Content-Type: application/json {"added":["motiongraphics","cms"]}

NB the tag potato was asked to be added, but since it already exists against the video it wasn't added and hence not returned in the response


DELETE /tag/video/delete/:video_id/:tags

Delete tag(s) from a video

Notes


  • This endpoint is protected with an API key, SYSTEM and USER ONLY

  • string:video_id The video_id you want to remove tags for

  • string:tags A json array of the tags you wish to remove (NB you may need to urlencode this json string depending on your client)
item value
Access system, user
Full url https://api.buto.tv/v2/tag/video/delete/${video_id}/${tags}
verb DELETE
params string:video_id, 'string:tags'

Example


api_key=<your api key> video_id=12345 #NB we have to url encode our json string to use curl on the command line url_encoded=`php -r 'echo urlencode(json_encode(['motiongraphics','cms','tomato']));'` curl -X DELETE -u ${api_key}:x https://api.buto.tv/v2/tag/video/delete/${video_id}/${url_encoded}

returns


HTTP/1.1 200 OK ... Content-Type: application/json {"deleted":["motiongraphics","cms"]}

NB the tag tomato was asked to be removed, but since it didn't exist against the video it wasn't removed and hence not returned in the response