Edit an Nls - Intergraph Smart Reference Data - Help - Intergraph

Intergraph Smart Reference Data REST API (10.2)

Language
English
Product
Intergraph Smart Reference Data
Search by Category
Help
Smart Materials/Smart Reference Data Version
10.2

Headers

Header name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/json

PUT body

Element

Description

Type

Required

Notes

AttributeGroupName

Identifies the attribute group which the current attribute is assigned to

String

Required

Attribute group name must be specified in uppercase

AttributeName

Name of the new attribute

String

Required

Attribute name must be specified in uppercase

DataWidh

Max data length of the field. The Length depends on the physical column that the attribute is assigned to.

Integer

Required

The maximum width is 14, for character(attr_char), the maximum width is 255, and for Geom-in/Outs it is 60.

FormWidth

Size of display item in user interface

String

Required

Unit

Lookup unit

String

Required

NlsId

Language identifier

Integer

Required

LabelText

Label of the attribute

String

Required

HintText

Hint text that you want to apply for the attribute

String

Required

HelpText

Help text for the attribute

String

Optional

Default is NULL

Sample request

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

AttributeId is the unique id to which you want to edit the attribute

Authorization: Bearer <Access Token>

Content-Type: application/json

{

"AttributeName": "EDIT_ATTRIBUTE",

"AttributeGroupName": "STR ATTR",

"FormWidth": 13,

"DataWidth": 12,

"Precision": null,

"Unit": "-",

"AttributeNls":[

{

"NlsId": 1,

"LabelText": "EDIT_IDENT_CODE",

"HintText": "IDENT_CODE",

"HelpText": "IDENT_CODE"

},

{

"NlsId": 2,

"LabelText": "IDENT_CODE",

"HintText": "IDENT_CODE",

"HelpText": "Ident1"

}

]

}

Response

Element

Description

Type

Required

Notes

AttributeGroupName

Identifies the attribute group which the current attribute is assigned to

String

Required

Attribute group name must be specified in uppercase

AttributeName

Name of the new attribute

String

Required

Attribute name must be specified in uppercase

DataWidh

Max data length of the field. The Length depends on the physical column that the attribute is assigned to.

Integer

Required

The maximum width is 14, for character(attr_char), the maximum width is 255, and for Geom-in/Outs it is 60.

FormWidth

Size of display item in user interface

String

Required

Unit

Lookup unit

String

Required

NlsId

Language identifier

Integer

Required

LabelText

Label of the attribute

String

Required

HintText

Hint text that you want to apply for the attribute

String

Required

HelpText

Help text for the attribute

String

Optional

Default is NULL

To view the updated Nls data, use the GET method. For example,

GET

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

Where ?$expand=AttributeNls is the query to retrieve Nls records along with the attribute

Sample response

{

"@odata.context":

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

"value": [

{

"AttributeId": 17979,

"AttributeName": "ADD_ATTRIBUTE",

"AttributeTypeId": 5162,

"AttributeGroupName": "STR ATTR",

"Project": "SDB",

"DataType": "CHAR",

"Required": "ON",

"FormWidth": 13,

"DataWidth": 12,

"Precision": null,

"MetrEngl": "S.40.04.01",

"UnitId": 5282,

"Unit": "-",

"AttributeNls@odata.context":

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

"AttributeNls": [

{

"AttributeId": 17982,

"NlsId": 2,

"LabelText": "EDIT_IDENT_CODE",

"HintText": "IDENT_CODE",

"HelpText": "Ident1"

},

{

"AttributeId": 17982,

"NlsId": 1,k

"LabelText": "EDIT_IDENT_CODE",

"HintText": "IDENT_CODE",

"HelpText": "IDENT_CODE"

}

]

}

]

}