Update a saved report

Use Rest API to update a saved report across Compliance instances.

Use the PUT operation on the api/reports element to update a saved report by ID.

Table 1. Operation details

Operation details Description
Operation PUT/api/reports
Purpose Update a saved report item.
HTTP method PUT
Request content type Application/json
Normal HTTP response codes 200 OK + JSON data for single saved report definition that is updated by PUT

Error HTTP response codes

The following list includes the operation details for HTTP error response codes.

500 - "Error: The property '#/' did not contain a required property of 'name' in schema f967028a-a442-59a2-ac38-8b596bcf8d2a#"
When the header is missing content-type: application/json.
500 + {"Error":"the before_save hook failed"}
PUT with non-owner's token.
401 Unauthorized + {"error":"There is no match for the provided user name and password"}
When no token is provided.
404 Not Found
When the ID is missing.
500 Internal Server Error ('Sorry something went wrong...') + error in the TEMA log
When the JSON format is invalid.
401 Unauthorized + {"error":"You are not assigned a Computer Group. You will not be able to access the system until you are assigned a valid Computer Group. Contact your administrator for assistance."}
When the token for the user has no computer assigned.
404 + {"error":"Sequel::RecordNotFound"}
When the ID (#) is invalid.
404 + {"error":"Sequel::RecordNotFound"}
When accessing the private report of another user.
500 + {"error":"There was a problem with your request."}500 + {"error":"The property '#/path' value \"aaa\" did not match the regex '^(/[^/]+)+$' in schema f967028a-a442-59a2-ac38-8b596bcf8d2a#"}
When specifying path parameters that do not exist, such as /scm/test, aaa, and others.
500 + {"error":"The property '#/state/column_order/id' of type String did not match the following type: integer in schema afc10b8d-2caf-50e7-a82e-a083dc10ee61#"}
When there is a parameter type mismatch such as previously specifying a string for an integer. You must delete then recreate the saved report with API, or save the report again from the UI.
"criteria":{ "and":["aaa","bbb"] } 500 + {"error":"Argument must be a Hash, Array, or Criterion"}
When the criteria specification is invalid.
Note: When an invalid column is selected, such as columns from a different report, the created saved report returns the default columns but without any data, or the specified column name is saved but ignored.