Table views the provider shared in the portal
curl --request GET \
--url https://app.hookie.ai/portal/api/views \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hookie.ai/portal/api/views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/portal/api/views"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"views": [
{
"id": "<string>",
"name": "<string>",
"dataset": "<string>",
"columns": [
{
"key": "<string>",
"label": "<string>"
}
],
"sort_key": "<string>",
"sort_dir": "asc",
"is_default": true
}
]
}Customer Portal
Table views the provider shared in the portal
Read-only (#376). The saved record views the developer shared with the portal customer (portal_shared) whose dataset the portal exposes. Only the name, dataset, columns and sort are returned.
GET
/
portal
/
api
/
views
Table views the provider shared in the portal
curl --request GET \
--url https://app.hookie.ai/portal/api/views \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hookie.ai/portal/api/views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/portal/api/views"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"views": [
{
"id": "<string>",
"name": "<string>",
"dataset": "<string>",
"columns": [
{
"key": "<string>",
"label": "<string>"
}
],
"sort_key": "<string>",
"sort_dir": "asc",
"is_default": true
}
]
}Authorizations
portalTokenHeaderportalSession
A hpt_… customer portal token, as Authorization: Bearer. Stored hashed and looked up by its full SHA-256 hash; shown once at issue. The query string (?token=) is not accepted: a token there ends up in request logs and traces. A browser page trades the token for a portalSession cookie with POST /portal/api/session.
Response
200 - application/json
Shared views.
Show child attributes
Show child attributes