Skip to content

Working with Metadata

You can create or update metadata. A custom metadata can be added while uploading the object. Once the object is uploaded, default system metadata will be attached.

If tenant is operating for a subtenant object, the subtenant should be specified in the request query parameter. A maximum of 8 tags are allowed, where each tag can have a maximum of 128 characters.

Assign Tags to an object

1
PUT /objectMetadata/myfolder/mysubfolder/myobject.objext
1
PUT /objectMetadata/folder1/mysensordata.log

Content-Type: application/json

Request example:

1
2
3
4
5
6
7
{
  "tags": [
    "tag1",
    "tag2",
    "tag3"
  ]
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "tags": [
    "tag1",
    "tag2",
    "tag3",
    "tag4",
    "tag5",
    "tag6",
    "tag7",
    "tag8"
  ]
}

Response example

1
Status 201 Created

Get Metadata for a single object

1
GET /objectMetadata/myfolder/mysubfolder/myobject.objext
1
GET /objectMetadata/folder1/mysensordata.log

Content-Type: application/json

Response example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "name": "myobject.objext",
  "location": "myfolder/mysubfolder/myobject.objext",
  "size": 25,
  "lastModified": "2018-10-03T09:21:36.559Z",
  "tags": [
    "tag1",
    "tag2",
    "tag3"
  ],
  "subtenantId": "204a896c-a23a-11e9-a2a3-2a2ae2dbcce4"
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
    "name": "mysensordata.log",
    "location": "folder1/mysensordata.log",
    "size": 14,
    "tags": [
        "tag1",
        "tag2",
        "tag3",
        "tag4",
        "tag5",
        "tag6",
        "tag7",
        "tag8"
    ],
    "lastModified": "2020-03-06T10:59:21Z"
}

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.