# /api/item/update

**`POST`** Modify data of specified fields of the item.&#x20;

**What tasks can be done with this function?**

* Text output from the external OCR Tools can be added as tags, annotations to the image, and serve as search conditions for later use.&#x20;
* The analysis result of the image generated by external Object Detection Tools can be added in the form of tags, and serve as a search condition.

**Fields that can be modified are listed as follows:**

| Parameter  | Description                                 |
| ---------- | ------------------------------------------- |
| id         | Required, the ID of the item to be modified |
| tags       | Optional, tags                              |
| annotation | Optional, annotations                       |
| url        | Optional, the source url                    |
| star       | Optional, ratings                           |

**Sample Code:**

```javascript
var data = {
    "id": "KBN1X9NHDZ99F",
  "tags": ["Design1", "Design2"],
  "annotation": "Awesome",
  "url": "https://dribbble/com",
  "star": 4
};

var requestOptions = {
  method: 'POST',
  body: JSON.stringify(data),
  redirect: 'follow'
};

fetch("http://localhost:41595/api/item/update", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

**Results Returned:**

```javascript
{
    "status": "success",
    "data": {
        "id": "KBN1X9NHDZ99F",
        "name": "Top Character Design Trends for 2019 Bold  Impressive",
        "size": 18447,
        "ext": "jpg",
        "tags": [
            "Design1",
            "Design2"
        ],
        "folders": [
            "KBJJSMMVF9WYL"
        ],
        "isDeleted": false,
        "url": "https://dribbble/com",
        "annotation": "Awesome",
        "modificationTime": 1592621841437,
        "width": 450,
        "height": 545,
        "noThumbnail": true,
        "lastModified": 1592625558780,
        "palettes": [
            {
                "color": [
                    251,
                    244,
                    221
                ],
                "ratio": 80,
                "$$hashKey": "object:678"
            },
            {
                "color": [
                    10,
                    185,
                    202
                ],
                "ratio": 7,
                "$$hashKey": "object:679"
            },
            {
                "color": [
                    26,
                    37,
                    64
                ],
                "ratio": 6,
                "$$hashKey": "object:680"
            },
            {
                "color": [
                    217,
                    83,
                    11
                ],
                "ratio": 4.42,
                "$$hashKey": "object:681"
            },
            {
                "color": [
                    242,
                    200,
                    172
                ],
                "ratio": 0.51,
                "$$hashKey": "object:682"
            },
            {
                "color": [
                    214,
                    170,
                    135
                ],
                "ratio": 0.44,
                "$$hashKey": "object:683"
            },
            {
                "color": [
                    154,
                    208,
                    220
                ],
                "ratio": 0.31,
                "$$hashKey": "object:684"
            }
        ],
        "star": 4
    }
}
```


---

# 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://api.eagle.cool/item/update.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.
