Sort Cost Sheet
PUT /ws/rest/service/v1/cost/cbs/sort
Purpose
This sorts the WBS codes present in the Project Cost Sheet.
Notes:
- Do not perform any other actions when the RESTful web service for Sort Cost Sheet Web Service is being executed by the system.
- When one user is manually sorting from the UI and at the same time another user sorts from RESTful, the system prevents the RESTful sorting to override the manual sorting.
Request Format
There are three input parameters for the web service call:
Project number
project_number(Required): Specify the project/shell number to update column data of project cost sheet
If the user enters a wrong project number and the web service call fails, the existing error code on incorrect project number will be used to report the error to the user.
Note: The Sort Cost Sheet must be used only for one project at a time.
Type
This is an optional parameter, and if the parameter is not present, the project Cost Sheet will be sorted based on the CBS codes.
Default value will be CBS
Identifier for the column (the column that the sorting must happen)
The only supported value is: CBS
Sort order
This is an optional input parameter.
Default value will be ascending
sortOrder: Identifier to define the sort order (ascending or descending).
The values are: 'asc' or 'desc'.
Note: The user should not perform any action when sortCostSheet web service is being executed.
Response Format
A JSON object is returned in the following format.
{
"data": [],
"message": [],
"status": <REST status code value>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Additional Information
The following are the rules for sorting:
- For a flat structured Project Cost Sheet, there will be a simple alphanumeric sort on all the segment codes. The sorting will be case insensitive.
- For a tree structured Cost Sheet, the level sorting will happen first (the parent level first followed by the child level). Further alphanumeric sorting will happen within the level. The sorting will be case insensitive.
Sample Request
URL: http://www.example.com:1234/ws/rest/service/v1/cost/cbs/sort
Body:
{
"options":
{
"type":" CBS",
"sortOrder":"desc",
"projectNumber":"proj-3"
}
}
Sample Success Response
{
"data": [],
"message": [],
"status": 200
}
Related Topics
Last Published Tuesday, July 1, 2025