API-Referenz
Eine Datei löschen
Eine Datei logisch löschen und deren gespeicherten Inhalt zur Bereinigung vormerken.
Eine Datei logisch löschen und deren gespeicherten Inhalt zur Bereinigung vormerken.
Endpunkt
- Basis-URL
https://runapi.ai- API-Version
v1- Authentifizierung
Authorization: Bearer YOUR_API_KEY
02
JSON-BodyAnfrage
Werte nur am angegebenen Anfrage-Speicherort senden.
Pfadparameter1 Feld
file_idstring
Erforderlich
RunAPI-Datei-ID.
03
HTTP 200Erfolgsantwort
DELETE /v1/files/:file_id
JSON
{
"deleted": true,
"id": "file_abc123",
"object": "file"
}
04
HTTP 401Fehlerantwort (401)
Antwort-Schema
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
Antwortbeispiel
JSON
{
"error": {
"code": "authentication_error",
"message": "Missing API key",
"param": null,
"type": "authentication_error"
}
}
05
HTTP 404Fehlerantwort (404)
Antwort-Schema
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
Antwortbeispiel
JSON
{
"error": {
"code": "not_found",
"message": "File not found",
"param": null,
"type": "invalid_request_error"
}
}
06
HTTP 502Fehlerantwort (502)
Antwort-Schema
JSON
{
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"message",
"type"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
}
Antwortbeispiel
JSON
{
"error": {
"code": "storage_write_failed",
"message": "File storage failed",
"param": null,
"type": "server_error"
}
}
07
cURL-Beispiel
CURL
curl -X DELETE https://runapi.ai/v1/files/file_abc123 \
-H 'Authorization: Bearer YOUR_API_KEY'