Get Names of Cost Sheet Snapshots

GET /ws/rest/service/v2/projectcostsheet/snapshot?project_number={project number}

Purpose

Get names of cost sheet snapshots of a specific shell/project.

Prerequisite

You must have at least Get permissions for CBS services.

Query Parameter

Specify the following parameter in the request query:

Parameter Required? Data Type Description
project_number Yes String A valid project/shell number.

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

To get cost sheet snapshots for Project, PRJ-004, send an API request in the following format:

http://<host>:<port>/ws/rest/service/v2/projectcostsheet/snapshot?project_number='PRJ-004'

Sample Success Response

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

{

"data": [{

"snapshot_name": ["June snapshot", "July snapshot"]}

],

"message": ["success"],

"status": 200,

"rest_audit_id": 1281

}

Sample Failed Response

A failed response with the corresponding status code displays in the following format:

{

"data": [],

"message": ["Project/Shell number is mandatory and is missing in the input request."],

"status": 13001,

"rest_audit_id": 1282

}

Supported Validation Messages and Status Codes

The following messages and status codes can display in the response:

Field Name Use-Case Status Message
project_number Project number is not provided. 13001 Project/Shell number is mandatory and is missing in the input request.
project_number The project number is invalid. 602 Project/Shell Number is not correct.
project_number Project is not active. 1219 Project status is inactive.
project_number Cost sheet does not exist in the project/shell. 707 Cost sheet does not exist.