curl --request POST \
--url https://api.getprimo.com/compliance/alerts/details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alertIds": [
"<string>"
]
}
'import requests
url = "https://api.getprimo.com/compliance/alerts/details"
payload = { "alertIds": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({alertIds: ['<string>']})
};
fetch('https://api.getprimo.com/compliance/alerts/details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getprimo.com/compliance/alerts/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alertIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getprimo.com/compliance/alerts/details"
payload := strings.NewReader("{\n \"alertIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getprimo.com/compliance/alerts/details")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alertIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/compliance/alerts/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alertIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"alert": {
"id": "<string>",
"deviceId": "<string>",
"deviceName": "<string>",
"devicePlatform": "ANDROID",
"owner": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"complianceRuleId": "<string>",
"ruleType": "<string>",
"mdmControlId": "<string>",
"status": "ACTIVE",
"additionalStatus": "MALWAREBYTES_AGENT_NOT_INSTALLED",
"detail": "<string>",
"hasAlert": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"statusSince": "2023-11-07T05:31:56Z"
},
"mdmControl": {
"id": "<string>",
"name": "<string>",
"category": "<string>",
"type": "<string>",
"identifier": "<string>",
"enabled": true,
"profileFleetId": "<string>",
"configurationPayload": {}
},
"device": {
"fleet": {
"fleetHostId": 123,
"uuid": "<string>",
"displayName": "<string>",
"hardwareSerial": "<string>",
"status": "online",
"seenTime": "<string>",
"detailUpdatedAt": "<string>",
"refetchRequested": true,
"uptime": 123,
"lastRestartedAt": "<string>",
"orbitVersion": "<string>",
"platform": "<string>",
"osVersion": "<string>",
"build": "<string>",
"codeName": "<string>",
"gigsDiskSpaceAvailable": 123,
"mdm": {
"enrollmentStatus": "<string>",
"name": "<string>",
"serverUrl": "<string>",
"connectedToFleet": true,
"depProfileError": true,
"deviceStatus": "<string>",
"pendingAction": "<string>",
"lastEnrolledAt": "<string>",
"lastMdmEnrolledAt": "<string>",
"lastMdmCheckedInAt": "<string>"
},
"encryption": {
"diskEncryptionEnabled": true,
"encryptionKeyAvailable": true,
"osSettingsStatus": "<string>",
"osSettingsDetail": "<string>",
"appleActionRequired": "rotate_key"
},
"profiles": [
{
"profileUuid": "<string>",
"name": "<string>",
"status": "verified",
"operationType": "install",
"detail": "<string>",
"scope": "<string>"
}
],
"labelNames": [
"<string>"
],
"idpUsername": "<string>",
"idpFullName": "<string>",
"bootstrapPackageStatus": "<string>",
"bootstrapPackageDetail": "<string>"
},
"primo": {
"scriptsEnabled": true,
"naming": {
"name": "<string>",
"computerName": "<string>",
"hostname": "<string>",
"computerNameSuggestion": "<string>",
"hostnameSuggestion": "<string>",
"mdmCommandInProgress": true,
"lastMDMCommandRunAt": "<string>",
"aiSuggestionFailure": {
"attempts": 123,
"lastAttemptAt": "<string>",
"failureType": "EMPTY_OUTPUT",
"attemptedName": "<string>",
"conflictingDeviceId": "<string>"
}
},
"malwarebytes": {
"protectionStatus": "<string>",
"hasAgentInstalled": true,
"hasAlerts": true,
"lastActive": "<string>",
"lastScriptRunAt": "<string>"
},
"sentinelOne": {
"installed": true,
"registeredAt": "<string>",
"lastActiveDate": "<string>",
"scanFinishedAt": "<string>",
"uninstalledAt": "<string>",
"infected": true
},
"encryption": {
"encrypted": true,
"recoveryKeyRemotelyAvailable": true
},
"recoveryOsStatus": "<string>",
"localUsers": [
{
"id": "<string>",
"username": "<string>",
"rights": "<string>",
"accountType": "<string>",
"creationStatus": "<string>",
"creationSource": "<string>",
"groupName": "<string>",
"passwordChangePending": true,
"passwordChangedAt": "<string>",
"createdAt": "<string>"
}
]
}
},
"enforcement": {
"profile": {
"fleetId": "<string>",
"resendable": true,
"delivery": {
"profileUuid": "<string>",
"name": "<string>",
"status": "verified",
"operationType": "install",
"detail": "<string>",
"scope": "<string>"
},
"content": "<string>"
},
"script": {
"scriptId": 123,
"source": "<string>",
"lastExecution": {
"status": "ran",
"executedAt": "<string>",
"exitCode": 123,
"output": "<string>"
},
"policies": [
{
"id": 123,
"name": "<string>",
"query": "<string>",
"resolution": "<string>",
"response": "pass"
}
]
},
"software": {
"appId": "<string>",
"install": {
"softwareId": "<string>",
"softwareName": "<string>",
"status": "installed",
"installedVersion": "<string>",
"availableVersion": "<string>",
"lastInstalledAt": "2023-11-07T05:31:56Z"
}
},
"command": {
"id": "<string>",
"command": "<string>",
"status": "<string>",
"type": "<string>",
"source": "<string>",
"initiator": "<string>",
"remoteId": "<string>",
"payload": "<unknown>",
"result": "<unknown>",
"uuid": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}
],
"notFoundAlertIds": [
"<string>"
]
}Get the full remediation context of several compliance alerts
Return, for MULTIPLE compliance alerts in one call, the same payload as getComplianceAlertDetails — the alert, its MDM control with the configuration in clear, the device on both sides and the enforcement facets — as items, in the order of alertIds (up to 25 per call, from getComplianceAlerts or searchComplianceAlerts). Prefer this over calling getComplianceAlertDetails once per alert. An id that matches no alert of your company is listed in notFoundAlertIds instead of failing the call: the check no longer applies to that device, and asking again returns the same answer. Each alert weighs 3 to 8 KB, more when its control carries a large profile or script.
curl --request POST \
--url https://api.getprimo.com/compliance/alerts/details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alertIds": [
"<string>"
]
}
'import requests
url = "https://api.getprimo.com/compliance/alerts/details"
payload = { "alertIds": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({alertIds: ['<string>']})
};
fetch('https://api.getprimo.com/compliance/alerts/details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getprimo.com/compliance/alerts/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'alertIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getprimo.com/compliance/alerts/details"
payload := strings.NewReader("{\n \"alertIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getprimo.com/compliance/alerts/details")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alertIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/compliance/alerts/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alertIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"alert": {
"id": "<string>",
"deviceId": "<string>",
"deviceName": "<string>",
"devicePlatform": "ANDROID",
"owner": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"complianceRuleId": "<string>",
"ruleType": "<string>",
"mdmControlId": "<string>",
"status": "ACTIVE",
"additionalStatus": "MALWAREBYTES_AGENT_NOT_INSTALLED",
"detail": "<string>",
"hasAlert": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"statusSince": "2023-11-07T05:31:56Z"
},
"mdmControl": {
"id": "<string>",
"name": "<string>",
"category": "<string>",
"type": "<string>",
"identifier": "<string>",
"enabled": true,
"profileFleetId": "<string>",
"configurationPayload": {}
},
"device": {
"fleet": {
"fleetHostId": 123,
"uuid": "<string>",
"displayName": "<string>",
"hardwareSerial": "<string>",
"status": "online",
"seenTime": "<string>",
"detailUpdatedAt": "<string>",
"refetchRequested": true,
"uptime": 123,
"lastRestartedAt": "<string>",
"orbitVersion": "<string>",
"platform": "<string>",
"osVersion": "<string>",
"build": "<string>",
"codeName": "<string>",
"gigsDiskSpaceAvailable": 123,
"mdm": {
"enrollmentStatus": "<string>",
"name": "<string>",
"serverUrl": "<string>",
"connectedToFleet": true,
"depProfileError": true,
"deviceStatus": "<string>",
"pendingAction": "<string>",
"lastEnrolledAt": "<string>",
"lastMdmEnrolledAt": "<string>",
"lastMdmCheckedInAt": "<string>"
},
"encryption": {
"diskEncryptionEnabled": true,
"encryptionKeyAvailable": true,
"osSettingsStatus": "<string>",
"osSettingsDetail": "<string>",
"appleActionRequired": "rotate_key"
},
"profiles": [
{
"profileUuid": "<string>",
"name": "<string>",
"status": "verified",
"operationType": "install",
"detail": "<string>",
"scope": "<string>"
}
],
"labelNames": [
"<string>"
],
"idpUsername": "<string>",
"idpFullName": "<string>",
"bootstrapPackageStatus": "<string>",
"bootstrapPackageDetail": "<string>"
},
"primo": {
"scriptsEnabled": true,
"naming": {
"name": "<string>",
"computerName": "<string>",
"hostname": "<string>",
"computerNameSuggestion": "<string>",
"hostnameSuggestion": "<string>",
"mdmCommandInProgress": true,
"lastMDMCommandRunAt": "<string>",
"aiSuggestionFailure": {
"attempts": 123,
"lastAttemptAt": "<string>",
"failureType": "EMPTY_OUTPUT",
"attemptedName": "<string>",
"conflictingDeviceId": "<string>"
}
},
"malwarebytes": {
"protectionStatus": "<string>",
"hasAgentInstalled": true,
"hasAlerts": true,
"lastActive": "<string>",
"lastScriptRunAt": "<string>"
},
"sentinelOne": {
"installed": true,
"registeredAt": "<string>",
"lastActiveDate": "<string>",
"scanFinishedAt": "<string>",
"uninstalledAt": "<string>",
"infected": true
},
"encryption": {
"encrypted": true,
"recoveryKeyRemotelyAvailable": true
},
"recoveryOsStatus": "<string>",
"localUsers": [
{
"id": "<string>",
"username": "<string>",
"rights": "<string>",
"accountType": "<string>",
"creationStatus": "<string>",
"creationSource": "<string>",
"groupName": "<string>",
"passwordChangePending": true,
"passwordChangedAt": "<string>",
"createdAt": "<string>"
}
]
}
},
"enforcement": {
"profile": {
"fleetId": "<string>",
"resendable": true,
"delivery": {
"profileUuid": "<string>",
"name": "<string>",
"status": "verified",
"operationType": "install",
"detail": "<string>",
"scope": "<string>"
},
"content": "<string>"
},
"script": {
"scriptId": 123,
"source": "<string>",
"lastExecution": {
"status": "ran",
"executedAt": "<string>",
"exitCode": 123,
"output": "<string>"
},
"policies": [
{
"id": 123,
"name": "<string>",
"query": "<string>",
"resolution": "<string>",
"response": "pass"
}
]
},
"software": {
"appId": "<string>",
"install": {
"softwareId": "<string>",
"softwareName": "<string>",
"status": "installed",
"installedVersion": "<string>",
"availableVersion": "<string>",
"lastInstalledAt": "2023-11-07T05:31:56Z"
}
},
"command": {
"id": "<string>",
"command": "<string>",
"status": "<string>",
"type": "<string>",
"source": "<string>",
"initiator": "<string>",
"remoteId": "<string>",
"payload": "<unknown>",
"result": "<unknown>",
"uuid": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}
],
"notFoundAlertIds": [
"<string>"
]
}Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Body
Identifiers of the compliance alerts, as returned by getComplianceAlerts or searchComplianceAlerts. Up to 25 per call.
1 - 25 elements^[a-f\d]{24}$