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

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

Content-Type: application/json

Request example:

  {
    "tags": [
      "tag1",
      "tag2",
      "tag3"
    ]
  }
  {
    "tags": [
      "tag1",
      "tag2",
      "tag3",
      "tag4",
      "tag5",
      "tag6",
      "tag7",
      "tag8"
    ]
  }
  {
    "tags": [
      "tag1",
      "tag2",
      "tag3",
      "tag4",
      "tag5"
    ]
  }

Response example

Status 201 Created

Get Metadata for a single object

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

Content-Type: application/json

Response example:

  {
    "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"
  }
  {
      "name": "mysensordata.log",
      "location": "folder1/mysensordata.log",
      "size": 14,
      "tags": [
          "tag1",
          "tag2",
          "tag3",
          "tag4",
          "tag5",
          "tag6",
          "tag7",
          "tag8"
      ],
      "lastModified": "2020-03-06T10:59:21Z"
  }
  {
    "name": "myobject.objext",
    "location": "myfolder/mysubfolder/myobject.objext",
    "size": 25,
    "lastModified": "2021-10-03T09:21:36.559Z",
    "tags": [
      "tag1",
      "tag2",
      "tag3",
      "tag4",
      "tag5"
    ],
    "subtenantId": "204a896c-a23a-11e9-a2a3-2a2ae2dbcce4"
  }

Any questions left?

Ask the community


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


Last update: August 29, 2022