Update manual approval record

Update a manual approval record. Set manual_approval attribute of approval object to true to approve a patch; set it to false to reject a patch.

put
/approvals/{id}

https://console.automox.com/api/approvals/{id}
Request
Response
Request
Path Parameters
id
required
integer
Approval ID (Contact Automox Support for further assistance.)
Headers
Content-Type: application/json
required
string
Specify json as the content type for body parameters.
Authorization: Bearer
required
string
Your Automox API Key for authentication Format: Authorization: Bearer your_automox_api_key
Body Parameters
manual_approval
required
boolean
Approval state value for the given Approval ID. Usetrue for Approved, false for Rejected
Response
200: OK
{
"type": "object",
"required": [
"manual_approval"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"software_version_id": {
"type": "integer",
"format": "int64"
},
"policy_id": {
"type": "integer",
"format": "int64"
},
"manual_approval": {
"type": "boolean",
"description": "true = Approved, false = Rejected"
},
"manual_approval_time": {
"type": "string",
"format": "date-time"
},
"auto_approval": {
"type": "boolean"
},
"server_count": {
"type": "integer",
"format": "int64"
}
}
}

Example Approval Body

{
"manual_approval": true
}

Example Requests

cURL
Python http.client
Python requests
C#
PowerShell
cURL
curl -X PUT \
'https://console.automox.com/api/approvals/7005639?o=0000' \
-H 'Authorization: Bearer your_automox_api_key' \
-H 'Content-Type: application/json' \
-d '{
"manual_approval": true
}'
Python http.client
import http.client
conn = http.client.HTTPConnection("console,automox,com")
payload = "{\n\t\"manual_approval\": true\n}"
headers = {
'Content-Type': "application/json",
'Authorization': "Bearer your_automox_api_key"
}
conn.request("PUT", "api,approvals,7005639", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Python requests
import requests
url = "https://console.automox.com/api/approvals/7005639"
querystring = {"o":"0000"}
payload = "{\n\t\"manual_approval\": true\n}"
headers = {
'Content-Type': "application/json",
'Authorization': "Bearer your_automox_api_key"
}
response = requests.request("PUT", url, data=payload, headers=headers, params=querystring)
print(response.text)
C#
var client = new RestClient("https://console.automox.com/api/approvals/7005639?o=0000");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer your_automox_api_key");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("undefined", "{\n\t\"manual_approval\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PowerShell
$apiKey = 'your_automox_api_key'
$headers = @{
"Authorization" = "Bearer $apiKey"
"Content-Type" = "application/json"
}
$url = "https://console.automox.com/api/approvals/1234567?o=0000"
$body = @"
{
"manual_approval": true
}
"@
Invoke-WebRequest -Method Put -Uri $url -Headers $headers -Body $body