> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# الحصول على تفاصيل واجهة API لمنصة AceDataCloud

> Platform API guide - Ace Data Cloud

احصل على المعلومات الكاملة لنقطة نهاية API واحدة عبر معرّف API — إضافةً إلى حقول `definition` ‏(مخطط OpenAPI 3.0)، و`service` ‏(تفاصيل الخدمة التابعة)، و`products` ‏(المنتجات المرتبطة) مقارنةً بـ[واجهة القائمة](https://platform.acedata.cloud/documents/platform-api-list).

مناسب لسيناريوهات مثل إنشاء SDK تلقائيًا، وتغذية LLM Agent بوصف الأدوات، والعرض الديناميكي لمواقع الوثائق.

> ℹ️ تنتمي هذه الواجهة إلى **واجهة API لإدارة منصة AceDataCloud**، وبادئة موحّدة هي `https://platform.acedata.cloud/api/v1/`. راجع [الحصول على قائمة وثائق منصة AceDataCloud](https://platform.acedata.cloud/documents/platform-document-list) لفهرس الواجهات الكامل.

## نظرة عامة على الواجهة

| البند | المحتوى |
| - | - |
| الطريقة | `GET` |
| URL | `https://platform.acedata.cloud/api/v1/apis/{api_id}` |
| المصادقة | ❌ عامة |

كلٌّ من `/apis/{id}` و`/apis/{id}/` متاحان حاليًا؛ تستخدم الأمثلة بشكل موحّد صيغة بدون شرطة مائلة لاحقة.

## شرح المصادقة

هذه الواجهة **عامة بالكامل، ولا تتطلب رمز حساب أو حالة تسجيل دخول**.

## معاملات المسار

| المعامل | النوع | مطلوب | الوصف |
| - | - | - | - |
| `api_id` | UUID | ✅ | معرّف API (بتنسيق UUID، ولا يدعم الأسماء المستعارة) |

## أمثلة الطلبات

### cURL

```shell theme={null}
curl 'https://platform.acedata.cloud/api/v1/apis/afc7917f-d89f-4dc9-95c2-863936b02cad' \
  -H 'accept: application/json'
```

### Python

```python theme={null}
import requests

api_id = "afc7917f-d89f-4dc9-95c2-863936b02cad"
resp = requests.get(
    f"https://platform.acedata.cloud/api/v1/apis/{api_id}",
    headers={"accept": "application/json"},
    timeout=10,
)
api = resp.json()
print(f"API: {api['title']}")
print(f"المسار: {api['path']}")
print(f"الخدمة التابعة: {api['service']['title']} ({api['service']['alias']})")
print(f"عدد مسارات OpenAPI: {len(api.get('definition', {}).get('paths', {}))}")
```

### Node.js

```javascript theme={null}
const apiId = 'afc7917f-d89f-4dc9-95c2-863936b02cad'
const r = await fetch(`https://platform.acedata.cloud/api/v1/apis/${apiId}`)
const api = await r.json()
console.log(api.title, api.path, api.service.title)
```

## مثال الاستجابة (HTTP 200)

```json theme={null}
{
  "id": "afc7917f-d89f-4dc9-95c2-863936b02cad",
  "document_id": "e31b3e50-d91d-4a4f-8d32-8dd8c9e2f512",
  "service_id": "5d732942-4d44-48be-958e-dd8474d8aa8d",
  "name": "ChatDoc Documents API",
  "title": "ChatDoc Documents API",
  "path": "/chatdoc/documents",
  "path2": null,
  "introduction": "بعد إنشاء مستودع المعرفة، يمكن استخدام واجهة API هذه لإضافة المستندات أو الاستعلام عنها أو تعديلها أو حذفها في مستودع المعرفة.",
  "cost": [
    { "conditions": { "==": [1, 1] }, "consumption": 0.057 }
  ],
  "stage": "Beta",
  "rank": 10,
  "tags": [],
  "metadata": null,
  "created_at": "2023-09-03T17:55:48.179195Z",
  "updated_at": "2026-04-26T16:16:35.579082Z",
  "service": {
    "id": "5d732942-4d44-48be-958e-dd8474d8aa8d",
    "title": "أسئلة وأجوبة ChatDoc",
    "type": "Api",
    "alias": "chatdoc"
  },
  "products": [],
  "definition": {
    "openapi": "3.0.0",
    "info": { "title": "ChatDoc Documents API", "version": "0.1" },
    "paths": {
      "/chatdoc/documents": {
        "post": { "...": "..." }
      }
    },
    "components": { "schemas": { "...": "..." } }
  }
}
```

## شرح حقول الاستجابة

تتضمن واجهة التفاصيل، بالإضافة إلى [حقول واجهة القائمة](https://platform.acedata.cloud/documents/platform-api-list)، ما يلي:

| الحقل | النوع | الوصف |
| - | - | - |
| `service` | object | المعلومات الأساسية للخدمة التابعة: `id`، `title`، `type`، `alias` |
| `products` | array | قائمة المنتجات المرتبطة (تكون فارغة عادةً، للاستخدام من جانب العمليات) |
| `definition` | object | **تعريف مواصفات OpenAPI 3.0 الكامل**، يتضمن `paths` و`components` و`info` وغيرها، ويمكن تغذيته مباشرةً إلى `openapi-generator` لإنشاء كود العميل |

## معالجة الأخطاء

| HTTP | code | المعنى |
| - | - | - |
| 400 | `invalid` | `api_id` ليس UUID صالحًا |
| 404 | `not_found` | واجهة API غير موجودة أو تم إيقافها |

## نصائح عملية

* حقل **`definition` كبير جدًا**: قد يحتوي مخطط OpenAPI الخاص بواجهة API واحدة على مئات أسطر JSON. إذا كنت تحتاج فقط إلى فهرس الخدمات ولا تحتاج إلى المخطط، فيجب استخدام [واجهة القائمة](https://platform.acedata.cloud/documents/platform-api-list) بدلًا من ذلك.
* **الاستخدام الشائع لإنشاء SDK**:
  ```shell theme={null}
  # الحصول على ملف OpenAPI
  curl -s 'https://platform.acedata.cloud/api/v1/apis/<api_id>' | jq '.definition' > openapi.json

  # استخدام openapi-generator-cli لإنشاء عميل Python
  openapi-generator-cli generate -i openapi.json -g python -o ./client
  ```
* **تتبع تغييرات API**: حقل `updated_at` هو وقت آخر تغيير للمخطط. يتيح الاشتراك في هذا الحقل إعادة إنشاء SDK تلقائيًا عند تغيّر OpenAPI.

## الواجهات ذات الصلة

* [الحصول على قائمة API لمنصة AceDataCloud](https://platform.acedata.cloud/documents/platform-api-list)
* [الحصول على إحصاءات استدعاءات API لمنصة AceDataCloud](https://platform.acedata.cloud/documents/platform-api-usage)
* [الحصول على تفاصيل خدمة منصة AceDataCloud](https://platform.acedata.cloud/documents/platform-service-detail)
* [الحصول على تفاصيل وثيقة منصة AceDataCloud](https://platform.acedata.cloud/documents/platform-document-detail) — استخدم `document_id` للانتقال إلى وثائق المطورين المعروضة


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.