Create MTR Header Description - Intergraph Smart Materials - Version 2017 (2.0) - Help - Hexagon PPM

Intergraph Smart Materials Web API Help 2017 (2.0)

PPMProduct
Intergraph Smart Materials
PPMCategory_custom
Help

Name and Description

Material Transfer Header Description – This API creates the description for an existing MTR Header in Smart Materials.

URL Format

/Projects (':project')/Disciplines(':discipline')/Nls(':language')/ TransferHeaders(:key)/Com.Ingr.Smat.V1.TransferDescription/

Specify values for project, discipline, language and key parameters in the URL. The first three values together define a project environment in which the MTR header is created. The key parameter defines the MTR header id, for which the description is created.

Use the following read-only APIs to get the available values for each parameter.

/Projects,

/projects(':project')/Disciplines,

/projects(':project')/Disciplines(':discipline')/nls

URL Parameter

:project, :discipline, :language, :key

Method

POST

Required Privilege

API_CREATE_MTRHEADER

Data Parameter

The payload of the request should be in JSON format with the following structure:

<Action Name="TransferDescription" IsBound="true">

<Parameter Name="bindingParameter"

Type="Com.Ingr.Smat.Core.V1.MaterialTransferHeader"/>

<Parameter Name="HeaderNls"

Type="Com.Ingr.Smat.Core.V1.HeaderDescription"/>

<ReturnType Type="Edm.Int64" Nullable="false"/>

</Action>

Below is the JSON structure of Com.Ingr.Smat.Core.V1.HeaderDescription type:

<ComplexType Name="HeaderDescription">

<Property Name="NlsId" Type="Edm.Decimal" Nullable="false"/>

<Property Name="ShortDesc" Type="Edm.String" Nullable="false"/>

<Property Name="Description" Type="Edm.String" Nullable="false"/>

</ComplexType>

Where:

NlsId: The NLS_ID field is required. Use the following URL to list the languages.

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

ShortDesc: The SHORT_DESC field is required. Maximum allowed length is 20 characters.

Description: The DESCRIPTION field is required. Maximum allowed length is 60 characters.

Example:

{

"HeaderNls":{

"NlsId":1,

"ShortDesc":"short description",

"Description": "this is the description of the MTR header"

}

}

Success Response

HTTP status code sent back to client on the API execution success: 
Code: 200 OK

Content:

{

"@odata.context": "https://{host}/Smat/V1/$metadata#Edm.Int64",

"value": 0

}

Error Response

This API may fail with the following error messages:

Error Code: 401 Unauthorized

Content:

{

"error": {

"code": "",

"message": "Authorization has been denied for this request." }

}

Error Code: 400 Bad Request

Content:

{

"error": {

"code": "",

"message": "Invalid/Missing input JSON data. Please refer metadata" }

}

Error Code: 400 Bad Request

Content:

{

"error": {

"code": "",

"message": "The request is invalid.",

"innererror": {

"message": "NLS_ID : The NLS_ID field is required.\r\nSHORT_DESC : The SHORT_DESC field is required.\r\nDESCRIPTION : The DESCRIPTION field is required.\r\n",

"type": "",

"stacktrace": "" }

}

}

Notes