The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Terms of Use and Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
Insights Hub and Industrial IoT

Insights Hub drives smart manufacturing through the industrial Internet of Things. Gain actionable insights with asset and operational data and improve your processes.

Metadata and Object search¶

The Metadata and Object search can be used to search and analyze big volumes of objects quickly via a highly scalable text search. The search accepts filter parameters such as object name, location, created date, size and tags. Filters can be combined using "and" and "or" conditions.

The search results can be sorted by any one of the filter parameters and limited to maximum number of records per result set. If there are more results available than the defined maximum, a searchNext property is returned in the response. This property specifies the search request, which returns the remaining the results. It is included in every subsequent response, until the end of the list.

Supported Operators¶

The search filter supports the following operators for different data types as shown in the table:

Data TypeOperatorsDescription
Stringcontains- Searches for generic strings
- Uses wildcard to search strings may impact performance
eq- Direct match and recommends for quick search
- Wildcard characters are not allowed
startswith- Matches the initial characters of the string
- Uses a wildcard character at the end
DatebeforeSearches before the specified date
betweenSearches between the search dates
afterSearches after the specified date
IntegereqMatches exactly
gtSearches for integers greater than the specified value
ltSearches for integers less than the specified value
Array (tags)inMatches the string within a list of strings

Get a list of metadata for an object - 'None' Operator¶

Request URL:

{{gatewayUrl}}/api/datalake/v3/objectMetadata?filter=%7B%0A%20%20%22none%22%3A%7B%0A%20%20%22name%22%3A%20%7B%0A%20%20%20%20%22contains%22%3A%20%22sensor%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D

Note

  • Filter Request: filter={ "none":{ "name": { "contains": "sensor" } }
  • Filter request is URL encoded

Content-Type: application/json

Response Example:

{
  "objectMetadata": [
    {
      "name": "test1sensor.csv",
      "location": "Folder/test1sensor.csv",
      "size": 15,
      "created": "2018-10-01T09:21:36.559Z",
      "updated": "2018-10-03T09:21:36.559Z",
      "tags": [
        "tag1",
        "tag3"
      ],
      "metadataURL": "https://gateway.eu1-int.mindsphere.io/api/v3/dlstorage/objectMetadata/Folder1/test1sensor.csv"
    }
  ]
}

Get a list of metadata for an object - 'OR' Operator¶

Request URL:

{{gatewayUrl}}/api/datalake/v3/objectMetadata?filter=%7B%0A%20%20%22or%22%3A%20%20%7B%0A%20%20%20%20%22name%22%3A%20%7B%20%22contains%22%3A%20%22sensor%22%7D%2C%0A%20%20%20%20%22created%22%3A%20%7B%22after%22%3A%20%222018-10-24T11%3A42%3A53.983Z%22%7D%2C%0A%20%20%20%20%22size%22%3A%20%7B%20%22eq%22%3A37%7D%2C%0A%20%20%20%20%22tags%22%3A%7B%20%22in%22%3A%5B%22tag1%22%2C%22tag3%22%5D%7D%0A%20%20%7D%0A%7D&maxRecords=1

Note

  • Filter Request: filter={ "or": { "name": { "contains": "sensor"}, "created": {"after": "2018-10-24T11:42:53.983Z"}, "size": { "eq":37}, "tags":{ "in":["tag1","tag3"]} } }
  • Filter request is URL encoded

Content-Type: application/json

Response Example:

{
  "objectMetadata": [
    {
      "name": "test1sensor.csv",
      "location": "Folder/test1sensor.csv",
      "size": 15,
      "created": "2018-10-01T09:21:36.559Z",
      "updated": "2018-10-03T09:21:36.559Z",
      "tags": [
        "tag1",
        "tag3"
      ],
      "metadataURL": "https://gateway.eu1-int.mindsphere.io/api/v3/dlstorage/objectMetadata/Folder1/test1sensor.csv"
    }
  ],
  "sort": [
    {
      "field": "name",
      "order": "ASC"
    }
  ],
  "searchnext": [
    {
      "field": "name",
      "next": "test2sensor"
    },
    {
      "field": "_id",
      "next": "2222222"
    }
  ]
}

Get a list of metadata for an object - 'AND' Operator¶

Request URL:

{{gatewayUrl}}/api/datalake/v3/objectMetadata?filter=%7B%0A%20%20%20%20%22and%22%3A%20%20%7B%0A%20%20%20%20%22name%22%3A%20%7B%20%22contains%22%3A%20%22sensor%22%7D%2C%0A%20%20%20%20%22created%22%3A%20%7B%22after%22%3A%20%222018-10-24T11%3A42%3A53.983Z%22%7D%2C%0A%20%20%20%20%22size%22%3A%20%7B%20%22eq%22%3A37%7D%2C%0A%20%20%20%20%22tags%22%3A%7B%20%22in%22%3A%5B%22tag1%22%2C%22tag3%22%5D%7D%0A%20%20%7D%0A%7D

Note

  • Filter Request: filter={ "and": { "name": { "contains": "sensor"}, "created": {"after": "2018-10-24T11:42:53.983Z"}, "size": { "eq":37}, "tags":{ "in":["tag1","tag3"]} } }
  • Filter request is URL encoded

Content-Type: application/json

Response Example:

{
  "objectMetadata": [
    {
      "name": "test1sensor.csv",
      "location": "Folder/test1sensor.csv",
      "size": 15,
      "created": "2018-10-01T09:21:36.559Z",
      "updated": "2018-10-03T09:21:36.559Z",
      "tags": [
        "tag1",
        "tag3"
      ],
      "metadataURL": "https://gateway.eu1-int.mindsphere.io/api/v3/dlstorage/objectMetadata/Folder1/test1sensor.csv"
    }
  ]
}