> 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/assets-and-folders-api.md).

# Assets और फ़ोल्डर API

Unitlab HTTP API से लाइब्रेरी में फ़ाइलें अपलोड करें, कस्टम मेटाडेटा सेट करें, फ़ोल्डर संभालें, क्लाउड फ़ोल्डर सिंक करें और Data Groups बनाएँ।

सभी रूट `https://api.unitlab.ai/api/sdk/data-assets/` के अंतर्गत हैं और इनके लिए **Manage data** चाहिए। Read अनुरोध **View labeling interface** से भी चलते हैं।

| Method और रूट                                        | काम                                                                      |
| ---------------------------------------------------- | ------------------------------------------------------------------------ |
| `POST upload/`                                       | लाइब्रेरी में एक फ़ाइल अपलोड करें (multipart)                            |
| `GET assets/{id}/status/`                            | फ़ाइल की प्रोसेसिंग स्थिति                                               |
| `PATCH assets/{id}/custom-metadata/`                 | कस्टम मेटाडेटा बदलें                                                     |
| `POST assets/{id}/timeseries-configuration/`         | CSV का x कॉलम और चैनल चुनें                                              |
| `POST assets/{id}/tiled-retry/`, `pointcloud-retry/` | विफल raster या lidar सीन को फिर से प्रोसेस करें                          |
| `GET folders/`                                       | फ़ोल्डरों की सूची। चाइल्ड के लिए `parent_id`, हर फ़ोल्डर के लिए `all=1`। |
| `POST folders/`                                      | फ़ोल्डर या क्लाउड फ़ोल्डर बनाएँ                                          |
| `GET folders/{id}/`, `folders/{id}/items/`           | फ़ोल्डर और उसकी फ़ाइलें पढ़ें                                            |
| `POST folders/{id}/sync-cloud/`                      | क्लाउड फ़ोल्डर को उसके बकेट से सिंक करें                                 |
| `GET folders/{id}/auto-grouping/suggest/`            | Data Group पैटर्न सुझाएँ                                                 |
| `POST folders/{id}/auto-grouping/estimate/`          | किसी पैटर्न से बनने वाले ग्रुप गिनें                                     |
| `POST folders/{id}/auto-groups/`                     | Data Groups बनाएँ                                                        |

## फ़ाइल अपलोड करें <a href="#upload-a-file" id="upload-a-file"></a>

```bash
curl -s -X POST https://api.unitlab.ai/api/sdk/data-assets/upload/ \
  -H "Authorization: Api-Key $UNITLAB_API_KEY" \
  -F "file=@cell04_0001_front.jpg" \
  --form-string "folder_name=Robot cell 04" \
  --form-string "tags=site-berlin" \
  --form-string 'custom_metadata={"robot":"UR10e"}'
```

| फ़ील्ड                           | उपयोग                                                                      |
| -------------------------------- | -------------------------------------------------------------------------- |
| `folder_name` या `folder_id`     | लक्ष्य फ़ोल्डर। नाम देने पर फ़ोल्डर बनाया या दोबारा इस्तेमाल किया जाता है। |
| `path`                           | लक्ष्य फ़ोल्डर के अंदर सबफ़ोल्डर का पाथ                                    |
| `tags`                           | कई टैग के लिए फ़ील्ड दोहराएँ                                               |
| `custom_metadata`                | एक JSON ऑब्जेक्ट, string के रूप में                                        |
| `generic_type`, `primary_column` | टाइप तय करें; tabular CSV का टेक्स्ट कॉलम                                  |

जवाब में `folder_id` और बनाया गया `asset` होता है।

## कस्टम मेटाडेटा <a href="#custom-metadata" id="custom-metadata"></a>

```bash
curl -s -X PATCH "https://api.unitlab.ai/api/sdk/data-assets/assets/$ASSET_ID/custom-metadata/" \
  -H "Authorization: Api-Key $UNITLAB_API_KEY" -H "Content-Type: application/json" \
  -d '{"custom_metadata": {"robot": "UR10e", "lighting": "low"}}'
```

इसे खाली करने के लिए `{"custom_metadata": null}` भेजें।

## फ़ोल्डर <a href="#folders" id="folders"></a>

```bash
curl -s -X POST https://api.unitlab.ai/api/sdk/data-assets/folders/ \
  -H "Authorization: Api-Key $UNITLAB_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "Incoming", "cloud_storage_id": "STORAGE_ID", "prefix": "fleet/incoming/"}'
```

साधारण सबफ़ोल्डर के लिए `{"name": "...", "parent_id": "..."}` भेजें। `sync-cloud/` के जवाब में `registered`, `folders`, `skipped`, `skipped_in_trash`, `missing` और `busy` होते हैं।

## Data Groups <a href="#data-groups" id="data-groups"></a>

`auto-grouping/estimate/` और `auto-groups/` वही कॉन्फ़िगरेशन लेते हैं जो [Data Group ऑटोमेशन](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/data-group-automation.md) में बताया गया है। एक फ़ोल्डर में अधिकतम 5,000 फ़ाइलें हो सकती हैं और एक रन में अधिकतम 1,000 ग्रुप बनते हैं।

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

[SDK: Assets और कस्टम मेटाडेटा](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/assets-and-custom-metadata.md) · [SDK: फ़ोल्डर](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/folders.md)
