Create WBS Code
POST /ws/rest/service/v2/wbs
Purpose
Create WBS Codes in a specific shell from a different system. Use this REST service to create and update WBS codes.
Notes:
- If you are creating a WBS sheet/codes manually by using the REST service, do not include a period (".") in the name of the shell when you create the shell. Because the shell name becomes part of the WBS path and WBS does not currently accept periods, the shell name cannot contain periods.
- Validations are not implemented for System Activity Sheet data in any of the API's assuming the data from source system is sent properly
Prerequisites
Ensure the following:
- You have the required WBS Sheet Services permissions under the Activity Manager.
- The Unifier shell is configured.
- The WBS sheet is configured.
Request Format
Send an request in the following format, wherein the "data" object can contain one or more - JSON Maps:
{
"options":{"source": "<value>", "project_number": "<value>", "sheetType": "<value>", "removeUnreferencedData": "<value>"}
"data":[{
"uuu_cmwbs_code":"<value>",
"uuu_cmwbs_name":"<value>",
"uuu_P6WBSPath": "<value>",
"uuu_cmwbs_status": "<value>",
"uuu_P6ETCComputeType": <value>,
"uuu_P6ETCUserValue": <value>",
"isETCApplicableToChild": flag}]
}
Request Parameters - Options Object
The following parameters can be specified in the "Options" object:
Request Parameter | Required? | Data Type | Description |
---|---|---|---|
source | Yes | String | The external application or data from which WBS codes will be populated. Valid values include: "Primavera Cloud" and "Others". |
project_number | Yes | String | A valid shell number with an Active status. |
sourceProjectId | Yes | String | The Oracle Primavera Cloud code. |
sheetType | Yes | String | Indicate the type of WBS sheet to be populated. Valid values include:
|
removeUnreferencedData | No | Boolean | Valid values include:
|
Request Parameters - Data Object
The following parameters can be specified in the "Data" object:
Request Parameter | Required? | Data Type | Description |
---|---|---|---|
uuu_cmwbs_code | Yes | String | The Id or code of the activity. This is expected to be unique for each activity in the activity sheet. |
uuu_cmwbs_name | Yes | String | Name of the WBS code. |
uuu_P6WBSPath | Yes | String | Path of the WBS Code in WBS sheet. |
uuu_P6ETCComputeType | No | Integer | Specify a value in the range 1 through 5.
|
uuu_P6ETCUserValue | No | Float | If the uuu_P6ETCComputeType parameter value in the request is between 1 to 4 , then this value is ignored in Unifier and is updated to 0.01. If the uuu_P6ETCComputeType parameter value in the request is 5 , then this value is accepted in Unifier. It will be a positive floating value. |
isETCApplicableToChild | No | boolean | Indicates if the ETC Technique type is to be applied to the child or not. Valid values include: "True" and "False". Defaults to "False" if a value is not provided. |
uuu_cmwbs_status | No | String | The status of WBS Code. Valid values include: "Active" and "Inactive". Defaults to "Active". |
Response Format
A JSON object is returned in the following format.
{
"data": [],
"message": [<list of messages>],
"status": <REST status code value>,
"rest_audit_id": <id from the audit table>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Sample Request For Manual Sheet-Type
For a Manual sheet-type, send a request in the following format:
Note: For the Manual sheet-type, the source should always be “Others”.
{
"options": {
"source": "Others",
"project_number": "P-0056", // Manual
"removeUnreferencedData":false,
"sheetType": "manual"
},
"data": [
{
"uuu_cmwbs_code": "A1083",
"uuu_cmwbs_name": "WBS1",
"uuu_P6WBSPath": "P-0056.A1083",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 5,
"isETCApplicableToChild" : true
},
{
"uuu_cmwbs_code": "A1084",
"uuu_cmwbs_name": "WBS2",
"uuu_P6WBSPath": "P-0056.A1083.A1084",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 5,
"isETCApplicableToChild" : true
}
]
}
Sample Success Response For Manual Sheet Type
A successful response with status code 200 displays in the following format:
{
"data": [
{
"id": 28852,
"uuu_cmwbs_code": "A1084",
"uuu_cmwbs_name": "WBS2",
"uuu_P6WBSPath": "P-0056.A1083.A1084",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 0.01
},
{
"id": 28851,
"uuu_cmwbs_code": "A1083",
"uuu_cmwbs_name": "WBS1",
"uuu_P6WBSPath": "P-0056.A1083",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 0.01
}
],
"message": [
"success"
],
"status": 200,
"rest_audit_id": 11870
}
Sample Success Request For System Sheet-Type
For a System sheet-type, send a request in the following format:
Note: For a System Sheet-type, the source must be “Primavera Cloud”.
{
"options": {
"source": "Primavera Cloud",
"sourceProjectId": "WBSSystem", // System
"project_number": "P-0056", // Manual
"removeUnreferencedData":false,
"sheetType": "System"
},
"data": [
{
"uuu_cmwbs_code": "A1083",
"uuu_cmwbs_name": "WBS1",
"uuu_P6WBSPath": "WBSSystem.A1083",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 5,
"isETCApplicableToChild" : true
},
{
"uuu_cmwbs_code": "A1084",
"uuu_cmwbs_name": "WBS2",
"uuu_P6WBSPath": "WBSSystem.A1083.A1084",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 5,
"isETCApplicableToChild" : true
}
]
}
Sample Response For System Sheet Type
A successful response with status code 200 displays in the following format:
{
"data": [
{
"id": 28852,
"uuu_cmwbs_code": "A1084",
"uuu_cmwbs_name": "WBS2",
"uuu_P6WBSPath": "WBSSystem.A1083.A1084",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 0.01
},
{
"id": 28851,
"uuu_cmwbs_code": "A1083",
"uuu_cmwbs_name": "WBS1",
"uuu_P6WBSPath": "WBSSystem.A1083",
"uuu_cmwbs_status": "Active",
"uuu_P6ETCComputeType": 4,
"uuu_P6ETCUserValue": 0.01
}
],
"message": [
"success"
],
"status": 200,
"rest_audit_id": 11868
}
Supported Validation Messages and Status Codes
The following validation messages and status codes display in the response when incorrect values are provided in the request:
Field Name | Use-case Scenario | Status Code | Error Message |
---|---|---|---|
source | source is not specified in the request. | 12007 | The API request is missing the required information: [source] |
source | source value is invalid. | 12008 | Invalid value was found in a field: [source]. Allowed values: [Primavera Cloud, Others]. |
source | source value is blank. | 12008 | Invalid value was found in a field: [source]. Allowed values: [Primavera Cloud, Others]. |
source | source is specified with a wrong data type such as boolean or integer. | 12035 | The API request contains empty value for: [source]. Allowed values: [Primavera Cloud, Others]. |
project_number | project_number is not specified in the request. | 12018 | The API request is missing the required information: [project_number]. |
project_number | project_number is invalid, blank, or not specified in the request. | 602 | Project/Shell Number is not correct. |
project_number | Project/Shell is not an active shell. | 1245 | Create/Update/Delete cannot be performed when project/shell status is Inactive or View-Only or On-Hold. |
project_number | project_number is empty/blank. | 12128 | The API request contains empty value for: [project_number]. |
sourceProjectid | sourceProjectId is not configured in the source Unifier shell. | 12021 | The API request contains an invalid value: [sourceProjectId]. Please check if this sourceProjectId has been configured in Unifier. |
sourceProjectid | sourceProjectId value is a blank. | 12032 | The API request contains empty value for: [sourceProjectId]. |
sourceProjectid | sourceProjectId is not specified in the request. | 12005 | The API request is missing the required information: [sourceProjectId] |
sheetType | sheetType is not specified in the request. | 12327 | The API request is missing the required information: [sheetType]. |
sheetType | sheetType value is invalid. | 12335 | Invalid value was found in a field: [sheetType]. Allowed values: [Manual, System]. |
sheetType | sheetType is specified with a wrong data type such as boolean or integer. | 12335 | Invalid value was found in a field: [sheetType]. Allowed values: [Manual, System]. |
sheetType | sheetType is empty/blank. | 12339 | The API request contains empty value for: [sheetType]. Allowed values: [Manual, System]. |
sheetType | sheetType is "Manual" and source is "Primavera Cloud"/"P6". | 12671 | Invalid value was found in a field: [sheetType]. If source=Primavera Cloud, allowed values: system. |
sheetType | sheetType is "System" and source is "Others". | 12671 | Invalid value was found in a field: [sheetType]. If source=Others, allowed value: Manual. |
removeUnreferencedData | removeUnreferencedData is specified with a wrong data type such as string or integer. | 12015 | Invalid value was found in a field: [removeUnreferencedData]. Allowed only boolean value. |
removeUnreferencedData | removeUnreferencedData is empty/blank. | 12031 | The API request contains an empty value for: [removeUnreferencedData]. Allowed only boolean value. |
uuu_cmwbs_code | uuu_cmwbs_code exceeds 120 characters. | 12301 | Invalid value was found in a field: [uuu_cmwbs_code]. Allowed length: [120]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_cmwbs_code | Duplicate uuu_cmwbs_code exists in the sheet. | 12302 | In the API request duplicate value was found in a field: [uuu_cmwbs_code]. Only unique value allowed for a [uuu_cmwbs_code] under a [uuu_P6WBSPath]. [uuu_cmwbs_code]: {uuu_cmwbs_code}. |
uuu_cmwbs_code | uuu_cmwbs_code is empty/blank. | 12303 | The API request contains empty value for: [uuu_cmwbs_code]. Allowed only string value or use quotations. |
uuu_cmwbs_code | uuu_cmwbs_code is not specified in the request. | 12304 | The API request is missing the required information: [uuu_cmwbs_code]. |
uuu_cmwbs_code | uuu_cmwbs_code is not specified in a string format. | 12305 | Invalid value was found in a field: [uuu_cmwbs_code]. Allowed only string value or use quotations. [uuu_cmwbs_code]: {uuu_cmwbs_code}. |
uuu_cmwbs_code | uuu_cmwbs_code contains a [.] character. | 12306 | Invalid character was found in a field: [uuu_cmwbs_code]. This field should not contain character: '.' . [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_cmwbs_name | uuu_cmwbs_name exceeds 120 characters | 12307 | Invalid value was found in a field: [uuu_cmwbs_name]. Allowed length: [250]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_cmwbs_name | uuu_cmwbs_name is not specified in the request. | 12308 | The API request is missing the required information: [uuu_cmwbs_name]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_cmwbs_name | uuu_cmwbs_name is empty/blank. | 12309 | The API request contains empty value for : [uuu_cmwbs_name]. Allowed only string value or use quotations. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_cmwbs_name | uuu_cmwbs_name is not specified in a string format. | 12310 | Invalid value was found in a field: [uuu_cmwbs_name]. Allowed only string value or use quotations. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6WBSPath | uuu_P6WBSPath is not specified in the request. | 12311 | The API request is missing the required information: [uuu_P6WBSPath]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6WBSPath | uuu_P6WBSPath is empty/blank. | 12312 | The API request contains empty value for: [uuu_P6WBSPath]. Allowed only string value or use quotations. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6WBSPath | uuu_P6WBSPath is not specified in a string format. | 12313 | Invalid value was found in a field: [uuu_P6WBSPath]. Allowed only string value or use quotations. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6WBSPath | uuu_P6WBSPath hierarchy is incorrect or not an existing WBS Code with the hierarchy. | 12314 | Incorrect WBS Hierarchy provided in [uuu_P6WBSPath]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6WBSPath | Hierarchy level is invalid. | 12315 | Invalid level of hierarchy was found in a field: [uuu_P6WBSPath]. Allowed maximum level of hierarchy: [18]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6WBSPath | sheetType is "Manual" and uuu_P6WBSPath does not begin with a project_number. | 12316 | Invalid project_number was found in a field: [uuu_P6WBSPath]. Provide the correct project_number in [uuu_P6WBSPath]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6WBSPath | sheetType is "System" and uuu_P6WBSPath does not begin with sourceProjectID. | 12317 | Invalid sourceProjectId was found in a field: [uuu_P6WBSPath]. Provide the correct sourceProjectId in [uuu_P6WBSPath]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6ETCComputeType | uuu_P6ETCComputeType is not a number between 1 and 5. | 12318 | Invalid value was found in the field: [uuu_P6ETCComputeType]. Only integer values are allowed from 1 to 5. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6ETCComputeType | uuu_P6ETCComputeType value is empty/Null. | 12319 | The API request contains empty value for: [uuu_P6ETCComputeType]. Only integer values are allowed from 1 to 5. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6ETCUserValue | uuu_P6ETCUserValue value is empty/Null | 12320 | Invalid value was found in a field: [uuu_P6ETCUserValue]. Only numeric values are allowed and should be greater than or equal to 0.01. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6ETCUserValue | uuu_P6ETCComputeType is 5, and uuu_P6ETCUserValue is not included in the request. | 12321 | The API request is missing the required information: [uuu_P6ETCUserValue]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_P6ETCUserValue | uuu_P6ETCUserValue is provided with a null value. i.e., "uuu_P6ETCUserValue":null | 12322 | The API request contains empty value for: [uuu_P6ETCUserValue]. Only numeric values are allowed and should be greater than or equal to 0.01. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
isETCApplicableToChild | 'isETCApplicableToChild' is not a boolean value. | 12323 | Invalid value was found in a field: [isETCApplicableToChild]. Allowed only boolean value. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
isETCApplicableToChild | 'isETCApplicableToChild' value is empty or null. | 12324 | The API request contains empty value for: [isETCApplicableToChild]. Allowed only boolean value. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_cmwbs_status | uuu_cmwbs_status value is empty. | 12325 | The API request contains empty value for: [uuu_cmwbs_status]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
uuu_cmwbs_status | uuu_cmwbs_status value is invalid | 12326 | Invalid value was found in a field: [uuu_cmwbs_status]. Allowed values: [Active, Inactive]. [uuu_cmwbs_code]: {uuu_cmwbs_code} |
Related Topics
Last Published Tuesday, July 1, 2025