Get a view
curl --request GET \
--url https://api.getlurk.com/v1/views/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlurk.com/v1/views/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/views/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"key": "<string>",
"name": "<string>",
"shape": "number",
"visibility": "team",
"conversion": true,
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"definition": {
"who": "everyone",
"what": [
{
"measure": "active_users"
}
],
"over": "now",
"shape": {
"type": "number"
},
"source": "trusted"
},
"endpoint": "<string>",
"made_by": "template",
"template": "<string>",
"dashboards": [
{
"id": "<string>",
"name": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"answer": {
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"compared_with": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"series": [
{
"measure": {
"measure": "active_users"
},
"unit": "<string>",
"total": 123,
"previous_total": 123,
"points": [
{
"at": "2023-11-07T05:31:56Z",
"value": 123
}
],
"previous_points": [
{
"at": "2023-11-07T05:31:56Z",
"value": 123
}
]
}
],
"rows": [
{
"rank": 123,
"label": "<string>",
"user": {
"id": "<string>",
"external_id": "<string>"
},
"rule": {
"id": "<string>",
"key": "<string>",
"name": "<string>"
},
"property": {
"value": "<string>"
},
"value": 123,
"previous_rank": 123,
"values": [
123
]
}
],
"total_rows": 1,
"computed_at": "2023-11-07T05:31:56Z"
}
}{
"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>"
}
}Views
Get a view
A view and its answer: a number, a series over time, or a ranked list. range reads another range, compare adds the span of the same length just before, audience reads for another audience. Ranges and weeks (Monday to Sunday) follow the project’s time zone. Views
GET
/
v1
/
views
/
{id}
Get a view
curl --request GET \
--url https://api.getlurk.com/v1/views/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlurk.com/v1/views/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/views/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"key": "<string>",
"name": "<string>",
"shape": "number",
"visibility": "team",
"conversion": true,
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"definition": {
"who": "everyone",
"what": [
{
"measure": "active_users"
}
],
"over": "now",
"shape": {
"type": "number"
},
"source": "trusted"
},
"endpoint": "<string>",
"made_by": "template",
"template": "<string>",
"dashboards": [
{
"id": "<string>",
"name": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"answer": {
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"compared_with": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"series": [
{
"measure": {
"measure": "active_users"
},
"unit": "<string>",
"total": 123,
"previous_total": 123,
"points": [
{
"at": "2023-11-07T05:31:56Z",
"value": 123
}
],
"previous_points": [
{
"at": "2023-11-07T05:31:56Z",
"value": 123
}
]
}
],
"rows": [
{
"rank": 123,
"label": "<string>",
"user": {
"id": "<string>",
"external_id": "<string>"
},
"rule": {
"id": "<string>",
"key": "<string>",
"name": "<string>"
},
"property": {
"value": "<string>"
},
"value": 123,
"previous_rank": 123,
"values": [
123
]
}
],
"total_rows": 1,
"computed_at": "2023-11-07T05:31:56Z"
}
}{
"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
Query Parameters
Response
Get a view