Passer au contenu principal
PUT
/
agent-sessions
/
{session_id}
/
documents
/
{document_id}
/
star
Mettre en favori/Retirer des favoris un document
import requests

url = "https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/documents/{document_id}/star"

payload = { "is_starred": True }
headers = {
    "X-API-KEY": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_starred: true})
};

fetch('https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/documents/{document_id}/star', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request PUT \
--url https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}/documents/{document_id}/star \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"is_starred": true
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Autorisations

X-API-KEY
string
header
requis

En-têtes

X-End-User-ID
string | null

Paramètres de chemin

session_id
string<uuid>
requis
document_id
string<uuid>
requis

Corps

application/json
is_starred
boolean
requis

Whether the document should be starred (true) or unstarred (false).

Réponse

Successful Response