Dokumentstatus per API abfragen
Dokumentstatus per API abfragen
Fragen Sie den Status eines Dokuments in der Wissensdatenbank über die REST API ab.
HTTP-Anfragemethode
GET
Anfrage-URL
https://api-${endpoint}.gptbots.ai/v1/bot/data/detail/list
Authentifizierung der Anfrage
Weitere Informationen finden Sie in der Übersicht zu Authentifizierungsdetails.
Anfrage
Beispielanfrage
curl -X GET https://api-${endpoint}.gptbots.ai/v1/bot/data/detail/list?data_ids=65e18b26e121ab08cefb4a53&data_ids=65e18b26e121ab08cefb4a5333 \
-H 'Authorization: Bearer ${API Key}'
curl -X GET https://api-${endpoint}.gptbots.ai/v1/bot/data/detail/list?data_ids=65e18b26e121ab08cefb4a53&data_ids=65e18b26e121ab08cefb4a5333 \
-H 'Authorization: Bearer ${API Key}'
Dieser Codeblock im schwebenden Fenster
Anfrage-Header
| Feld | Typ | Beschreibung |
|---|---|---|
| Authorization | Bearer ${API Key} | Verwenden Sie Authorization: Bearer ${API Key} zur Authentifizierung. Den API Key erhalten Sie auf der API-Key-Seite. |
Anfrageparameter
| Feld | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| data_ids | Array | Ja | Dokument-ID(s); mehrere können übergeben werden. |
Antwort
Beispielantwort
[
{
"data_id": "65e18b26e121ab08cefb4a53",
"data_status": "AVAILABLE"
}
]
[
{
"data_id": "65e18b26e121ab08cefb4a53",
"data_status": "AVAILABLE"
}
]
Dieser Codeblock im schwebenden Fenster
Erfolgsantwort
| Feld | Typ | Beschreibung |
|---|---|---|
| doc | JSON-Array | Dokumentinformationen¹ |
| data_id | string | Dokument-ID |
| data_status | string | Dokumentstatus |
¹ „doc“ ist ein Platzhalter für das zurückgegebene Dokumentenobjekt.
Fehlerantwort
| Feld | Typ | Beschreibung |
|---|---|---|
| code | int | Fehlercode |
| message | string | Fehlerdetails |
Fehlercodes
| Code | Nachricht |
|---|---|
| 40000 | Ungültiger Parameter |
| 40127 | Entwicklerauthentifizierung fehlgeschlagen |
| 20059 | Agent gelöscht |
