Get Snapshot Names for a Cashflow Curve

GET /ws/rest/service/v2/cashflow/snapshot?project_number={project number}&name={cashflow name}

Purpose

Get snapshot names for an existing cashflow curve in specific shell. Only one curve can be processed per request.

Prerequisite

You must have Get permission for Cashflow service to use this REST service.

Request Format

Send an API request in the following format:

GET /ws/rest/service/v2/cashflow/snapshot?project_number={project number}&name={cashflow name}

Query Parameters

In the query, the following parameters must be included:

Parameter Required? Data Type Description
project_number Yes String A valid shell/project number with an Active status.
name Yes String A valid cashflow name.

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 a curve name, New curve 5, from a project, P-0002, send a request in the following format:

http://<localhost:7001>/ws/rest/service/v2/cashflow/snapshot?project_number='P-0002'& name='New curve 5'

Sample Success Response

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

{

"data": [

{

"Name": ["New curve 5" ],

"snapshot_name": [ "Rest snapshot 1"]

}

],

"message": ["success" ],

"status": 200,

"rest_audit_id": 2385

}

Sample Failed Response

A failure message and status displays for a snapshot in the following format:

{

"data": [],

"message": ["Cashflow curve name is mandatory and is missing in the input request" ],

"status": 13003,

"rest_audit_id": 2386

}

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 Project number is invalid. 602 Project/Shell Number is not correct.
project_number Project is not active   Project Status is Inactive
curve_name Curve name is not provided. 13002 Cashflow curve name is mandatory and is missing in the input request.
curve_name Provided curve name no longer exists. 13003 Invalid curve name provided in input request.
curve_name Provided curve name provided is of summary type. 13011 The selected curve name is a summary type, and summary snapshots are not supported through integration.