/api/item/update
POST Modify data of specified fields of the item.
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.
  • 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:
1
var data = {
2
"id": "KBN1X9NHDZ99F",
3
"tags": ["Design1", "Design2"],
4
"annotation": "Awesome",
5
"url": "https://dribbble/com",
6
"star": 4
7
};
8
9
var requestOptions = {
10
method: 'POST',
11
body: JSON.stringify(data),
12
redirect: 'follow'
13
};
14
15
fetch("http://localhost:41595/api/item/update", requestOptions)
16
.then(response => response.json())
17
.then(result => console.log(result))
18
.catch(error => console.log('error', error));
Copied!
Results Returned:
1
{
2
"status": "success",
3
"data": {
4
"id": "KBN1X9NHDZ99F",
5
"name": "Top Character Design Trends for 2019 Bold Impressive",
6
"size": 18447,
7
"ext": "jpg",
8
"tags": [
9
"Design1",
10
"Design2"
11
],
12
"folders": [
13
"KBJJSMMVF9WYL"
14
],
15
"isDeleted": false,
16
"url": "https://dribbble/com",
17
"annotation": "Awesome",
18
"modificationTime": 1592621841437,
19
"width": 450,
20
"height": 545,
21
"noThumbnail": true,
22
"lastModified": 1592625558780,
23
"palettes": [
24
{
25
"color": [
26
251,
27
244,
28
221
29
],
30
"ratio": 80,
31
"$hashKey": "object:678"
32
},
33
{
34
"color": [
35
10,
36
185,
37
202
38
],
39
"ratio": 7,
40
"$hashKey": "object:679"
41
},
42
{
43
"color": [
44
26,
45
37,
46
64
47
],
48
"ratio": 6,
49
"$hashKey": "object:680"
50
},
51
{
52
"color": [
53
217,
54
83,
55
11
56
],
57
"ratio": 4.42,
58
"$hashKey": "object:681"
59
},
60
{
61
"color": [
62
242,
63
200,
64
172
65
],
66
"ratio": 0.51,
67
"$hashKey": "object:682"
68
},
69
{
70
"color": [
71
214,
72
170,
73
135
74
],
75
"ratio": 0.44,
76
"$hashKey": "object:683"
77
},
78
{
79
"color": [
80
154,
81
208,
82
220
83
],
84
"ratio": 0.31,
85
"$hashKey": "object:684"
86
}
87
],
88
"star": 4
89
}
90
}
Copied!
Copy link