OData service calls - HxGN SDx - Update 63 - Administration & Configuration - Hexagon

HxGN SDx API Services Configuration

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

The service calls shown in this document are only examples of the OData syntax that can be used to create a service call or POST. The object types in your system schema use different metadata for your own service calls or posts. To construct the OData syntax, you must have a good understanding of your own systems metadata and the schema model being used. The examples shown are examples only and show the short annotation version of the full URL. However, they can be modified for use in your instance of HxGN SDx.

For those starting on the services, here are some short notation examples of service call URLs.

Service call type

Example API Services URL

Tag in the SDx endpoint

. . /api/v2/SDx/Tags

Tags at the root level

. . /api/v2/Tags

Tags in v1

. . /api/v1/Tags

Tags of a specific class from the Objects endpoint

. . /api/v2/SDA/Objects?$filter=Class eq 'SPFNTag'

Filter for tags with name V-5001

. . /api/v1/Tags?$filter=Name eq 'V-5001'

Order By

. . /api/v1/Tags?$orderby=Name

Select

. . /api/v1/Tags?$select=Name

Returns all tags and only lists their names

Group By

. . /api/v2/Tags?$apply=groupby((Tag_Status),aggregate(Id with countdistinct as Count))

Returns Tags grouped by their Tag_Status and the count of properties returned (the Count parameter is optional).This call is only available on V2.

Count

. . /api/v1/Tags?$count=true

Expand

. . /api/v1/Plants?$expand=Functional_Areas

Single Object

. . /api/v1/Plants('002LUQA')

Navigation

. . /api/v1/Plants('002LUQA')/Functional_Areas

Navigation to an Edge Definition

. . /api/v2/SDA/Objects('002LUQB')/EDG_SPFFileComposition

Multiple Expansions

. . /api/v2/SDA/Objects('002LUQB')?$expand=SPFCompositeDocVersionComposition_12($expand=SPFFileComposition_21,$expand=EDG_VersionToolDocument)

You must use commas to separate the multiple expansions at the end.

Multiple functions in the same URL

. . /api/v2/SDA/Objects?$filter=contains(Interfaces, 'ISPFTemplateVersion')&$orderby=Name

You must use an ampersand to chain multiple functions together in the same URL.