> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/api-sdk-cli/hi/apis/ontologies-api.md).

# Ontologies API

Unitlab Ontologies API: HTTP से वर्कस्पेस की ऑन्टोलॉजी की सूची देखें, पढ़ें, नई बनाएँ और उनका शीर्षक, विवरण व क्लास संरचना बदलें।

| Method और रूट                   | काम                                                           | अनुमति            |
| ------------------------------- | ------------------------------------------------------------- | ----------------- |
| `GET /api/sdk/ontologies/`      | ऑन्टोलॉजी की सूची (paged)                                     | View ontology     |
| `POST /api/sdk/ontologies/`     | एक ऑन्टोलॉजी बनाएँ                                            | Manage ontologies |
| `GET /api/sdk/ontologies/{id}/` | एक ऑन्टोलॉजी पढ़ें                                            | View ontology     |
| `PUT /api/sdk/ontologies/{id}/` | उसका शीर्षक, विवरण और संरचना बदलें, एक revision दर्ज करते हुए | Manage ontologies |

सूची फ़िल्टर: `title_eq`, `title_like`, `desc_eq`, `desc_like`, `created_before`, `created_after`, `edited_before`, `edited_after` (ISO 8601)।

```bash
curl -s -X POST https://api.unitlab.ai/api/sdk/ontologies/ \
  -H "Authorization: Api-Key $UNITLAB_API_KEY" -H "Content-Type: application/json" \
  -d @ontology.json
```

```json
{
  "title": "Robot cell QA",
  "description": "Grippers and parts",
  "data_type": "image",
  "structure": {"objects": [], "classifications": [], "skeleton_templates": []}
}
```

जवाब का `ontology_hash` ऑन्टोलॉजी ID है; प्रोजेक्ट बनाते समय इसे दें। `structure` को SDK के `OntologyStructure` और `to_dict()` से बनाएँ, या किसी मौजूदा ऑन्टोलॉजी से कॉपी करें। देखें [Python में ऑन्टोलॉजी बनाएँ](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/build-ontologies-in-python.md)।

## संबंधित <a href="#related" id="related"></a>

[SDK: ऑन्टोलॉजी रिसोर्स](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/ontology-resources.md) · [प्रोजेक्ट](https://docs.unitlab.ai/api-sdk-cli/hi/apis/projects-api.md)
