Add a Table with Table Attribute and 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

TableName

Name of the new table that you want to create

String

Required

TableType

Identifies the table type which the current table is assigned to

String

Required

Table type must be in uppercase

AttributeId

The associated attribute ID of the table

PhysicalAttribute

A fixed list of hardcoded values that relate the attribute to a database column

Required

KindOfAttribute

A fixed list of hardcoded values that indicate the usage/meaning of the attribute

String

Required

Available values are '1NS', '2NS', '1SCH', '2SCH', 'NP', 'SRFR', 'SRTO', 'OT', 'BDIA'

Unit

Value of the Unit instance

String

Required

This is the unit measure of the attribute

Required

Specifies if this a required field

String

Required

Use 'ON' or 'OFF'

NlsId

Language identifier

Integer

Required

ShortDescription

Short descriptive text

String

Required

Description

Descriptive text

String

Required

Sample request

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

{

"TableName": "ADD_MYTABLE",

"TableType": "GEOM_S4010",

"TableAttributes": [

{

"AttributeId": 6059,

"PhysicalAttribute": "GD.IN1",

"KindOfAttribute": "1NS",

"Unit": "-",

"Required": "OFF"

},

{

"AttributeId": 6060,

"PhysicalAttribute": "GD.IN2",

"KindOfAttribute": "OT",

"Unit": "-",

"Required": "ON"

}

],

"TableNls": [

{

"NlsId": 1,

"ShortDescription": "MY_SD",

"Description": "MY-D"

},

{

"NlsId": 11,

"ShortDescription": "MY_SD",

"Description": "MY-D"

}

]

}

Response

Element

Description

Type

Notes

TableId

A unique ID for the table.

Integer

Generated by the software

Project

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

String

TableName

Name of the table

String

TableTypeId

A unique ID for the table type.

Integer

Generated by the software

TableType

Identifies the table type which the current table is assigned to.

String

NlsId

Language identifier

Integer

Required

ShortDescription

Short description of the table

String

Required

Description

Description of the table

String

Required

Sample response

{

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

"TableId": 11120,

"Project": "SDB",

"TableName": "ADD_MYTABLE",

"TableTypeId": 5082,

"TableType": "GEOM_S4010",

}

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

GET https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/Tables(11120)?$expand=TableAttributes,TableNls

Where ?$expand=TableAttributes,TableNls is the query to retrieve the associated Nls records along with the table details.