BulkUpdate - Intergraph Smart 3D Web API - Customization & Programming - Hexagon PPM

Intergraph Smart 3D Web API Programmers Reference

Language
English
Product
Intergraph Smart 3D Web API
Subproduct
Smart 3D Web APIs
Search by Category
Customization & Programming
Smart 3D Version
12.1 (2019)

Used to perform updates on multiple entities in a single transaction. You must provide a list of entities to update and a projection of property values to set on each of these items. Functions like multiple PATCH requests combined in a single request - meaning update logic, including possible entity types and properties to update, should be the same as PATCH. Similar to PATCH, on success the items updated with their new values are returned.

POST https:/MyServer.Domain.com/s3d/v1/Sites('MySiteAlias')/Plants('MyPlant')/Com.Ingr.Smart3d.V1.BulkUpdate

{

"ids": [

"{0000272E-0000-0000-1F04-B0E9B7541306}",

"{0000272E-0000-0000-1F04-B0E9B7541307}"

],

"properties": {

"StringPropName": "MyStringValue",

"IntPropName": 1

},

"shouldCommitInErrorState": false

}

Parameter

Type

Description

ids

Collection<String>

Collection of ids of items to update

properties

Dynamic EDM Complex Object

Projection of property values to update. This can be treated like the body of a PATCH request. It should include the name of the properties to update as they appear in the results of a GET request with the values with the same format and type also as the GET request results.

shouldCommitInErrorState

Boolean

Optional, defaults to false, flag to indicate whether the transaction should succeed if the update generates one or more Error State ToDo Records (TDRs) on an entity being updated.

An error caused by the update of just one entity causes the entire transaction to fail. On a failed request, the client receives a generic message with either a 400 or 500 status code. However, the message also contains a line for each entity that caused an error. This line contains the entity ID, HTTP status code, and error message. Due to the descriptive nature of the error message and limitation of returning only one error message string per request, the client needs to parse this message if they want to obtain more descriptive status codes and details for each entity that. The error’s message property for a failure during update logic will be a string formatted as follows:

Overall error message including state of entities after request

<Id of failed entity #1> – <HTTP status code> – <error message>

<Id of failed entity #2> – <HTTP status code> – <error message>

... until last failure with each failure on a new line

Common Failure Reasons:

  • User does not have valid write permission

  • Entity not found

  • Property not found on a given entity

  • Property is read only

  • Entity not in working state

  • Smart 3D logic considers the property update with given value invalid

  • To Do Record generated on an entity being update (shouldCommitInErrorState must be set to false for this to be checked)