Add a template
curl --request POST \
--url https://api.getlurk.com/v1/templates/{id}/install \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{
"settings": {}
}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({settings: {}})
};
fetch('https://api.getlurk.com/v1/templates/{id}/install', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/templates/{id}/install"
payload = { "settings": {} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"template": "<string>",
"installed_at": "2023-11-07T05:31:56Z",
"units": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>"
}
],
"rules": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>"
}
],
"views": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>"
}
],
"dashboards": [
{
"id": "<string>",
"name": "<string>"
}
]
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}Templates
Add a template
Adds a template’s units, views and rules; the rules are drafts and a person takes each live. Existing units and views are reused. Refused if the template is already added, a unit exists with other settings, or a rule key belongs to another rule. To change settings, remove and re-add.
POST
/
v1
/
templates
/
{id}
/
install
Add a template
curl --request POST \
--url https://api.getlurk.com/v1/templates/{id}/install \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{
"settings": {}
}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({settings: {}})
};
fetch('https://api.getlurk.com/v1/templates/{id}/install', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/templates/{id}/install"
payload = { "settings": {} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"template": "<string>",
"installed_at": "2023-11-07T05:31:56Z",
"units": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>"
}
],
"rules": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>"
}
],
"views": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>"
}
],
"dashboards": [
{
"id": "<string>",
"name": "<string>"
}
]
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}Authorizations
Headers
Body
application/json
Response
Add a template