Skip to content

Asset Management Service – APIs and References

Filtering

All endpoints with the parameter filter support basic filtering.

When reading assets, all assets are basically filtered for main tenant and subtenant.

In addition, you can supply one or more of the following field names in the filter queries to filter assets:

  • assetId
  • tenantId
  • name
  • externaId
  • subTenant
  • deleted
  • parentId
  • typeId
  • hasType (see also Special fields)

Wildcards are not supported. All dates must be in the following format: 2018-01-01T00:00:00.00Z

When a filter has no matches, the response will be empty.

Filter functions

Function eq (equals)

1
2
3
{
  "name": "MyMotor"
}

or

1
2
3
4
5
{
  "name": {
    "eq": "MyMotor"
  }
}

Function in

The function in looks very similar to equals, but instead matching to one value, it checks an array of values, and matches for any of them.

1
2
3
4
5
6
7
{
    "name": {
        "in": {
            "value": ["MyMotor", "MyEngine"]
        }
    }
}

Function endsWith

1
2
3
4
5
{
    "name": {
        "endsWith": "Motor"
    }
}

Function startsWith

1
2
3
4
5
{
    "name": {
        "startsWith": "My"
    }
}

Function contains

1
2
3
4
5
{
    "name": {
        "contains": "yMot"
    }
}

Function before

1
2
3
4
5
{
    "deleted": {
        "before": "2018-01-01T00:00:00.00Z"
    }
}

Function after

1
2
3
4
5
{
    "deleted": {
        "after": "2018-01-01T00:00:00.00Z"
    }
}

Function between

1
2
3
4
5
{
    "deleted": {
        "between": "[2018-01-01T00:00:00.00Z, 2018-01-31T00:00:00.00Z)"
    }
}

Filter operations

Operation not

1
2
3
4
5
6
7
{
  "not": {
      "name": {
        "startsWith": "My"
      }
  }
}

or

1
2
3
4
5
{
  "not": {
    "name":"MyMotor"
    }
}

Operation or

1
2
3
4
5
6
7
8
{
    "name": {
        "or": [
            {"eq": "MyMotor"},
            {"endsWith": "Motor"}
        ]
    }
}

or

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "or": {
        "deleted": {
            "eq": null
        },
        "name": {
            "startsWith": "My"
        }
    }
}

Operation and

1
2
3
4
{
    "name":"MyMotor",
    "deleted": null
}

or

1
2
3
4
5
6
7
8
9
{
    "and":{
      "deleted": {
          "eq": null
      },
      "name": {
          "startsWith": "My"
      }
}

Special fields

Field hasType

Using hasType you can filter for any ascendant type of an asset type. The result will contain all assets that have the given asset type or any descendants of this type, e.g. all assets which have type core.motor or any type which is originated from core.motor asset type.

1
2
3
{
  "hasType": "core.motor"
}

Note

While hasType matches for any asset type in the type hierarchy, the field typeId only matches with the given asset's typeId.

API Specification

Download OpenAPI Specification

Any questions left?

Ask the community


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