Create a Workpackage - Intergraph Smart Materials - Version 2017 R2 (2.2) - Help - Hexagon

Intergraph Smart Materials Web API Help 2017 R2 (2.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Version Smart Materials Web API
2017 R2 (2.2)

This API creates a work package in the given project of the Smart Materials.

Required Privilege: API_CREATE_FAHEADER

Headers

Header Name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/JSON

Body

URL: POST https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/Workpackages

Specify the values for the project, discipline, and language in the URL. The project, discipline, and language together, define the project environment where the work package is created.

Element

Description

Type

Required

Notes

WpCode

Name of the work package

String

Required

Maximum allowed length is 30.

PriorityType

Priority type specified for the given work package in the current forecast/reservation run.
Allowed values are:

  • ATTRIBUTE

  • WEIGHT(CIP)

  • INSTALL_PAY_ITEM(CIP)

  • ISSUED FIRST

  • WORK PACKAGE.

String

Optional

Default value is
WORK PACKAGE.

Aqc1Id

Represents the unique ID of the "Where condition for Ident query"
that is mapped to list positions.

Integer

Optional

Aqc2Id

Represents the unique ID of the "Where condition for List Pos query "
that is mapped to idents.

Integer

Optional

Aqc3Id

Represents the unique ID of the "Where Condition for Mandatory LP query"
that is mapped to mandatory LP.

Integer

Optional

Aqc4Id

Represents the unique ID of the "Where Condition for CIP (List Pos) query"
that is used for Shortage Option 2-Pass CIP.

Integer

Optional

Aqc5Id

Represents the unique ID of the "Where Condition for CIP (Ident) query"
that is used for Shortage Option 2-Pass CIP.

Integer

Optional

AttrId

Unique ID of the attribute

Integer

Optional

If PriorityType is ATTRIBUTE, WEIGHT(CIP),
or INSTALL_PAY_ITEM(CIP), then
AttrId is required.

ROSDate

Date and time when the work package is Required on Site

Date Time Offset

Optional

Name

Name of the user who is responsible for this work package.

String

Optional

If name is not passed, current logged
in username is considered.

BOMDetails

Details of the BOM nodes that are assigned to a work package.

Collection

Optional

You can expand this element using OData query option to view the details.

  • BOMDetails

Element

Description

Type

Required

Notes

OrderSeq

Sequence of the work packages considered while forecast/reservation run.

Integer

Optional

Allowed values lies between 0-99999.

LnId

Unique ID of the list node.

  • You can assign only those list nodes that are selected and assigned in screen C.10.18 for the login discipline.

  • If, no list node is assign on C.10.18 screen, then you can assign list nodes from B.20.03 screen.

Integer

Optional

Sample Code

POST https://localhost:51531/SMAT/V1/Projects('RS')/Disciplines('PIPING')/Nls('English')/WorkPackages

{

"WpCode": "IDK21",

"PriorityType": "WORK PACKAGE",

"Aqc1Id": 56781,

"Aqc2Id": 52423,

"Aqc3Id": 52424,

"Aqc4Id": 12345,

"Aqc5Id": 8878,

"AttrId": 1212,

"ROSDate": null,

"Name": "RW",

"BOMDetails":[

{

"OrderSeq": 1,

"LnId" :98258,

}

]}

Succes Response

Status: 201 Created

{

"@odata.context": "https://localhost:51531/SMAT/V1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/WorkPackages?$expand=BOMDetail",

"WpId": 5100,

"WpCode": "IDK21",

"LockedInd": "N",

"PriorityType": "WORK PACKAGE",

"WpType": "S",

"Aqc1Id": 56781,

"Aqc2Id": 52423,

"Aqc3Id": 52424,

"Aqc4Id": 12345,

"Aqc5Id": 8878,

"AttrId": 1212,

"ROSDate": null,

"EndDate": "2019-09-11T00:00:00+05:30",

"Name": "RW"

"BOMDetails": [

{

"WpdId":5200,

"OrderSeq": 1,

"LnId": 100059367,

"BOMPath" :"/X1/Y1/Z1"

}

]}

Element

Description

Type

WpType

Defines the type of the work package.

Available values are S and D.

  • S: Work package belongs to SITE module

  • D: Work package belongs to BOM module.

Default value is S.

Workpackage with WpType (S) are only retrieved.

String

LockedInd

Indicates whether a work package is locked or not.
Available values are Y and N.

  • If value is set to Y, you cannot edit any field nor
    add or delete any list nodes of a work package.

Default value is N.

String

WpId

Unique ID of the created work package

Integer

BOMPath

BOM path of the list node

String

EndDate

Individual end date for the work package

Date Time Offset