You can deactivate specific resource data by specifying it in input criteria. If the requested resource does not exist, then an error message is received in a response message.
Request line
baseURL/dbapi.do?action=expireResourceData&dataset=<Datasetname>
Request body
{ "resSignatures":[ "", "" ] "resType":"" "attrId":"" "attrValue":"" "endTime":"" }
Request example using GET
GET /dbapi.do?action=expireResourceData&dataset=defaultDs&resSignatures=vm%23cumulus-lab-vm1,h%23cumulus-lab-host1 HTTP /1.1 Authorization:Basic ZnJlZDpmcmVk
Request example using POST
Post /dbapi.do?action=expireResourceData&dataset=defaultDs&resSignatures=vm%23cumulus-lab-vm1,h%23cumulus-lab-host1 HTTP /1.1 Authorization:Basic ZnJlZDpmcmVk
{ "resSignatures":[ "vm#cumulus-lab-vm1", "h#cumulus-lab-host1" ] }
Request parameters
Parameter | Type | Description |
---|---|---|
action | String | expireResourceData
Specify the API function to be invoked |
dataset | String | Dataset name. From 2 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed. |
resSignatures | String[ ] | (Optional) One or more comma separated resource signatures. |
resType | String | (Optional) Resource type.
From 1 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed. |
attrId | String | (Optional) Attribute ID of the type scalar.
From 2 to 32 alphanumeric, underscore (_), and hyphen (-) characters are allowed. |
attrValue | String | (Optional) Value for the specified attribute ID.
From 1 to 4000 alphanumeric characters are allowed. |
endTime | String | (Optional) End time to terminate the resources data in the yyyyMMdd_HHmmss format.
Default time zone is on UTC and default time is the current time of the Analyzer detail view server. |
- resSIgnatures
- resType
- attrId and attrValue
If the resSignatures parameter is specified, then the resType, attrId, and attrValue parameters are ignored.
The parameters resType, attrId, and attrValue can be used in a combination or separately.
Response body
{ "expired":2 }
Response example
{ "expired":2 }
Response parameters
Parameter |
Type |
Description |
---|---|---|
expired | Integer | If resource data get is terminated, then shows the number of terminated resources. |
failed | Object[ ] | List of failed entities. |
code | String | Eight-digit hexadecimal error code. |
error | String | Error message. |
Status codes
Status code |
Message |
Description |
---|---|---|
200 | OK | Request was successful, and the response body contains the requested log details. |
206 | PARTIAL CONTENT | Request is in progress, and the incremental content is available in the response body. |
400 | BAD REQUEST | Request URL or request body validation failed. Check the response body for details. |
401 | UNAUTHORIZED | Supplied authentication token is invalid or does not have the appropriate credentials to access the resource. |
404 | NOT FOUND | API server could not find a resource matching the request. |
405 | METHOD NOT ALLOWED | Request HTTP method is not allowed for the operation. |
500 | SERVER ERROR | API operation request failed. Check the response body for details. |
Response codes
The following table lists the common API response codes that might be generated through the standard API. If an error response is not listed, examine the HTTP status codes to determine the best method for addressing the issue.
Response code | Message | Condition |
---|---|---|
56010002 | Invalid JSON Request. | Specified input JSON is invalid. |
56010009 | At least one of {resSignatures}, {resType}, {attrId}, {attrValue} parameters must be specified. | None of the required parameter are specified or specified parameters are not sufficient. |
5601000F | Invalid value specified for parameter {attrValue}. It must be of type string. | Specified attrValue is not of type string. |
5601000F | Invalid value specified for parameter {attrId}. It must be of type string. | Specified attrId is not of type string. |
5601000F | Invalid value specified for parameter {resType}. It must be of type string. | Specified resType is not of type string. |
5601000F | Invalid value specified for parameter {resSignatures}. It must be of type JSON list of string. | Specified resSignatures is not type JSON list of string. |
5602000F | Invalid value specified for parameter {resSignatures}. | Specified resSignatures is an empty list. |
5602000F | Invalid value specified for parameter {resType}. Resource {type}:[h$%] contains invalid characters. Valid characters are [alphanumeric, - and _]. | Specified value for resType contains an invalid character. |
5602000F | Invalid value specified for parameter {resType}. Resource {type}:[] length must be between 1-32 characters. | Specified value for resType has an invalid length. |
5602000F | Invalid value specified for parameter {attrValue}. If {attrId} is specified, then {attrValue} must be specified. | Parameter attrId is specified but attrValue is not specified. |
5602000F | Invalid value specified for parameter {attrId}. If {attrValue} is specified, then {attrId} must be specified. | Parameter attrValue is specified but attrId is not specified. |
5602000F | Invalid value specified for parameter {attrId}. {attrId} length must be between 2-32 characters. | Specified value for attrId has an invalid length. |
5602000F | Invalid value specified for parameter {attrId}. {attrId} contains invalid characters. Valid characters are [alphanumeric, - and _]. | Specified value for attrId contains an invalid character. |
5602000F | Invalid value specified for parameter {attrValue}. {attrValue} length must be between 1 to 4000 characters. | Specified value for attrValue has an invalid length. |
5601000F | Invalid value specified for parameter {endTime} | Invalid value specified for parameter endTime. |
560000E9 | License is not valid. | License is not uploaded or uploaded license is invalid or expired. |
560000E9 | Authorization needed. | Request is sent with an invalid authentication token. |
56000005 | Dataset with {name}:[ds1] does not exist. | Request sent for a dataset that does not exist. |
56060000 | Not found. | No resource matched for given delete request. |
560000E0 | HTTP method [PUT] is not supported for action [expireResourceData]. | Request is sent with any HTTP method other than GET or POST. |
560000E2 | Application encountered an internal error. | API server encountered an unknown error. |