Get Assignment Spread

POST /ws/rest/service/v2/activity/sheets/assignments/spread/download/initiate

Purpose

Gets the spread data associated with activities assignments in the shell. It returns the Job ID for creating the spread file.

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 a GET request in the format specified above.

Request Parameters

The following parameters can be specified in the request:

Request Parameter Required? Data Type Description
source Yes String The external application or data from which activity spread data is being fetched. Valid values include: "Primavera Cloud" and "Others".
project_number Yes String A valid shell number with an Active status in which the activity spread data will reside.
projectType Yes String The type of project in Unifier for which the assignments have to be created. Valid values include: "Current" and "Baseline".
activitySheetType Yes String The type of activity sheet associated with the project in Unifier. Valid values include: "manual" and "system".
activitySheetName No String If the activitySheetType is "manual" then this field is mandatory and a new manual activity sheet is created in the shell with this name.
sourceProjectId Yes, if activitySheetType is "system". String The project code in Oracle Primavera Cloud.

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

Send a request in the following format:

{hosturl}/ws/rest/service/v2/activity/sheets/assignments/spread/download/initiate

Payload :

{

"options":{

"project_number" :"P-0056",

"sourceProjectId" :"P-0056",

"source":"Primavera Cloud",

"projectType": "Current",

"sheetType":"System"

}

}

Sample Success Response

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

{

"data": {"jobId": 1688383768969},

"message": ["Job for spread data created successfully."],

"status": 202,

"rest_audit_id": 12676

}

Sample Failed Request

{hosturl}/ws/rest/service/v2/activity/sheets/assignments/spread/download/initiate

Payload:

{

"options":{

"project_number" :"P-0056",

"sourceProjectId" :"P-0056",

"source":"Primavera Cloud",

"projectType": "",

"sheetType":"System"

}

}

Sample Failed Response

A failed response is returned with a status code in the following format:

{

"data": [],

"message": [

{

"message": "The API request contains empty value for: [projectType].",

"status": 12144

}

],

"status": 3000,

"rest_audit_id": 14302

}

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 blank. 12008 Invalid value was found in a field: [source]. Allowed values: [Primavera Cloud, P6, Others].
source Source value is empty. 12702 The API request contains empty value for: [source]. Allowed value: [Primavera Cloud]
source source is specified in an invalid data format. 12119 Invalid value was found in a field: [source]. Allowed only alphanumeric value.
project_number   12018 Missing 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_number value is empty/blank. 12128 The API request contains an invalid value: [project_number]. Check the status of this project_number in Unifier.
projectType projectType is not specified in the request. 12143 The API request is missing the required information: [projectType].
projectType projectType value is empty/blank. 12144 The API request contains empty value for: [projectType]. Allowed values: [Current, Baseline]
projectType projectType is specified in an invalid data format. 12142 Invalid value was found in a field: [projectType]. Allowed only alphanumeric value.
projectType projectType value is invalid. 12145 Invalid value was found in a field: 'projectType'. Allowed values: [Current, Baseline]
projectType Baseline is not configured for the project. 12036 Invalid value was found in a field: [projectType]. Baseline not defined for this Project.
activitySheetType sourceProjectId is not specified in the request. 12010 The API request is missing the required information: [activitySheetType]
activitySheetType Invalid activitySheetType value specified in the request. 12011 Invalid value was found in a field: [activitySheetType]. Allowed values: [manual, system]
activitySheetType activitySheetType value is empty/null. 12034 The API request contains an empty value for: [activitySheetType]. Allowed values: [manual, system]
activitySheetType activitySheetType is specified in an invalid data format. 12704 Invalid value was found in a field: [activitySheetType]. Allowed only alphanumeric value.
activitySheetName activitySheetName is not specified in the request when the sheet type is Manual. 12012 The API request is missing the required information: [activitySheetName].
activitySheetName activitySheetName value is empty for Manual sheet type. 12068 The API request contains empty value for: [activitySheetName].
activitySheetName activitySheetName exceeds maximum length. 12017 Invalid value was found in a field: [activitySheetName]. Allowed length: [250]
activitySheetName activitySheetName does not exist. 12013 The API request contains an invalid value: [activitySheetName]. Please check if this activitySheetName with sheet type=manual has been configured 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 is 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]