Units (Units) - Intergraph Smart Materials - Version 2017 R2 (2.2) - Help - Hexagon

Intergraph Smart Materials Web API Help 2017 R2 (2.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Version Smart Materials Web API
2017 R2 (2.2)

This API retrieves the units from Smart Materials. You can either retrieve a single unit using unit Id or all the units.

Required Privilege: API_READONLY

Headers

Header Name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/JSON

Body

URL Format: GET https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/Units({key})

Specify values for the project, discipline, language, and key parameter in the URL. The project, discipline, and language together, define the project environment and the key parameter defines the unit Id (UnitId).

To retrieve all the units, use the following URL:

GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/Units

Sample Code

GET https://{host}/Smat/V1/Projects(‘RS’)/Disciplines(‘PIPING’)/Nls(‘English’)/Units(500126)

Success Response

Status: 200 OK

Content:

{

"@odata.context": "https://{host}/Smat/V1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/Units"

"value":[

{

"UnitId":500126,

"UgId":5002,

"UnitCode":"SET",

"Precision":null

}]

}

Element

Description

Type

UnitId

Unique ID of the unit

Integer

UgId

Unique ID of the unit group

Integer

UnitCode

Unique unit code/name

String

Precision

Value is passed for unit groups like currency that is used for calculations.

Byte