Update - 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 following OData examples use the Web API v3 to update objects.

Update an object

Operator

Description

Example

Update an Object

This example updates an existing DEVSystem object, identified by ‘Key’, which is generally the Id of the object.

In this case the DEVHazardous property is set to false.

PATCH

. . /api/v3/DEVSystems(‘Key’)

Content-Type: application/json

{

"@odata.type": "#Intergraph.SPF.Server.API.Model.SPFFolder",

"DEVHazardous": false

}

Replace One-To-One Relationship (1-1)

Operator

Description

Example

Replace One To One Relationship (1-1)

This example sets or replaces a related object.

In this case the DevelopmentTag related to an SPFFolder is replaced through the OneToOneRel relationship.

PUT

. . /api/v3/SPFFolders(‘Key’)/OneToOneRel/$ref

Content-Type: application/json

{

"@odata.id": " . . /api/v3/DevelopmentTags(‘Key’)"

}

If an update is refused with an HTTP 428 (Precondition Required) error, you must pass the If-Match header with either a "*" value or the current ETag value for the entity instance. For example, "000000000000D2F3". You must not include the W/ or the escape characters.