OData syntax examples using Web API v3 - 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.

The following OData syntax examples use the Web API v3 to create a specific GET, POST, PATCH, PUT, or DELETE request. The examples can be re-configured to match your own system metadata. All examples use a short notation of the full URL, . . api/v3/ADW/Development Tags.

How to construct a URL using OData syntax

When you create a URL using OData syntax, the URL is made up of segments to cover each parameter and provides the ability to interact, automate, and simplify complex repetitive tasks using the standard GET, POST, PATCH, PUT, and DELETE request methods.

When you use Web API v1, v2, or v3, the full OData URL for HxGN SDx is made up of the following segments:

Post https://<MachineName>/<SiteName>/api/v2/<APIGroupName>/<ExposedName>

The following descriptions apply to the segment parameters.

Parameter

Description

<MachineName>

The name of the machine where the software is running and being hosted. Displayed as [host] in the examples.

<SiteName>

The name given to the site when it was created on the server.

<APIGroupName>

The name of an existing APIGroup or you can create a group for functionality according to the product or product area.

For example, you can create an APIGroup with a name of TMA and relate the Tag, Model, Asset, class definitions or interface definitions to the TMA group.

<ExposedName>

The name of the object type you want to work with.

For example, the exposed named values for SPFClassDefIsExposedName, SPFInterfaceDefIsExposedName, SPFRelDefIsExposed, or SPFEdgeDefIsExposed.

All examples displayed use a short annotation version of the full URL. For example, . . /api/v2/TMA/DevelopmentTags.

The Web API v3 does not use relationship direction terminology in the syntax, such as _12 or _21. To expose the navigation properties (reldefs/edgedefs) of an entity in the OData metadata, the end entity of each of the relationship or edge definitions must be exposed in the metadata.

The end entity can be exposed using either an interface definition or a class definition. For more information on exposing relationships, see Exposing relationships.