Create Schedule of Manual Activity Sheet
POST /ws/rest/service/v2/activity/sheet/schedule
Purpose
Schedule the creation of a manual activity sheet in a specified Unifier project/shell based on
project_number and
activitysheetName.
Prerequisites
Ensure you have:
- Created the Unifier shell
- The required Activity Sheet Services permissions under Activity Manager
- An existing manual/system activity sheet
Request Format
Send an API request as a JSON Map with the following structure:
{
"options": {
"project_number": "<value>"
},
"data": [
{
"activitySheetName": "<value>",
"dataDate": "<value>"
}
]
}
Request Parameters - Options Map
Specify the following parameter in the Options JSON map:
| Request Parameter | Required? | Data Type | Description |
|---|---|---|---|
| project_number | Yes | String | A valid 'Active' project/shell number where the manual activity sheet is to be created. |
Request Parameters - Data Map
Specify the following parameters in Data []:
| Request Parameter | Required? | Data Type | Description |
|---|---|---|---|
| activitySheetName | Yes | String | The name of the Manual Activity Sheet Name in the Activity Manager. |
| dataDate | Yes | String | The data date must be provided by the user, and it must be greater than or equal to the project schedule start date. |
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
To schedule the creation of a manual activity sheet in a specified Unifier project/shell, send a request in the following format:
{
"options": {"project_number": "P-0056"},
"data" :[{
"activitySheetName" : "ManualSheet01",
"dataDate" : "2024-03-26"
}
]
}
Sample Success Response
A successful response with status code 200 displays in the following format:
{
"data": [],
"message": [
{
"activity
SheetName": "ManualSheet01",
"message" : "Sch
edule job created
Successfully."
,
"
jobId" : 168811366528
8
}
]
,
"status": 202,
"rest_audit_id": 12676
}
Sample Failed Request
A request with an invalid value is sent in the format as shown below:
{
"options": {"project_number": "P-0056"},
"data" :[{
"activitySheetName" : "ManualSheet01" ,
"dataDate" : "2020-03-26"
}]
}
Sample Failed Response
A failed response to the above request displays the corresponding status code in the following format:
{
"data": [],
"message": [
{
"activitySheetName" : "ManualSheet01",
"message" :"Invalid value was found in a field [dataDate]. The value provided should be equal to or greater than Project Start Date.
}
]
"status": 12013,
"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 |
|---|---|---|---|
| project_number | project_number is not specified. | 12018 | The API request is missing the required information: [project_number]. |
| project_number | project_number is invalid. | 602 | Project/Shell Number is not correct. |
| project_number | project_number is inactive. | 12020 | The API request contains an invalid value: [project_number]. Check the status of this project_number in Unifier. |
| project_number | project_number is empty/blank. | 12128 | The API request contains empty value for: [project_number]. |
| activitySheetName | Activity sheet name is not specified in the request. | 12012 | The API request is missing the required information: [activitySheetName]. |
| activitySheetName | Activity sheet name 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. |
| activitySheetName | Activity sheet name value is null or empty. | 12068 | The API request contains empty value for: [activitySheetName]. |
| dataDate | dataDate is not specified in the request. | 12107 | The API request is missing the required information: [dataDate]. |
| dataDate | dataDate is empty/blank | 12130 | The API request contains empty value for: [dataDate]. |
| dataDate | dataDate s specified with incorrect format. | 12105 | The API request contains an invalid value: [dataDate]. Please check if this dataDate has been in correct date format [yyyy-MM-dd]. |
| dataDate | projectType is empty/blank for system sheet. | 12148 | Invalid value was found in a field [dataDate]. The value provided should be equal to or greater than Project Schedule Start Date. |