Add a Commodity Rule with Nls - Intergraph Smart Reference Data - Version 2020 (10.0) - Help - Intergraph

Intergraph Smart Reference Data REST API (2020)

Language
English
Product
Intergraph Smart Reference Data
Search by Category
Help
Smart Materials/Smart Reference Data Version
2020 (10.0)

Headers

Header name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/json

POST body

Element

Description

Type

Required

Notes

CommodityRuleName

Name of the commodity rule

String

Required

ControlStatus

Sets the control status of the commodity rule

Integer

Optional

Default is 1

NlsId

Language identifier

Integer

Required

ShortDescription

Short description of the table

String

Required

Description

Description of the table

String

Required

Sample request

POST https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules

{

"CommodityRuleName": "Add_CRNLS",

"ControlStatus": 1,

"CommodityRuleNls": [

{

"NlsId": 1,

"ControlStatus": 1,

"ShortDescription": "No Rating Fittings",

"Description": "No Rating Fittings"

}

]

}

Response

Element

Description

Type

Notes

CommodityRuleId

A unique ID for the commodity rule.

Integer

Project

The project or product group from where the table is retrieved.

String

CommodityRuleName

Name of the commodity rule

String

ControlStatus

Retrieves the control status of the instance.

Sample Response

{

"@odata.context":

"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules/$entity",

"CommodityRuleId": 5544,

"Project": "SDB",

"CommodityRuleName": "ADDD_CRNLS",

"ControlStatus": 1,

}

Use the following sample GET method to view the associated commodity rule and the Nls that you have created:

GET

https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules(5544)?$expand=CommodityRuleNls

Where ?$expand=CommodityRuleNls is the query to retrieve the associated Nls records along with the commodity rule.

SHARED Tip You can also query using https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules(5544/CommodityRuleNls URI request.