Favourite a knowledge store
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/favourite/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/favourite/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/favourite/ \
--header 'Authorization: Bearer <token>'{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Projects
Favourite a knowledge store
Mark the project (knowledge store) as a favourite of the calling user.
Favourites are per-user: they sort the store first in the project list
(is_favourite is exposed on each listed project) and star it in the
knowledge-store switcher. Idempotent — favouriting an already-favourited
store succeeds without change. Available to all project members.
POST
/
projects
/
{project_id}
/
favourite
/
Favourite a knowledge store
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/favourite/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/favourite/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/favourite/ \
--header 'Authorization: Bearer <token>'{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..
Response
The updated project, with is_favourite set to true.