Delete Snapshots of a Cashflow Summary Curve

PUT /ws/rest/service/v2/cashflow/delete/summary/snapshot

Available: 24.4 and later

Purpose

Delete multiple summary snapshots in a single request.

Prerequisites

You must have Update permissions for Cashflow services to process this request.

Request Format

Send an API request as a JSON Map with the following structure:

{

"options":{

"project_number": "<value>"

"summary_cashflow_name": "<value>"

},

"data":{"snapshot_name":["<list of snapshot names>"]}

}

Request Parameters For Options and Data JSON Map

The following parameters must be specified in the request.

Request Parameter Required? Data Type Description
project_number Yes String A valid shell/project number with Active status.
summary_cashflow_name Yes String The name of the summary cashflow curve for which snapshots are to be deleted.
snapshotName Yes String A list of snapshot names to be deleted.

Response Format

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

{

"data": [

{

"summary_cashflow_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 Request

To delete a snapshot for a summary cashflow curve, send a request in the following format:

{

" options" : {

"project_number": "P-0002 ",

"summary_cashflow_name" : "New curve 5"

},

"d ata":[

{"snapshot_name":["snapshot 1", "snapshot 2"]

}

]

}

Sample Success Response

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

{

"data": [

{

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

"snapshot_name": [ "snapshot 1", "snapshot 2"]

}

],

"message": [ "success" ],

"status": 200,

"rest_audit_id": 2383

}

Sample Failed Response

The following message and status is displayed for a snapshot that could not be deleted.

{

"data": [],

"message": ["Snapshot name specified does not exist in the summary cashflow 'New curve 5'"],

"status": 13007,

"rest_audit_id": 2384

}

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 is not an active. 13001 Create/Update/Delete cannot be performed when project/shell status is Inactive or View-Only or On-Hold.
project_number Project number is not provided. 602 Project/Shell number is mandatory and is missing in the input request.
project_number Project number is Invalid. 1245 ( create/update - existing code) Create/Update/Delete cannot be performed when project/shell status is Inactive or View-Only or On-Hold.
project_number Project number is Invalid. 1219 ( get - existing code) Project status is inactive.
summary_cashflow_name Curve name is not provided 13002 cashflow curve name is mandatory and is missing in the input request.
summary_cashflow_name Curve name provided no longer exists 13003 Invalid curve name provided in input request.
summary_cashflow_name Cashflow name provided in not summary type 13011 Cashflow name provided in input request is not a summary curve.
summary_cashflow_name Summary curve status in inactive 13012 Selected summary cash flow is no longer active.
snapshotName Snapshot name is not provided 13004 Provide a snapshot name.
snapshotName Snapshot name already exists 13005 snapshot name already exists.
snapshotName Snapshot name do not exist for selected curve 13006 snapshot name specified do not exist in the cashflow <name>.
snapshotName Snapshot names exceeds 64 characters 13010 Cash Flow snapshot name cannot exceed 64 characters.