Views

Create or update views

Required capabilities: dataModelsAcl:WRITE

Add or update (upsert) views. For unchanged view specifications, the operation completes without making any changes. We will not update the lastUpdatedTime value for views 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

Views to add or update.

required
Array of View (object) or Record View (object) [ 1 .. 100 ] items

List of views to create/update

Responses
200

List of views

400

The response for a failed request.

409

View conflict

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

List views defined in the project

Required capabilities: dataModelsAcl:READ

List of views defined in the current project. You can filter the list by specifying a 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
space
string [ 1 .. 43 ] characters (?!^(space|cdf|dms|pg3|shared|system|node|edg...

The space to query.

Example: space=timeseries
includeInheritedProperties
boolean
Default: true

Include properties inherited from views this view implements.

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

usedFor
Array of strings (UsedFor) unique

Only include entities that have been marked as used for the specified purposes. Defaults to [node, edge, all]

Items Enum: "node" "edge" "record" "all"
Example: usedFor=node&usedFor=edge&usedFor=all&usedFor=record
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 views

400

The response for a failed request.

get/models/views
Request samples
view_list = client.data_modeling.views.list(limit=5)

for view in client.data_modeling.views:
    view # do something with the view

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

Retrieve views by their external ids

Required capabilities: dataModelsAcl:READ

Retrieve up to 100 views by their external ids.

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

Include properties inherited from views this view implements.

Request Body schema: application/json
required

List of external-ids of views to retrieve.

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

List of views

400

The response for a failed request.

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

Delete views

Required capabilities: dataModelsAcl:WRITE

Delete one or more views. Currently limited to 100 views at a time.

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 views you want 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/views/delete
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}