Download OpenAPI specification:Download
The Single Point of Information about the existence of Digital Twins and their Aspects.
The Digital Twin Registry Bulk API provides methods to create, update (replace), partially update or delete large amounts of data in a single request.
All requests are executed synchronously. For this reason, there are different limits on the amount of data for the individual endpoints.
The payload of one request must not be larger than 128 KB. The operations are atomic.
I.e., operations are executed such that either all requested manipulations fully succeed or nothing at all is changed. As soon as one error occurs in one of the data manipulations, the entire operation is rolled back.
The Digital Twin Registry Bulk API provides offset pagination and cursor pagination, both methodologies partition the entities of a larger dataset, based on various criteria.
Offset pagination is the "traditional" way of paginating through a dataset. It gives the user slightly finer control over the iteration, insofar as e.g. it presents the option to select the desired page index.
Cursor pagination is broadly intended for continuous pagination and therefore lacks the option of selecting a specific page index, in favor of basing the pagination on a specific cursor, provided by the back-end in the first response (assuming the dataset has more than one page).
In cursor pagination, once the client obtains the first page and a cursor for the next one, it can send the next request with that cursor as an argument, in order to fetch the next page.
Cursor pagination avails of logarithmic solutions to scroll through a sorted dataset, which tends to perform increasingly better than offset pagination, the larger the dataset and the closer to its end data is being fetched.
In other words, cursor pagination is preferable to offset pagination in the vast majority of use cases.
The endpoints feature both offset and cursor pagination based on the request parametrization: if RQL limit(x,y)
is used, offset pagination will be used - conversely, if the limit
and cursor
arguments are used in the request body, cursor pagination will be used.
The criterion common to both methodologies is the size of the page, expressed as:
limit
function (e.g. limit(x, *y*)
) for offset-based paginationlimit
argument expressed in the request body for using cursor pagination (e.g. "limit": 50
)The API offers currently one form of authentication:
Creates all Twins.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object that contains a list of Twins to create.
required | Array of objects (DigitalTwinCreateDto) unique |
{- "items": [
- {
- "twinType": "Bosch Nexo cordless Wi-Fi nutrunner",
- "twinCategory": "Drill",
- "description": "On Nexo the complete control unit is in the nutrunner – the first of its kind.",
- "manufacturer": "Bosch",
- "localIdentifiers": [
- {
- "localIdentifierKeyPairs": [
- {
- "key": "string",
- "value": "string"
}
]
}
], - "labels": [
- "string"
], - "groups": [
- "5821L"
], - "twinKind": "INSTANCE"
}
]
}
{- "created": 50,
- "createdIds": [
- 0
]
}
Deletes all Twins. Twins to be deleted are specified by a list of Twin IDs.
If one or more of the Twin Ids do not exist, the operation succeeds nevertheless without error
(the resulting state after delete would be the same as if these Twins existed).
Maximum 5000 can be deleted.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an operation that will delete all Twins with the given Ids.
items required | Array of integers <int64> non-empty unique [ items <int64 > ] |
{- "items": [
- "12L",
- "13L"
]
}
{- "totalAffectedItems": 50,
- "itemCount": 50
}
Performs a partial update on all Twins. The Twins are identified by a list of Twin Ids.
Only properties present in the payload will be updated, all other properties will be left intact.
The set of Labels, if present, denotes the desired target state. Any Labels already present on the Twin and not listed here will be deleted.
The API uses the JSON Merge Patch convention see https://datatracker.ietf.org/doc/html/rfc7386.
Maximum 20.000 Twins can be deleted.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an operation that will patch all Twins with the given Ids.
twinType | string or null <= 128 characters The type of the Twin |
twinCategory | string or null <= 128 characters The category of the Twin |
description | string or null <= 4000 characters Detailed description of the Twin |
manufacturer | string or null <= 128 characters Manufacturer of the physical asset represented by the Twin |
labels | Array of strings or null <= 10 items unique Labels of the Twin. Denotes the target state. Any labels already present on the Twin and not listed here will be deleted. |
groups | Array of integers or null <int64> (EntityId) <= 50 items unique Groups the Twin belongs to. Denotes the target state. Any groups already assigned to the Twin and not listed here will be unasigned. |
listOperator required | string (ListOperator) Default: "replace" Enum: "replace" "add" "remove" Operator to specify the kind of operation to perform on lists given within the body. Add/Remove operations featuring null or empty values produce no effect. Add/Remove operator adds / removes a single element. Replace replaces the entire list. |
twinKind | string or null Enum: "TYPE" "INSTANCE" "ROLE" "NOT_APPLICABLE" Kind of the Twin |
items required | Array of integers <int64> non-empty unique [ items <int64 > ] |
{- "twinType": "Bosch Nexo cordless Wi-Fi nutrunner",
- "twinCategory": "Drill",
- "description": "On Nexo the complete control unit is in the nutrunner – the first of its kind.",
- "manufacturer": "Bosch",
- "labels": [
- "string"
], - "groups": [
- "5821L"
], - "listOperator": "replace",
- "twinKind": "INSTANCE",
- "items": [
- "12L",
- "13L"
]
}
{- "totalAffectedItems": 50,
- "itemCount": 50
}
Deletes all Twins. Twins to be deleted are specified by an RQL query on Twin properties.
Maximum 5000 Twins can be deleted.
Example RQL queries:
{
"query": "filter=in(labels.name,\"Label\")"
}
{
"query": "filter=in(labels.name,\"Shared Label\")"
}
{
"query": "filter=in(labels.name,\"Label\")",
"limit": 10000
}
{
"query": "filter=in(labels.name,\"Label\")&option=limit(0,500)",
}
{
"query": "filter=in(labels.name,\"Label\")&option=limit(0,500)",
"cursor": <NEXT_CURSOR>,
"limit": 500
}
Note:
More information about RQL usage in Digital Twin Registry can be found in the Documentation.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an operation that will delete all Twins that match the given Twin RQL query.
query required | string RQL query string. For more examples, see operation description above. |
cursor | string set cursor to nextCursor returned by the previous call to list items in the next page. |
limit | integer <int32> [ 1 .. 500 ] the size of the requested page. Defaults to the maximum quota defined for the endpoint. |
{- "query": "filter=in(labels.name,\"Label\")",
- "cursor": "MjAzNA==",
- "limit": 1
}
{- "totalAffectedItems": 50,
- "queryMatchCount": 50,
- "nextCursor": "MjAzNA=="
}
Performs a partial update on all Twins.
The Twins are identified by an RQL query where all matching Twins will be updated. Only properties present in the payload will be updated, all other
properties will be left intact.
The set of Labels, if present, denotes the desired target state. Any Labels already present on the Twin and not listed here will be deleted.
The API uses the JSON Merge Patch convention - RFC 7386.
Maximum 20.000 Twins can be updated.
Example RQL queries:
{
"query": "filter=in(labels.name,\"Label\")"
}
{
"query": "filter=in(labels.name,\"Shared Label\")"
}
{
"query": "filter=in(labels.name,\"Label\")",
"limit": 30000
}
{
"query": "filter=in(labels.name,\"Label\")&option=limit(0,500)",
}
{
"query": "filter=in(labels.name,\"Label\")&option=limit(0,500)",
"cursor": <NEXT_CURSOR>,
"limit": 500
}
Note:
More information about RQL usage in Digital Twin Registry can be found in the Documentation.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an operation that will patch all Twins that match the given Twin RQL query.
twinType | string or null <= 128 characters The type of the Twin |
twinCategory | string or null <= 128 characters The category of the Twin |
description | string or null <= 4000 characters Detailed description of the Twin |
manufacturer | string or null <= 128 characters Manufacturer of the physical asset represented by the Twin |
labels | Array of strings or null <= 10 items unique Labels of the Twin. Denotes the target state. Any labels already present on the Twin and not listed here will be deleted. |
groups | Array of integers or null <int64> (EntityId) <= 50 items unique Groups the Twin belongs to. Denotes the target state. Any groups already assigned to the Twin and not listed here will be unasigned. |
listOperator required | string (ListOperator) Default: "replace" Enum: "replace" "add" "remove" Operator to specify the kind of operation to perform on lists given within the body. Add/Remove operations featuring null or empty values produce no effect. Add/Remove operator adds / removes a single element. Replace replaces the entire list. |
twinKind | string or null Enum: "TYPE" "INSTANCE" "ROLE" "NOT_APPLICABLE" Kind of the Twin |
query required | string RQL query string. For more examples, see operation description above. |
cursor | string set cursor to nextCursor returned by the previous call to list items in the next page. |
limit | integer <int32> [ 1 .. 500 ] the size of the requested page. Defaults to the maximum quota defined for the endpoint. |
{- "twinType": "Bosch Nexo cordless Wi-Fi nutrunner",
- "twinCategory": "Drill",
- "description": "On Nexo the complete control unit is in the nutrunner – the first of its kind.",
- "manufacturer": "Bosch",
- "labels": [
- "string"
], - "groups": [
- "5821L"
], - "listOperator": "replace",
- "twinKind": "INSTANCE",
- "query": "filter=in(labels.name,\"Label\")",
- "cursor": "MjAzNA==",
- "limit": 1
}
{- "totalAffectedItems": 50,
- "queryMatchCount": 50,
- "nextCursor": "MjAzNA=="
}
Creates the given Twins, provided they to not yet exist in the registry. Assumes a Twin exists if at least one of the local identifiers match a local identifier of a Twin in the registry. Existing Twins will not be touched.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object that contains a list of Twins to create.
required | Array of objects (DigitalTwinCreateDto) unique |
{- "items": [
- {
- "twinType": "Bosch Nexo cordless Wi-Fi nutrunner",
- "twinCategory": "Drill",
- "description": "On Nexo the complete control unit is in the nutrunner – the first of its kind.",
- "manufacturer": "Bosch",
- "localIdentifiers": [
- {
- "localIdentifierKeyPairs": [
- {
- "key": "string",
- "value": "string"
}
]
}
], - "labels": [
- "string"
], - "groups": [
- "5821L"
], - "twinKind": "INSTANCE"
}
]
}
{- "created": 50,
- "createdIds": [
- 0
]
}
Creates the given Twins, provided they do not exist in the registry. Assumes a Twin exists if at least one
of the local identifiers match a local identifier of a Twin in the registry.
Existing Twins should be updated, but this is currently not supported.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object that contains a list of Twins to create.
required | Array of objects (DigitalTwinCreateDto) unique |
{- "items": [
- {
- "twinType": "Bosch Nexo cordless Wi-Fi nutrunner",
- "twinCategory": "Drill",
- "description": "On Nexo the complete control unit is in the nutrunner – the first of its kind.",
- "manufacturer": "Bosch",
- "localIdentifiers": [
- {
- "localIdentifierKeyPairs": [
- {
- "key": "string",
- "value": "string"
}
]
}
], - "labels": [
- "string"
], - "groups": [
- "5821L"
], - "twinKind": "INSTANCE"
}
]
}
{- "totalAffectedItems": 50,
- "created": 50,
- "updated": 50
}
Creates all Aspects for each Twin that match the RQL query on Twin properties.
Limit for creation is 4000 Aspects.
Example RQL queries:
{
"query": "filter=in(labels.name,\"Label\")"
}
{
"query": "filter=in(labels.name,\"Shared Label\")"
}
{
"query": "filter=in(labels.name,\"Label\")",
"limit": 5000
}
{
"query": "filter=in(labels.name,\"Label\")&option=limit(0,500)",
}
{
"query": "filter=in(labels.name,\"Label\")&option=limit(0,500)",
"cursor": <NEXT_CURSOR>,
"limit": 500
}
Note:
More information about RQL usage in Digital Twin Registry can be found in the Documentation.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an operation that will create all given Aspects for all Twins that match the given Twin RQL query.
required | Array of objects (AspectCreateDto) unique |
query required | string RQL query string. For more examples, see operation description above. |
cursor | string set cursor to nextCursor returned by the previous call to list items in the next page. |
limit | integer <int32> [ 1 .. 500 ] the size of the requested page. Defaults to the maximum quota defined for the endpoint. |
{- "items": [
- {
- "modelReference": {
- "urn": "urn:samm:com.bosch.nexeed.digitaltwin:1.0.0#Errors"
}, - "httpEndpoints": [
- {
- "subprotocolBody": "id=123;dspEndpoint=http://edc.control.plane/",
- "type": "READ"
}
], - "mqttEndpoints": [
- {
- "brokerAddress": "tcp://broker.mqttdashboard.com:1883",
- "responseTopicName": "errors",
- "requestTopicName": "errors",
- "type": "READ"
}
]
}
], - "query": "filter=in(labels.name,\"Label\")",
- "cursor": "MjAzNA==",
- "limit": 1
}
{- "totalAffectedItems": 50,
- "queryMatchCount": 50,
- "nextCursor": "MjAzNA=="
}
Deletes all Aspects for each Twin that match the RQL query on Twin properties.
Limit of matched Twins are 4000.
Example RQL queries:
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")"
}
{
"query": "filter=in(digitalTwin.labels.name,\"Shared Label\")"
}
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")",
"limit": 10000
}
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")&option=limit(0,500)",
}
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")&option=limit(0,500)",
"cursor": <NEXT_CURSOR>,
"limit": 500
}
Note:
More information about RQL usage in Digital Twin Registry can be found in the Documentation.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an operation that will delete all Aspects that match the given Aspect RQL query.
query required | string RQL query string. For more examples, see operation description above. |
cursor | string set cursor to nextCursor returned by the previous call to list items in the next page. |
limit | integer <int32> [ 1 .. 500 ] the size of the requested page. Defaults to the maximum quota defined for the endpoint. |
{- "query": "filter=in(labels.name,\"Label\")",
- "cursor": "MjAzNA==",
- "limit": 1
}
{- "totalAffectedItems": 50,
- "queryMatchCount": 50,
- "nextCursor": "MjAzNA=="
}
Performs a partial update on all Aspects.
The Aspects are identified by an RQL query on Aspect properties. Currently just the model reference will be updated, all other properties will be left
intact.
The API uses the JSON Merge Patch convention - RFC 7386.
Maximum 4000 aspects can be updated.
Example RQL queries:
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")"
}
{
"query": "filter=in(digitalTwin.labels.name,\"Shared Label\")"
}
{
"query": "eq(modelReference.urn,\"urn:samm:com.bosch.nexeed.digitaltwin:1.0.0#Errors\")",
"limit": 10000
}
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")&option=limit(0,500)",
}
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")&option=limit(0,500)",
"cursor": <NEXT_CURSOR>,
"limit": 500
}
Note:
More information about RQL usage in Digital Twin Registry can be found in the Documentation.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an update to the given model URN for all Aspects that match the given Aspect RQL query.
required | object (ModelReferenceCreateReplaceDto) Model reference of the Aspect |
query required | string RQL query string. For more examples, see operation description above. |
cursor | string set cursor to nextCursor returned by the previous call to list items in the next page. |
limit | integer <int32> [ 1 .. 500 ] the size of the requested page. Defaults to the maximum quota defined for the endpoint. |
{- "modelReference": {
- "urn": "urn:samm:com.bosch.nexeed.digitaltwin:1.0.0#Errors"
}, - "query": "filter=in(labels.name,\"Label\")",
- "cursor": "MjAzNA==",
- "limit": 1
}
{- "totalAffectedItems": 50,
- "queryMatchCount": 50,
- "nextCursor": "MjAzNA=="
}
Deletes all Aspects that match the RQL query on Aspect properties.
Maximum 4000 Aspects can be deleted.
Example RQL queries:
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")"
}
{
"query": "filter=in(digitalTwin.labels.name,\"Shared Label\")"
}
{
"query": "eq(modelReference.urn,\"urn:samm:com.bosch.nexeed.digitaltwin:1.0.0#Errors\")",
"limit": 10000
}
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")&option=limit(0,500)",
}
{
"query": "filter=in(digitalTwin.labels.name,\"Label\")&option=limit(0,500)",
"cursor": <NEXT_CURSOR>,
"limit": 500
}
Note:
More information about RQL usage in Digital Twin Registry can be found in the Documentation.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
Bulk object to define an operation that will delete all Aspects that match the given Aspect RQL query.
query required | string RQL query string. For more examples, see operation description above. |
cursor | string set cursor to nextCursor returned by the previous call to list items in the next page. |
limit | integer <int32> [ 1 .. 500 ] the size of the requested page. Defaults to the maximum quota defined for the endpoint. |
{- "query": "filter=in(labels.name,\"Label\")",
- "cursor": "MjAzNA==",
- "limit": 1
}
{- "totalAffectedItems": 50,
- "queryMatchCount": 50,
- "nextCursor": "MjAzNA=="
}
Creates all Aspects of a Twin.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
twinId required | integer <int64> Unique identifier of the Twin. |
Bulk object to define an operation that will create all given Aspects of a Twin.
required | Array of objects (AspectCreateDto) unique |
{- "items": [
- {
- "modelReference": {
- "urn": "urn:samm:com.bosch.nexeed.digitaltwin:1.0.0#Errors"
}, - "httpEndpoints": [
- {
- "subprotocolBody": "id=123;dspEndpoint=http://edc.control.plane/",
- "type": "READ"
}
], - "mqttEndpoints": [
- {
- "brokerAddress": "tcp://broker.mqttdashboard.com:1883",
- "responseTopicName": "errors",
- "requestTopicName": "errors",
- "type": "READ"
}
]
}
]
}
{- "created": 50,
- "createdIds": [
- 0
]
}
Replaces all Aspects of a Twin.
The Aspects defined in the payload will replace the existing Aspects of the Twin.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
twinId required | integer <int64> Unique identifier of the Twin. |
Bulk object to define an update of all given Aspects of a Twin.
required | Array of objects (AspectReplaceBulkDto) unique |
{- "items": [
- {
- "modelReference": {
- "urn": "urn:samm:com.bosch.nexeed.digitaltwin:1.0.0#Errors"
}, - "httpEndpoints": [
- {
- "subprotocolBody": "id=123;dspEndpoint=http://edc.control.plane/",
- "type": "READ"
}
], - "mqttEndpoints": [
- {
- "brokerAddress": "tcp://broker.mqttdashboard.com:1883",
- "responseTopicName": "errors",
- "requestTopicName": "errors",
- "type": "READ"
}
]
}
]
}
{- "totalAffectedItems": 50,
- "itemCount": 50
}
Deletes all Aspects of a Twin by a list of Aspects Unique identifiers.
Non-existent Aspects are ignored.
tenantId required | string <uuid> Unique identifier of the owning tenant. |
twinId required | integer <int64> Unique identifier of the Twin. |
Bulk object to define an operation that will delete all Aspects with the given Ids of a Twin.
items required | Array of integers <int64> non-empty unique [ items <int64 > ] |
{- "items": [
- "12L",
- "13L"
]
}