Create or Update Mapped External Projects

POST /ws/rest/service/v2/activity/sheet/mappedprojects

Purpose

Create or update externally-synced project data in the Activity Sheet of a specified Unifier shell based on sourceProjectId and project_number. This REST service updates the current project data and creates or updates the baseline project data.

Note: Validations are not implemented for System Activity Sheet data as it is assumed to be sent correctly from the source system.

Prerequisites

Ensure the source project ID is configured or added by selecting Shell Details, and then selecting the Primavera Cloud Integration tab in Unifier.

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>",

"sourceProjectId":"<value>"}

"data":[{"projectId":"<value>", "projectName":"<value>"}]

}

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 the project data will be populated. Valid values include: "Primavera Cloud".

project_number

Yes

String

A valid shell number with an Active status.

sourceProjectId

Yes

String

The project code in Oracle Primavera Cloud.

Request Parameters - Options Object

The following parameters can be specified in the "Data" object:

Request Parameter

Required?

Data Type

Description

workspaceCode

Yes

String

If the project is integrated from Oracle Primavera Cloud application, specify the code of the workspace where the project is located in Oracle Primavera Cloud.

projectType

Yes

String

The type of project in Unifier. Valid values include: "Current" and "Baseline".

dataDate

Yes

Timestamp

Date when the project is scheduled in the source application.

projectStartDate

Yes

Timestamp

The project start date specified in the source application.

projectName

Yes

String

The name of the project specified in the source application.

projectId

Yes

String

The project ID of the project.

For "Current" projectType, it is identical to the sourceProjectId.

For "Baseline" projectType, it differs.

externalProjectId

No

Integer

The DB internal ID of the project in the source application.

scheduleType

No

String

THe schedule type for the project created or updated. Valid values include: "Resource Loaded" (default), "Duration", and "Cost Loaded".

Request Parameters For Baseline Projects

The following parameters must be specified for a "Baseline" projectType:

Request Parameter

Required?

Data Type

Description

currentProjectId

Yes

String

The reference project ID of the current project for baseline project.

currentProjectExternalId

Yes

Integer

The DB internal reference id of the project from the source application for baseline project.

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 Success Request For Current Project and Baseline Project

Send a request in the following format:

{

"options":{

"project_number":"P-0099",

"source":"Primavera Cloud",

"sourceProjectId":"Reg235"

},

"data":[

{

"projectName": "Reg235",

"projectId": "Reg235",

"externalProjectId": 16101,

"dataDate": "2021-04-04T10:00:00",

"projectStartDate": "2019-02-02T00:00:00",

"workspaceCode": "Integration",

"projectType": "Current",

"scheduleType":"Duration"

},

{

"projectName": "Reg235-B1",

"projectId": "Reg235-B1",

"externalProjectId": 16102,

"dataDate": "2021-04-04T10:00:00",

"projectStartDate": "2019-02-02T00:00:00",

"workspaceCode": "Integration",

"projectType": "Baseline",

"scheduleType":"Duration",

"currentProjectId":"Reg235",

"currentProjectExternalId":16101

}

]

}

Sample Success Response For Current Project and Baseline Project

A successful response with status code 200 displays in the following format:

{

"data": [

{

"dataDate": "2021-04-04T10:00:00",

"scheduleType": "Duration",

"externalProjectId": 16101,

"projectStartDate": "2019-02-02T00:00:00",

"workspaceCode": "Integration",

"projectType": "Current",

"id": 641,

"projectName": "Reg235",

"projectId": "Reg235"

},

{

"currentProjectId": "Reg235",

"dataDate": "2021-04-04T10:00:00",

"scheduleType": "Duration",

"currentProjectExternalId": 16101,

"externalProjectId": 16102,

"projectStartDate": "2019-02-02T00:00:00",

"workspaceCode": "Integration",

"projectType": "Baseline",

"id": 643,

"projectName": "Reg235-B1",

"projectId": "Reg235-B1"

}

],

"message": ["success"],

"status": 200,

"rest_audit_id": 5891

}

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].

source

source value is empty.

12030

The API request contains empty value for: [source]. Allowed values: [Primavera Cloud].

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 empty/blank.

12128

The API request contains empty value for: [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.

12020

The API request contains an invalid value: [project_number]. Check the status of this project_number in Unifier.

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 has invalid special characters.

12022

The API request contains invalid characters in: [source_project_id]. The following characters are not allowed : / \\ : * ? \" < > | ' =

sourceProjectid

sourceProjectId is not specified in the request.

12005

The API request is missing the required information: [sourceProjectId]

sourceProjectid

sourceProjectid value is empty.

12032

The API request contains empty value for: [sourceProjectId].

sourceProjectid

sourceProjectid exceeds maximum length.

12014

Invalid value was found in a field: [source_project_id]. Allowed length: [250]

workspaceCode

Input is not alphanumeric. Special character validation is not required.

12115

Invalid value was found in a field: [workspaceCode]. Allowed only alphanumeric value.

workspaceCode

workspaceCode is not configured in Unifier.

12146

The API request contains an invalid value: [workspaceCode]. Check if this workspaceCode has been configured corresponding to sourceProjectId in Unifier.

projectType

projectType is not specified in the request.

12143

The API request is missing the required information: [projectType].

projectType

projectType is empty/blank.

12144

The API request contains empty value for: [projectType]. Allowed values: [Current, Baseline]

projectType

projectType is an incorrect data type.

12142

Invalid value was found in a field: [projectType]. Allowed only alphanumeric value.

projectType

An invalid value is passed in projectType.

12145

Invalid value was found in a field: 'projectType'. Allowed values: [Current, Baseline]

dataDate

dataDate is not specified in the request.

12107

The API request is missing the required information: [dataDate].

dataDate

dataDate is an incorrect data type.

12105

The API request contains an invalid value: [dataDate]. Please check if this dataDate has been in correct date format [yyyy-MM-dd].

dataDate

dataDate value is empty.

12130

The API request contains empty value for: [dataDate].

dataDate

dataDate exceeds maximum length.

12148

Invalid value was found in a field [dataDate]. The value provided should be equal to or greater than Project Schedule Start Date.

projectStartDate

projectStartDate is not specified in the request.

12108

The API request is missing the required information: [projectStartDate]

projectStartDate

projectStartDate is specified with an incorrect date format.

12106

The API request contains an invalid value: [projectStartDate]. Please check if this projectStartDate has been in correct date format [yyyy-MM-ddTHH:mm:ss].

projectStartDate

projectStartDate value is empty.

12131

The API request contains an invalid value: [projectStartDate]. Please check if this projectStartDate has been in correct date format [yyyy-MM-ddTHH:mm:ss].

projectName

projectName value has invalid special characters.

12117

The API request contains invalid characters in: [projectName]. The following characters are not allowed : / \\ : * ? \" < > | ' =

projectName

projectName exceeds maximum length.

12118

Invalid value was found in a field: [projectName]. Allowed length: [250].

projectName

projectName is not alphanumeric.

12121

Invalid value was found in a field: [projectName]. Allowed only alphanumeric value.

projectName

projectName value is empty.

12127

The API request contains empty value for: [projectName].

projectName

projectName is not specified in the request.

12126

The API request is missing the required information: [projectName].

projectId

projectId is not specified in the request.

12005

The API request is missing the required information: [projectId]

projectId

projectId exceeds maximum length.

12014

Invalid value was found in a field: [project_id]. Allowed length: [250]

projectId

projectId is not configured in the source Unifier shell.

12109

The API request contains an invalid value: [projectId]. Check if this projectId has been configured in Unifier.

projectId

projectId value has invalid special characters.

12110

The API request contains invalid characters in: [projectId]. The following characters are not allowed : / \\ : * ? \" < > | ' =

projectId

projectId value is empty.

12132

The API request contains empty value for: [projectId].

projectId

projectId of the baseline project matches the projectId of the Current project.

12149

Baseline [projectId] cannot be same as Current [projectId].

projectId

projectId is already present as the current or baseline projectId in the same or different Unifier shell.

12151

Invalid value was found in a field: [projectId]. The same projectId is configured as current or baseline project id in Unifier Shell-<ShellNumber>

externalProjectId

externalProjectId value has invalid special characters.

12113

The API request contains invalid characters in: [externalProjectId]. The following characters are not allowed : / \\ : * ? \" < > | ' =

externalProjectId

externalProjectId exceeds maximum length.

12114

Invalid value was found in a field: [externalProjectId]. Allowed length: [10]

externalProjectId

externalProjectId is an incorrect data type.

12120

Invalid value was found in a field: [externalProjectId]. Allowed only numeric value.

scheduleType

scheduleType value is invalid.

12125

Invalid value was found in a field: 'scheduleType'. Allowed values: [Duration, Cost, Resource].

scheduleType

scheduleType value is not alphanumeric.

12124

Invalid value was found in a field: [scheduleType]. Allowed only alphanumeric value.

scheduleType

scheduleType value is empty.

12147

The API request contains empty value for: [scheduleType]. Allowed values: [Duration, Cost, Resource]

currentProjectId

currentProjectId is not specified in the baseline data.

12133

The API request is missing the required information for baseline data: [currentProjectId].

currentProjectId

currentProjectId exceeds maximum length.

12136

Invalid value was found in a field: 'currentProjectId'. Allowed length: [250].

currentProjectId

currentProjectId value is empty.

12134

The API request contains empty value for: [currentProjectId].

currentProjectId

currentProjectId value contains special characters.

12137

The API request contains invalid characters in: [currentProjectId]. The following characters are not allowed : / \\ : * ? \" < > | ' =

currentProjectExternalId

currentProjectExternalId value contains special characters.

12138

The API request contains invalid characters in: [currentProjectExternalId]. The following characters are not allowed : / \\ : * ? \" < > | ' =

currentProjectExternalId

currentProjectExternalId exceeds maximum length.

12139

Invalid value was found in a field: [currentProjectExternalId]. Allowed length: [10].

currentProjectExternalId

currentProjectExternalId is an incorrect data type.

12140

Invalid value was found in a field: [currentProjectExternalId]. Allowed only numeric value.

currentProjectExternalId

currentProjectExternalId is not specified in the baseline data.

12141

The API request is missing the required information for baseline data: [currentProjectExternalId].

Related Topics

Mapped Projects

Get Mapped External Projects



Last Published Wednesday, April 9, 2025