مرجع API
حذف ملف
حذف ملف منطقيًا وجدولة محتواه المخزَّن للتنظيف.
حذف ملف منطقيًا وجدولة محتواه المخزَّن للتنظيف.
نقطة النهاية
- عنوان URL الأساسي
https://runapi.ai- إصدار API
v1- المصادقة
Authorization: Bearer YOUR_API_KEY
02
نص JSONالطلب
أرسل القيم فقط في موقع الطلب المُدرج.
معاملات المسارحقل واحد
file_idstring
مطلوب
معرّف ملف RunAPI.
03
HTTP 200استجابة النجاح
DELETE /v1/files/:file_id
JSON
{
"deleted": true,
"id": "file_abc123",
"object": "file"
}
04
HTTP 401استجابة الخطأ (401)
مخطط الاستجابة
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"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "authentication_error",
"message": "Missing API key",
"param": null,
"type": "authentication_error"
}
}
05
HTTP 404استجابة الخطأ (404)
مخطط الاستجابة
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"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "not_found",
"message": "File not found",
"param": null,
"type": "invalid_request_error"
}
}
06
HTTP 502استجابة الخطأ (502)
مخطط الاستجابة
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"
}
مثال على الاستجابة
JSON
{
"error": {
"code": "storage_write_failed",
"message": "File storage failed",
"param": null,
"type": "server_error"
}
}
07
مثال cURL
CURL
curl -X DELETE https://runapi.ai/v1/files/file_abc123 \
-H 'Authorization: Bearer YOUR_API_KEY'