Upload Coverage
Invoke a coverage refresh for a particular review definition or review result. This is equivalent to the coverage upload functionality when editing a review definition or review result that the UI supports today.
POST https://instance.securid.com/aveksa/command.submit?cmd=uploadCoverage
Request
Parameters
uploadCoverage | |
format |
|
The name of the review result or review definition. The name parameter is mutually exclusive with the id parameter. | |
The id of the review result or review definition. The id parameter is mutually exclusive with the name parameter. | |
Indicates the type of coverage file. Valid values :
| |
altManagerResolvesTo | The user attribute used to resolve entries in the alternate managers file. |
filename | The filename in the import directory on the G&L server. The import directory is specified on the web services configuration page. Alternatively, the data can be sent as part of the request body. This option is not recommended and file should be passed using the POST body |
Headers
Bearer token | |
Accept | application/json |
Content-Type | application/json |
Body
Base64 encoded PNG image.
Response
Parameters
type | Executed command name |
status | success, failure |
message | Optional message to return along with the status. |
Examples
Request
- Curl
- Python
- Node.js
curl -L -X POST "https://instance.securid.com/aveksa/command.submit?cmd=uploadCoverage&id=1" \
"&type=monitor" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d "user_id='lbelkin'|user|1=1|app-role|name='Datadog'|
user_id='mcastro'|user|1=1|ent|name='Dynatrace'|"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
post_data = """
user_id='lbelkin'|user|1=1|app-role|name='Datadog'|
user_id='mcastro'|user|1=1|ent|name='Dynatrace'|
"""
params = {
"cmd": "uploadCoverage",
"format": "json",
"id": "61",
"type": "reviewer"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.post(url, data=post_data, params=params, headers=headers)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code {response.status_code}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit";
const post_data = "user_id='lbelkin'|user|1=1|app-role|name='Datadog'|\nuser_id='mcastro'|user|1=1|ent|name='Dynatrace'|";
const params = {
"cmd": "uploadCoverage",
"format": "json",
"id": "61",
"type": "reviewer"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
};
axios.post(url, post_data, { params, headers })
.then(response => {
if (response.status === 200) {
console.log(response.data);
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response
- 200
- 412 Missing Parameters
{
"data": {
"type": "uploadCoverage",
"status": "success"
}
}
<html>
<head>
<title>Error</title>
</head>
<body>The id parameter or the name parameter must be provided referencing a valid review
result or definition respectively.
Query String=cmd=uploadCoverage&format=json</body>
</html>