curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{pid}/record-views \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"webhook_id": "<string>",
"name": "<string>",
"columns": [
"<string>"
],
"sort_key": "<string>",
"sort_dir": "desc",
"is_default": false
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: '<string>',
name: '<string>',
columns: ['<string>'],
sort_key: '<string>',
sort_dir: 'desc',
is_default: false
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/record-views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/record-views"
payload = {
"webhook_id": "<string>",
"name": "<string>",
"columns": ["<string>"],
"sort_key": "<string>",
"sort_dir": "desc",
"is_default": False
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"view": {
"id": "<string>",
"webhook_id": "<string>",
"name": "<string>",
"columns": [
{
"key": "<string>",
"label": "<string>"
}
],
"sortKey": "<string>",
"sortDir": "asc",
"isDefault": true
}
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Create a record view
Top-level alias: POST /admin/api/record-views. Write role required.
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{pid}/record-views \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"webhook_id": "<string>",
"name": "<string>",
"columns": [
"<string>"
],
"sort_key": "<string>",
"sort_dir": "desc",
"is_default": false
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_id: '<string>',
name: '<string>',
columns: ['<string>'],
sort_key: '<string>',
sort_dir: 'desc',
is_default: false
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/record-views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/record-views"
payload = {
"webhook_id": "<string>",
"name": "<string>",
"columns": ["<string>"],
"sort_key": "<string>",
"sort_dir": "desc",
"is_default": False
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"view": {
"id": "<string>",
"webhook_id": "<string>",
"name": "<string>",
"columns": [
{
"key": "<string>",
"label": "<string>"
}
],
"sortKey": "<string>",
"sortDir": "asc",
"isDefault": true
}
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Authorizations
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Project id (UUID) belonging to the caller workspace.
Body
Must name a webhook in this project.
1 - 80Payload keys, or the meta columns _id, _received_at, _source. Keys must be unique; a bare string is shorthand for {key, label:key}.
1 - 40 elements128A column key to sort by, or null/empty for arrival order. Must satisfy the same key rules.
Any value other than asc is stored as desc.
asc, desc Only the literal true counts. Setting it clears the default flag on every other view of the same webhook in the same batch.
Response
Created. Note the echoed view uses the internal camelCase spec field names sortKey, sortDir and isDefault - NOT the snake_case names returned by the list endpoint.
Show child attributes
Show child attributes