Data models

Create or update data models

Required capabilities: dataModelsAcl:WRITE

Add or update (upsert) data models. For unchanged data model specifications, the operation completes without making any changes. We will not update the lastUpdatedTime value for models that remain unchanged.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json
required

List of data models to add

required
Array of objects (DataModelCreate) [ 1 .. 100 ] items

List of data models to create/update

Responses
200

List of data models

400

The response for a failed request.

409

Data model conflict

post/models/datamodels
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

List data models defined in the project

Required capabilities: dataModelsAcl:READ

List data models defined in the project. You can filter the returned models by the specified space.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 10

Limit the number of results returned. The largest result-set returned by the server will be 1000 items, even if you specify a higher limit.

cursor
string

Cursor for paging through results. In general, if a response contains a nextCursor property, it means that there may be more results, and you should pass that value as the cursor parameter in the next request.

Note that the cursor may or may not be encrypted, but either way, it is not intended to be decoded. Its internal structure is not a part of the public API, and may change without notice. You should treat it as an opaque string and not attempt to craft your own cursors.

Example: cursor=4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo
inlineViews
boolean
Default: false

Should we expand the referenced views inline in the returned result.

space
string [ 1 .. 43 ] characters (?!^(space|cdf|dms|pg3|shared|system|node|edg...

The space to query.

Example: space=timeseries
allVersions
boolean
Default: false

If all versions of the entity should be returned. Defaults to false which returns the latest version, attributed to the newest 'createdTime' field

includeGlobal
boolean
Default: false

If the global items of the entity should be returned. Defaults to false which excludes global items.

Responses
200

List of data models

400

The response for a failed request.

get/models/datamodels
Request samples
data_model_list = client.data_modeling.data_models.list(limit=5)

for data_model in client.data_modeling.data_models:
    data_model # do something with the data_model

for data_model_list in client.data_modeling.data_models(chunk_size=10):
    data_model_list # do something with the data model
Response samples
application/json
{
  • "items": [
    ],
  • "nextCursor": "string"
}

Retrieve data models by their external ids

Required capabilities: dataModelsAcl:READ

Retrieve up to 100 data models by their external ids. Views can be auto-expanded when the InlineViews query parameter is set.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
query Parameters
inlineViews
boolean
Default: false

Should we expand the referenced views inline in the returned result.

Request Body schema: application/json
required

List of external-ids of data models to retrieve.

One of:
required
Array of objects [ 1 .. 100 ] items
Responses
200

List of data models

400

The response for a failed request.

post/models/datamodels/byids
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

Delete data models

Required capabilities: dataModelsAcl:WRITE

Delete one or more data models. Currently limited to 100 models at a time. This does not delete the views, nor the containers they reference.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json
required

List of references to data models you wish to delete

required
Array of objects [ 1 .. 100 ] items
Responses
200

Items affected by the request

400

The response for a failed request.

post/models/datamodels/delete
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}