Retrieve information on Klip annotations, create, update and delete annotations for specific Klips.
GET /klips/{id}/annotations
Description | Retrieve a list of annotations for a specified Klip. |
Permissions | dashboard.annotation.view |
Resource URL | https://app.klipfolio.com/api/1.0/klips/{id}/annotations |
Parameters | start_date (accepts Unix time format) end_date (accepts Unix time format) NOTE: Specify either none, one or both. For example, if start_date is not specified, it will retrieve all from the beginning of time; if end_date is not specified, it will retrieve all until the current date/time. |
Example Request
GET https://app.klipfolio.com/api/1/klips/57ebf715c0fdd044e4191adaecb4fc6f/annotations
##Example Response
{
"meta": {
"success": true,
"status": 200
},
"data": {
"annotations": [
{
"id": "12345eba2f065109fb88be86b2f9279e",
"createdBy": {
"id": "b1b1b11c7e4d34c6410d807564c470a7",
"name": "Jane Doe"
},
"date_created": "2016-06-21T13:18:30Z",
"body": "Order status for June"
},
{
"id": "f1ea0a852348d0f606eabac4b2443477",
"createdBy": {
"id": "a5a9d31c7e4d34c6410d807564c470a7",
"name": "Tamsin Douglas"
},
"date_created": "2016-06-21T13:32:05Z",
"body": "Check Florida."
}
]
}
}
GET /klips/{id}/annotations/{id}
Description | Retrieve the details of an annotation for a specified Klip. |
Resource URL | https://app.klipfolio.com/api/1.0/klips/{id}/annotations/{id} |
Permissions | dashboard.annotation.view |
Parameters | None. |
Example Request
GET https://app.klipfolio.com/api/1/klips/57ebf715c0fdd044e4191adaecb4fc6f/annotations/39874eba2f065109fb88be86b2f9279e
Example Response
{
"meta": {
"success": true,
"status": 200
},
"data": {
"id": "12345eba2f065109fb88be86b2f9279e",
"createdBy": {
"id": "b1b1b11c7e4d34c6410d807564c470a7",
"name": "Jane Doe"
},
"date_created": "2016-06-21T13:18:30Z",
"body": "Order status for June"
}
}
POST /klips/{id}/annotations
Description | Create a a new annotation for a specified Klip. |
Permissions | dashboard.annotation.edit |
Resource URL | https://app.klipfolio.com/api/1.0/klips/{id}/annotations |
Fields | body: "" // String, required. Maximum 1024 characters. NOTE: When creating an annotation, everything else uses a default: created_by is the authenticated user and date_created is the creation timestamp. |
Example Request
POST https://app.klipfolio.com/api/1/klips/63d9abc8330ae256dac2e2f8c4371a8f/annotations -d "{'body':'I am writing an annotation'}"
Example Response
{
"meta":
{
"success":true,
"status":201,
"location":"/klips/63d9abc1234ae256dac2e2f8c4371a8f/annotations/23c618c919b1234d5f1d3359942559eb"
},
"data":{}
}
[block:api-header]
{
"type": "put",
"title": "PUT /klips/{id}/annotations/{id}"
}
[/block]
[block:parameters]
{
"data": {
"0-0": "Description",
"0-1": "Update a specified Klip annotation.",
"1-0": "Permissions",
"2-0": "Resource URL",
"3-0": "Fields",
"1-1": "dashboard.annotation.edit",
"2-1": "https://app.klipfolio.com/api/1.0/klips/{id}/annotations/{id}",
"3-1": "body: \"\" // String, required. Maximum 1024 characters.\nNOTE 1: Editing an annotation does not update the date_created timestamp.\nNOTE 2: The authenticated user must either be the creator of the annotation or have the \"admin.annotation\" permission to edit the annotation."
},
"cols": 2,
"rows": 4
}
[/block]
##Example Request
PUT https://app.klipfolio.com/api/1/klips/63d9abc8330ae256dac2e2f8c4371a8f/annotations -d "{'body':'I am writing an annotation'}"
##Example Response
{
"data": {},
"meta": {
"status": 200,
"success": true
}
}
[block:api-header]
{
"type": "delete",
"title": "DELETE /klips/{id}/annotations/{id}"
}
[/block]
[block:parameters]
{
"data": {
"0-0": "Description",
"0-1": "Delete a specified annotation.",
"1-0": "Permissions",
"2-0": "Resource URL",
"3-0": "Fields",
"1-1": "dashboard.annotation.edit",
"2-1": "https://app.klipfolio.com/api/1.0/klips/{id}/annotations/{id}",
"3-1": "None."
},
"cols": 2,
"rows": 4
}
[/block]
##Example Request
`DELETE https://app.klipfolio.com/api/1/klips/57ebf715c0fdd044e4191adaecb4fc6f/annotations/f1ea0a852348d0f606eabac4b2443477`
##Example Response
{
"meta": {
"success": true,
"status": 200
},
"data": {}
}