This endpoint allows you to work with metadata against videos

NB Please be aware that metadata can be made publicly available

Collection /Metadata

To work with metadata for videos that have been uploaded to the platform.

GET /metadata/:video_id

Get metadata for a particular video by id

  • int:video_id The video_id of the metadata you're after

item value
Access guest user system
Full url https://api.buto.tv/v2/video/{id}
verb GET
params int:id

Example 1 where access type:guest

curl --include https://api.buto.tv/v2/video/12345

returns
```bash
HTTP/1.1 200 OK
...
Content-Type: application/json

{"uuid":"229ec19a-4b28-4853-8305-4832f6012e94",
"video_id":"12345"
,...,
metadata:{
    "author":"David",
    "reference":"CDfd3"
},
...}

Example 2 where access type:user/system

curl -u API_KEY:x --include https://api.buto.tv/v2/video/12345

returns
```bash
HTTP/1.1 200 OK
...
Content-Type: application/json

{"uuid":"229ec19a-4b28-4853-8305-4832f6012e94",
"video_id":"12345"
,...,
metadata:{
    "public":[
        {"name":"author","private":false,"value":"David","read_only":false}
    ],
    "private":[
        {"name":"internal_id","private":true,"value":"125","read_only":false}
    ]
},
...}

POST /metadata/:video_id

Create a brand new key-pair entry against the metadata for a particular video.

NB
- This endpoint is protected with an API key

  • video_id - string: the video_id you want to post against : REQUIRED
  • The following data should be POST'ed in:
    • name - string: key name: REQUIRED | lowercase a-z and underscore characters only
    • value - string: the key value REQUIRED
    • private - string: whether key-value is available from the /v2/video/:video_id endpoint without an API key | OPTIONAL | default false
    • read_only - string: whether key-value is editable | OPTIONAL | default false | system-only

item value
Access user system
Full url https://api.buto.tv/v2/metadata/{video_id}
verb POST
params string:video_id, The rest of the data should be POST'ed in

The read_only property can only be set to true by system. Only system can update key-value entries that have the property read_only set to true.

NB Please note, posted data must be in the form of a JSON array. This is to facilitate adding multiple key-pair values in a single request.

Example

curl -u API_KEY:x -X POST --data "data=[{\"name\":\"author\",\"value\":\"David\",\"private\":false}]" --include http://api.buto.tv/v2/metadata/12345

returns

HTTP/1.1 201 OK
...
Content-Type: application/json

{"status":"Created", "message":{"id":"12345","status":1,"created":"2015-06-03 14:47:08"}}

PUT /metadata/:video_id

Update an existing key-pair entry. Usually used to update the value or visibility of a particular key

NB
- This endpoint is protected with an API key

  • video_id - string: the video_id you want to post against : REQUIRED
  • The following data should be POST'ed in:
    • name - string: key name to be updated: REQUIRED | lowercase a-z and underscore characters only
    • value - string: the key value REQUIRED
    • private - string: whether key-value is available from the /v2/video/:video_id endpoint without an API key | OPTIONAL | default false
    • read_only - string: whether key-value is editable | OPTIONAL | default false | system-only

item value
Access user | system
Full url https://api.buto.tv/v2/metadata/{video_id}
verb PUT
params int:video_id, The rest of the data should be POST'ed in

The read_only property can only be set to true by system. Only system can update key-value entries that have the property read_only set to true.

NB Please note, posted data must be in the form of a JSON array. This is to facilitate adding multiple key-pair values in a single request.

Example

curl -u API_KEY:x -X PUT --data "data=[{\"name\":\"author\",\"value\":\"Paul\",\"private\":false}]" --include http://api.buto.tv/v2/metadata/12345

returns

HTTP/1.1 200 OK
...
Content-Type: application/json

{"status":"Updated", "message":{"id":"12345","status":1,"created":"2015-06-03 14:47:08"}}

DELETE /metadata/:video_id

Delete one or more key-pair entries from the metadata for a particular video.

NB
- This endpoint is protected with an API key

  • video_id - int: the video_id you want to update against : REQUIRED

item value
Access user system
Full url https://api.buto.tv/v2/metadata/{video_id}/keys/{key_names}
verb DELETE
params string:video_id string:key_names

Example

curl -X DELETE -u <your_api_key>:x --include https://api.buto.tv/v2/metadata/12345/keys/author,internal_id

returns

HTTP/1.1 200 OK
...
Content-Type: application/json

{"status":"Updated", "message":{"id":"12345","status":1,"deleted":"2015-06-03 14:47:08"}}