This API retrieves the item types of a project from Smart Materials. You can either retrieve a single item type using item type Id or all the item types of a project.
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')/ItemTypes({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 item type Id (ItyId).
To retrieve all the item types of a project, use the following URL:
GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/ItemTypes
Sample Code
GET https://{host}/Smat/V1/Projects(‘RS’)/Disciplines(‘PIPING’)/Nls(‘English’)/ItemTypes(500017)
Success Response
Status: 200 OK
Content:
{
"@odata.context": "https://{host}/Smat/V1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/ItemTypes",
"value":[
{
"ItyId":500017,
"ProjId":"PG",
"ItyCode":"STD W TAG",
"ItemRule":"SWT"
}]
}
Element |
Description |
Type |
---|---|---|
ItyId |
Unique ID of the retrieved item type |
Integer |
ProjId |
Unique ID of the Project. Retrieved item type belongs to this Project. |
String |
ItyCode |
Code or name of the item type |
String |
ItemRule |
Name of the item rule. Available options are:
|
String |