You can get a list of all the timelines of a campaign by using the following endpoint.
{warning} Don't forget that all endpoints documented here need to be prefixed with
1.0/campaigns/{campaign.id}/
.
Method | URI | Headers |
---|---|---|
GET/HEAD | timelines |
Default |
The list of returned entities can be filtered. The available filters are available here
{
"data": [
{
"id": 1,
"name": "Thaelian Timeline",
"entry": "\n<p>Lorem Ipsum</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": false,
"entity_id": 112,
"tags": [],
"created_at": "2019-01-28T06:29:29.000000Z",
"created_by": 1,
"updated_at": "2020-01-30T17:30:52.000000Z",
"updated_by": 1,
"type": "Primary",
"eras": [
{
"name": "Anno Domani",
"abbreviation": "AD",
"start_year": 0,
"end_year": null,
"elements": [],
"position": 1
},
{
"name": "Before Christ",
"abbreviation": "BC",
"start_year": null,
"end_year": 0,
"elements": [],
"position": 2
}
]
}
],
"links": {
"first": "https://api.kanka.io/1.0/campaigns/1/timelines?page=1",
"last": "https://api.kanka.io/1.0/campaigns/1/timelines?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.kanka.io/1.0/campaigns/1/timelines",
"per_page": 100,
"to": 1,
"total": 1
}
}
To get the details of a single timeline, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | timelines/{timeline.id} |
Default |
{
"data": {
"id": 1,
"name": "Thaelian Timeline",
"entry": "\n<p>Lorem Ipsum</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": false,
"entity_id": 112,
"tags": [],
"created_at": "2019-01-28T06:29:29.000000Z",
"created_by": 1,
"updated_at": "2020-01-30T17:30:52.000000Z",
"updated_by": 1,
"type": "Primary",
"eras": [
{
"name": "Anno Domani",
"abbreviation": "AD",
"start_year": 0,
"end_year": null,
"elements": [],
"position": 1
},
{
"name": "Before Christ",
"abbreviation": "BC",
"start_year": null,
"end_year": 0,
"elements": [],
"position": 1
}
]
}
}
To create a timeline, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | timelines |
Default |
Parameter | Type | Detail |
---|---|---|
name |
string (Required) |
Name of the timeline |
entry |
string |
The html description of the timeline |
type |
string |
The timeline's type |
tags |
array |
Array of tag ids |
entity_image_uuid |
string |
Gallery image UUID for the entity image |
entity_header_uuid |
string |
Gallery image UUID for the entity header (limited to premium campaigns) |
is_private |
boolean |
If the timeline is only visible to admin members of the campaign |
{success} Code 200 with JSON body of the new timeline.
To update a timeline, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | timelines/{timeline.id} |
Default |
The same body parameters are available as for when creating a timeline.
{success} Code 200 with JSON body of the updated timeline.
To delete a timeline, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | timelines/{timeline.id} |
Default |
{success} Code 200 with JSON.
You can control the era of the timeline with the following docs: Timeline Era
You can control the elements of the timeline with the following docs: Timeline Element