This endpoint allows working with the Buto Collaborate system

Collection /Collaborate

Working with Collaborate entries.
NB Collaborate entries belong against a video_id and user_id

GET (collection) /collaborate/{video_id}

Get all the Collaboration entries against a video id

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/{video_id}
verb GET
params string:video_id

Example usage

#get all Collaborate entries against a video
#pipe the output through "python -m json.tool" to give a structured cli output
api_key=<your api key>
video_id="6v36s"
curl -X GET -u ${api_key}:x https://api.buto.tv/v2/collaborate/${video_id}

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "6": {
        "clips": [], 
        "date_created": "2015-09-04 12:14:52", 
        "email": "john.jones+Bbgwg@buto.tv", 
        "id": "6", 
        "organisation_id": "Bbgwg", 
        "user_id": "jMWnT", 
        "user_id_created": "yWhbF", 
        "video_id": "6v36s",
        "is_uploader_account": false,
    }, 
    "9": {
        "clips": [
            {
                "comments": "this clip is the best", 
                "date_created": "2015-09-04 12:53:55", 
                "id": "16", 
                "order": 0,
                "preview": "1", 
                "time_finish": "15", 
                "time_start": "12", 
                "type": "video"
            }
        ], 
        "date_created": "2015-09-04 12:51:33",  
        "email": "john.jones+Bbgwg@buto.tv", 
        "id": "9", 
        "organisation_id": "Bbgwg", 
        "user_id": "jMWnT", 
        "user_id_created": "yWhbF", 
        "video_id": "6v36s"
    }

}

GET (collection) /collaborate/{video_id}/user/{email}

Get a Collaboration by video id and email address

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/{video_id}/user/{email}
verb GET
params string:video_id string:email

Example usage

#get a Collaborate for a particular video id and email address
#pipe the output through "python -m json.tool" to give a structured cli output
api_key=<your api key>
video_id="6v36s"
email="john@example.com"
curl -X GET -u ${api_key}:x https://api.buto.tv/v2/collaborate/${video_id}/user/${email}

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "clips": [], 
    "date_created": "2015-09-04 12:14:52", 
    "email": "john@example.com", 
    "id": "6", 
    "organisation_id": "Bbgwg", 
    "user_id": "jMWnT", 
    "user_id_created": "yWhbF", 
    "video_id": "6v36s",
    "is_uploader_account": false    
}

POST (collection) /collaborate/{video_id}

Create a new Collaboration entry against a video id

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/{video_id}
verb POST
params string:video_id, array:data (user_id)

NB
- user_id is an optional parameter when this endpoint is accessed by a system user
- user_id is a required parameter when this endpoint is accessed by users

Example usage

#create a Collaborate entry against a video
api_key=<your api key>
video_id="6v36s"
data="user_id=jMWnT"    
curl -X POST -u ${api_key}:x --data ${data} https://api.buto.tv/v2/collaborate/${video_id}

returns

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

{
    "data": {
        "date_created": "2015-09-04 14:42:24", 
        "user_id": "jMWnT", 
        "user_id_created": "yWhbF", 
        "video_id": "6v36s"
    }, 
    "id": "10"
}


GET (item) /collaborate/item/{collaborate_id}

Get a specific Collaboration

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/item/{collaborate_id}
verb GET
params int:collaborate_id

Example usage

#get a specific Collaborate entry 
api_key=<your api key>
collaborate_id=9
curl -X GET -u ${api_key}:x https://api.buto.tv/v2/collaborate/item/${collaborate_id}

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "clips": [
        {
            "comments": "this clip is the best27079", 
            "date_created": "2015-09-04 12:53:55", 
            "id": "16", 
            "order": 0,
            "preview": "1", 
            "time_finish": "15", 
            "time_start": "12", 
            "type": "video"
        }
    ], 
    "date_created": "2015-09-04 12:51:33", 
    "email": "john.jones+Bbgwg@buto.tv", 
    "id": "9", 
    "organisation_id": "Bbgwg", 
    "user_id": "jMWnT", 
    "user_id_created": "yWhbF", 
    "video_id": "6v36s",
    "is_uploader_account": false,
}

DELETE (item) /collaborate/item/{collaborate_id}

Delete a specific Collaboration and any associated clips

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/item/{collaborate_id}/delete
verb DELETE
params int:collaborate_id

Example usage

#delete a specific Collaborate entry
api_key=<your api key>
collaborate_id=9
curl -X DELETE -u ${api_key}:x https://api.buto.tv/v2/collaborate/item/${collaborate_id}

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "deleted": "9", 
    "original_data": {
        "date_created": "2015-09-04 12:51:33", 
        "id": "9", 
        "user_id": "jMWnT", 
        "user_id_created": "yWhbF", 
        "video_id": "6v36s"
    }
}


PUT (item) /collaborate/item/{collaborate_id}/put

Update a specific Collaboration

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/item/{collaborate_id}/put
verb PUT
params int:collaborate_id,array:data ([string:user_id],[string:email])

Example usage

#update a specific Collaborate entry
api_key=<your api key>
collaborate_id=9
data="user_id=Ghfgf&email=lisa@example.com"
curl -X PUT -u ${api_key}:x --data ${data} https://api.buto.tv/v2/collaborate/item/${collaborate_id}/put

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "updated": "9", 
    "original_data": {
        "id": "9",
        "video_id": "12345",
        "user_id": "dftgh",
        "email": "john@example.com",
        "date_created": "2015-09-22 12:00:56",
        "user_id_created": "wersd",
        "date_modified": null,
        "user_id_modified": null
    },
    "new_data": {
        "id": "9",
        "video_id": "12345",
        "user_id": "Ghfgf",
        "email": "lisa@example.com",
        "date_created": "2015-09-22 12:00:56",
        "user_id_created": "wersd",
        "date_modified": "2015-12-22 10:31:15",
        "user_id_modified": "dftgh"
    }
}



Collection /Collaborate/clip

To work with clip entries.
NB Clip entries belong to a Collaborate entry.

POST collaborate/clip/{collaborate_id}/post

Create a new Clip entry against a Collaborate entry

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/clip/{collaborate_id}/post
verb POST
params int:collaborate_id, array:data ([string:comments],[int:time_start],[int:time_finish],[string:type],[bool:preview])

Example usage

#create a new clip entry against a Collaborate id 
api_key=<your api key>
collaborate_id="9"   
data="time_start=123&time_finish=155&comments=Nice%20video%20you%20have%20there"
curl -X POST -u ${api_key}:x --data ${data} https://api.buto.tv//v2/collaborate/clip/${collaborate_id}/post

returns

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

{
    "collaborate_id": "10", 
    "data": {
        "collaborate_id": "10", 
        "comments": "Nice video you have there", 
        "time_finish": "155", 
        "time_start": "123", 
        "type": "video"
    }, 
    "id": "17"
}

GET (item) /collaborate/clip/{clip_id}

Get a specific Clip entry

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/clip/{clip_id}
verb GET
params int:clip_id

Example usage

#get a specific clip entry 
api_key=<your api key>
clip_id=17
curl -X GET -u ${api_key}:x https://api.buto.tv/v2/collaborate/clip/${clip_id}

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "collaborate_id": "10", 
    "comments": "Nice video you have there", 
    "date_created": "2015-09-04 14:57:04", 
    "id": "17", 
    "preview": "1", 
    "time_finish": "155", 
    "time_start": "123", 
    "type": "video", 
    "user_id": "jMWnT", 
    "video_id": "6v36s"
}

PUT (item) /collaborate/clip/{clip_id}/put

Update a specific Clip entry

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/clip/{clip_id}/put
verb PUT
params int:clip_id, array:data ([string:title],[string:comments],[int:time_start],[int:time_finish],[string:type],[bool:preview])

Example usage

#update a specific clip entry 
api_key=<your api key>
clip_id=17
data="time_start=12&time_finish=15&comments=this%20clip%20is%20the%20best"
curl -X PUT -u ${api_key}:x --data ${data} https://api.buto.tv/v2/collaborate/clip/${clip_id}

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "new_data": {
        "collaborate_id": "10", 
        "comments": "this clip is the best", 
        "date_created": "2015-09-04 14:57:04", 
        "id": "17", 
        "preview": "1", 
        "time_finish": "15", 
        "time_start": "12", 
        "type": "video"
    }, 
    "original_data": {
        "collaborate_id": "10", 
        "comments": "Nice video you have there", 
        "date_created": "2015-09-04 14:57:04", 
        "id": "17", 
        "preview": "1", 
        "time_finish": "155", 
        "time_start": "123", 
        "type": "video"
    }, 
    "updated": "17"
}

DELETE (item) /collaborate/clip/{clip_id}/delete

Delete a specific Clip

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/clip/{clip_id}/delete
verb DELETE
params int:clip_id

Example usage

#delete a specific Collaborate entry
api_key=<your api key>
clip_id=17
curl -X DELETE -u ${api_key}:x https://api.buto.tv/v2/collaborate/clip/${clip_id}/delete

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "deleted": "17", 
    "original_data": {
        "collaborate_id": "10", 
        "comments": "this clip is the best", 
        "date_created": "2015-09-04 14:57:04", 
        "id": "17", 
        "preview": "1", 
        "time_finish": "15", 
        "time_start": "12", 
        "type": "video"
    }
}

PUT (item) /collaborate/clip/{collaborate_id}/order

Update a specific Clip entry

item value
Access user | system
Full url https://api.buto.tv/v2/collaborate/clip/{collaborate_id}/order
verb PUT
params int:collaborate_id, array:data ([int:clip_id])

Example usage

#update order of clips in specific collaborate 
api_key=<your api key>
collaborate_id=17
data="[3,1,2]"
curl -X PUT -u ${api_key}:x --data ${data} https://api.buto.tv/v2/collaborate/clip/${collaborate_id}/order

returns

HTTP/1.1 200 OK
...
Content-Type: application/json
{
    "new_data": [
        {
            "id": "3", 
            "comments": "this clip is the best", 
            "date_created": "2015-09-04 14:57:04", 
            "order": 0,
            "preview": "1", 
            "time_finish": "15", 
            "time_start": "12", 
            "type": "video"
        },
        {
            "id": "2",
            "comments": "this clip is the best", 
            "date_created": "2015-09-04 14:57:04", 
            "order": 1,
            "preview": "1", 
            "time_finish": "15", 
            "time_start": "12", 
            "type": "video"
        },
        {
            "id": "1",
            "comments": "this clip is the best", 
            "date_created": "2015-09-04 14:57:04", 
            "order": 2,
            "preview": "1", 
            "time_finish": "15", 
            "time_start": "12", 
            "type": "video"
        }
    ], 
    "original_data": [
        {
            "id": "1", 
            "comments": "this clip is the best", 
            "date_created": "2015-09-04 14:57:04", 
            "order": 0,
            "preview": "1", 
            "time_finish": "15", 
            "time_start": "12", 
            "type": "video"
        },
        {
            "id": "2",
            "comments": "this clip is the best", 
            "date_created": "2015-09-04 14:57:04", 
            "order": 1,
            "preview": "1", 
            "time_finish": "15", 
            "time_start": "12", 
            "type": "video"
        },
        {
            "id": "3",
            "comments": "this clip is the best", 
            "date_created": "2015-09-04 14:57:04", 
            "order": 2,
            "preview": "1", 
            "time_finish": "15", 
            "time_start": "12", 
            "type": "video"
        }
    ], 
    "updated": "17"
}