# Endpoints Reference

يولّد API Platform تلقائياً نقاط نهاية REST للكيانات المُعلَّمة بـ `#[ApiResource]`. يُعرِّض Chamilo أكثر من 100 مورد.

## العمليات القياسية

بالنسبة لكل مورد API، تكون العمليات التالية متاحة عادةً:

| Method   | Path                    | Description        |
| -------- | ----------------------- | ------------------ |
| `GET`    | `/api/{resources}`      | List (collection)  |
| `POST`   | `/api/{resources}`      | Create             |
| `GET`    | `/api/{resources}/{id}` | Read (single item) |
| `PUT`    | `/api/{resources}/{id}` | Full update        |
| `PATCH`  | `/api/{resources}/{id}` | Partial update     |
| `DELETE` | `/api/{resources}/{id}` | Delete             |

ليس كل العمليات مُفعَّلة لكل مورد — تُطبَّق قيود الأمان.

## الموارد الرئيسية لـ API

### موارد المنصة

| Resource       | Path                  | Description           |
| -------------- | --------------------- | --------------------- |
| Users          | `/api/users`          | User accounts         |
| Courses        | `/api/courses`        | Courses               |
| Sessions       | `/api/sessions`       | Training sessions     |
| Resource Nodes | `/api/resource_nodes` | Unified content nodes |
| Access URLs    | `/api/access_urls`    | Multi-URL portals     |
| Messages       | `/api/messages`       | Platform messages     |

### موارد محتوى الدورة

| Resource             | Path                          | Description      |
| -------------------- | ----------------------------- | ---------------- |
| Documents            | `/api/documents`              | Course documents |
| Learning Paths       | `/api/learning_paths`         | Learning paths   |
| Glossaries           | `/api/glossaries`             | Glossary terms   |
| Links                | `/api/links`                  | External links   |
| Calendar Events      | `/api/c_calendar_events`      | Agenda events    |
| Student Publications | `/api/c_student_publications` | Assignments      |
| Blogs                | `/api/c_blogs`                | Course blogs     |
| Groups               | `/api/c_groups`               | Course groups    |

### موارد التتبع

| Resource             | Path                        | Description     |
| -------------------- | --------------------------- | --------------- |
| Gradebook Categories | `/api/gradebook_categories` | Gradebook setup |
| Gradebook Results    | `/api/gradebook_results`    | Grades          |

## التصفية والتصفُّح

يدعم API Platform:

* **Pagination**: `?page=2&itemsPerPage=30`
* **Filtering**: `?title=Introduction` (depends on configured filters)
* **Ordering**: `?order[title]=asc`
* **Search**: Full-text search on configured fields

## التفاوض على المحتوى

يدعم API صيغ متعددة:

* `application/ld+json` (default — JSON-LD)
* `application/json`
* `text/html` (API documentation)

اضبط رأس `Accept` لاختيار صيغة الاستجابة.

## الأمان

يفرض كل نقطة نهاية الأمان من خلال:

* JWT authentication (required for most endpoints)
* Symfony security voters (resource-level permissions)
* Role-based access control (e.g., admin-only endpoints)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chamilo.org/2.x-ar/dlyl-almtwr/developer-guide/api/endpoints-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
