Using the API you can obtain coub's metadata, edit its properties or delete the coub.
Getting coub data
Resource endpoint:
GET /api/v2/coubs/:id
- id (integer) — the identifier of the required coub.
Response:
Request example
GET /api/v2/coubs/4d5z
Editing coub data
Resource endpoint:
POST /api/v2/coubs/:id/update_info
- id (integer) — the identifier of the required coub.
Request parameters:
- coub[channel_id] (string) — the new id of the channel;
- coub[title] (string) — the new title of the coub;
- coub[tags] (string) — new tags assigned to the coub, separated by the comma;
- coub[original_visibility_type] (string) — the new status of the visibility type of the coub; accepts one of the following variables:
- public — the coub is visible for everyone;
- friends — the coub is visible only for its creator's friends;
- unlisted — the coub is accessible only via a direct link;
- private — the coub is visible only for its creator.
Request example:
POST /api/v2/coubs/4551721?coub[channel_id]=25534&coub[title]=The new title&coub[tags]=coubapi,updated,test&coub[original_visibility_type]=public
Response:
Deleting a coub
Resource endpoint:
DELETE /api/v2/coubs/:id
- id (integer or string) — the identifier of the required coub.
Request example:
DELETE /api/v2/coubs/4951721
Response:
- A JSON with the status of the deletion.
Response example:
{status: "ok"}