Get Snapshot Names for a Summary Cashflow Curve

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

Available: 24.4 and later

Purpose

Get snapshot names for a summary cashflow curve. Only one curve can be processed with each request.

Prerequisites

You must have GET permissions for cashflow services to process this request.

Request Format

Send an API request with the query parameters in the following format:

http://<localhost>:<port>/ws/rest/service/v2/cashflow/summary/snapshot?project_number='<value>'&name='<cashflow name>'

Query Parameters

The following parameters can be specified in the request query:

Query Parameter Required? Data Type Description
project_number Yes String A valid shell/project number with an Active status.
name Yes String The name of the cashflow curve for which snapshot names are to be returned.

Response Format

The REST service returns a JSON Map in the following format:

{

"data": [

{

"Name" : "<summary cashflow curve name>",

"snapshot_name" : ["<list of snapshot names>"]

}

],

"message": [<list of messages>],

"status": <REST status code value>,

"rest_audit_id": <value>

}

A successful request returns a response with status 200.

Otherwise a failed request returns a response with a status code and an error message

Sample Success Request

To get a list of snapshots associated with the summary cashflow curve New Curve 5, send a request in the following format:

http://<localhost:7001>/ws/rest/service/v2/cashflow/summary/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"]

}

],

"messag e": ["success"],

"status ": 200,

"rest_audit_id ": 2385

}

Sample Failed Response

The following response is returned when the summary cashflow curve name is not specified in the request.

{

"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 error 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 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.
name Curve name is not provided. 13002 Cashflow curve name is mandatory and is missing in the input request.
name Curve name provided no longer exists. 13003 Invalid curve name provided in input request.
name Cashflow name provided in not a summary type. 13011 Cashflow name provided in input request is not a summary curve.
name Summary curve status in inactive. 13012 Selected summary cash flow is no longer active.