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.
|
String |
Optional |
Default value is |
Aqc1Id |
Represents the unique ID of the "Where condition for Ident query" |
Integer |
Optional |
|
Aqc2Id |
Represents the unique ID of the "Where condition for List Pos query " |
Integer |
Optional |
|
Aqc3Id |
Represents the unique ID of the "Where Condition for Mandatory LP query" |
Integer |
Optional |
|
Aqc4Id |
Represents the unique ID of the "Where Condition for CIP (List Pos) query" |
Integer |
Optional |
|
Aqc5Id |
Represents the unique ID of the "Where Condition for CIP (Ident) query" |
Integer |
Optional |
|
AttrId |
Unique ID of the attribute |
Integer |
Optional |
If PriorityType is ATTRIBUTE, WEIGHT(CIP), |
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 |
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.
|
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.
Default value is S. Workpackage with WpType (S) are only retrieved. |
String |
LockedInd |
Indicates whether a work package is locked or not.
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 |