The Device Posture Checks API provides operations to manage custom device posture checks for use in device assurance policies in your organization.
Lists all device posture checks
OK
Forbidden
Too Many Requests
[- {
- "createdBy": "00u217pyf72CdUrBt1c5",
- "createdDate": "2019-10-02T18:03:07.000Z",
- "description": "Query macOS devices to check if firewall is enabled",
- "id": "dch3m8o4rWhwReDeM1c5",
- "lastUpdate": "2019-10-02T18:03:07.000Z",
- "lastUpdatedBy": "00u217pyf72CdUrBt1c5",
- "mappingType": "CHECKBOX",
- "name": "Device posture check macOS",
- "platform": "MACOS",
- "query": "SELECT CASE WHEN global_state = 0 THEN 0 ELSE 1 END AS firewall_enabled FROM alf;",
- "remediationSettings": {
- "link": {
- "customUrl": "example.myremediationurl.com/docs"
}, - "message": {
- "defaultI18nKey": "macos.firewall.enabled.remediation.message",
- "customText": "It is our company policy that all devices must have a firewall enabled."
}
}, - "type": "BUILTIN",
- "variableName": "macOSFirewall",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "DELETE"
]
}, - "href": "string",
- "name": "string",
- "templated": true,
- "type": "string"
}
}
}
]
Creates a device posture check
OK
Bad Request
Forbidden
Too Many Requests
{- "name": "Device posture check macOS",
- "description": "Query macOS devices to check if firewall is enabled",
- "variableName": "macOSFirewall",
- "platform": "MACOS",
- "type": "CUSTOM",
- "mappingType": "CHECKBOX",
- "query": "SELECT CASE WHEN global_state = 0 THEN 0 ELSE 1 END AS firewall_enabled FROM alf;",
- "remediationSettings": {
- "message": {
- "defaultI18nKey": null,
- "customText": "It is our company policy that all devices must have a firewall enabled."
}, - "link": {
- "defaultUrl": null,
- "customUrl": "example.myremediationurl.com/docs"
}
}
}
{- "id": "dch3m8o4rWhwReDeM1c5",
- "name": "Device posture check macOS",
- "lastUpdate": "2022-01-01T00:00:00.000Z",
- "createdUpdate": "2022-01-01T00:00:00.000Z",
- "lastUpdatedBy": "00u217pyf72CdUrBt1c5",
- "createdBy": "00u217pyf72CdUrBt1c5",
- "description": "Query macOS devices to check if firewall is enabled",
- "variableName": "macOSFirewall",
- "query": "SELECT CASE WHEN global_state = 0 THEN 0 ELSE 1 END AS firewall_enabled FROM alf;",
- "platform": "MACOS",
- "type": "CUSTOM",
- "mappingType": "CHECKBOX",
- "remediationSettings": {
- "message": {
- "defaultI18nKey": null,
- "customText": "It is our company policy that all devices must have a firewall enabled."
}, - "link": {
- "defaultUrl": null,
- "customUrl": "example.myremediationurl.com/docs"
}
}, - "_links": {
- "self": {
- "hints": {
- "allow": [
- "DELETE",
- "GET",
- "PUT"
]
}
}
}
}
Lists all default device posture checks. Default device posture checks are defined by Okta. Their type will always be BUILTIN
.
OK
Forbidden
Too Many Requests
[- {
- "createdBy": "00u217pyf72CdUrBt1c5",
- "createdDate": "2019-10-02T18:03:07.000Z",
- "description": "Query macOS devices to check if firewall is enabled",
- "id": "dch3m8o4rWhwReDeM1c5",
- "lastUpdate": "2019-10-02T18:03:07.000Z",
- "lastUpdatedBy": "00u217pyf72CdUrBt1c5",
- "mappingType": "CHECKBOX",
- "name": "Device posture check macOS",
- "platform": "MACOS",
- "query": "SELECT CASE WHEN global_state = 0 THEN 0 ELSE 1 END AS firewall_enabled FROM alf;",
- "remediationSettings": {
- "link": {
- "customUrl": "example.myremediationurl.com/docs"
}, - "message": {
- "defaultI18nKey": "macos.firewall.enabled.remediation.message",
- "customText": "It is our company policy that all devices must have a firewall enabled."
}
}, - "type": "BUILTIN",
- "variableName": "macOSFirewall",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "DELETE"
]
}, - "href": "string",
- "name": "string",
- "templated": true,
- "type": "string"
}
}
}
]
Retrieves a device posture check by postureCheckId
OK
Forbidden
Not Found
Too Many Requests
{- "id": "dch3m8o4rWhwReDeM1c5",
- "name": "Device posture check macOS",
- "lastUpdate": "2022-01-01T00:00:00.000Z",
- "createdUpdate": "2022-01-01T00:00:00.000Z",
- "lastUpdatedBy": "00u217pyf72CdUrBt1c5",
- "createdBy": "00u217pyf72CdUrBt1c5",
- "description": "Query macOS devices to check if firewall is enabled",
- "variableName": "macOSFirewall",
- "query": "SELECT CASE WHEN global_state = 0 THEN 0 ELSE 1 END AS firewall_enabled FROM alf;",
- "platform": "MACOS",
- "type": "CUSTOM",
- "mappingType": "CHECKBOX",
- "remediationSettings": {
- "message": {
- "defaultI18nKey": null,
- "customText": "It is our company policy that all devices must have a firewall enabled."
}, - "link": {
- "defaultUrl": null,
- "customUrl": "example.myremediationurl.com/docs"
}
}, - "_links": {
- "self": {
- "hints": {
- "allow": [
- "DELETE",
- "GET",
- "PUT"
]
}
}
}
}
Replaces a device posture check by postureCheckId
description | string Description of the device posture check | ||||||||
mappingType | string (DevicePostureChecksMappingType) Represents how the device posture check is rendered in device assurance policies | ||||||||
name | string Display name of the device posture check | ||||||||
platform | string (DevicePostureChecksPlatform) Enum: "MACOS" "WINDOWS" | ||||||||
query | string OSQuery for the device posture check | ||||||||
object (DevicePostureChecksRemediationSettings) Represents the remediation instructions shown to the end user when the device posture check fails | |||||||||
| |||||||||
type | string (DevicePostureChecksType) Enum: "BUILTIN" "CUSTOM" | ||||||||
variableName | string Unique name of the device posture check |
OK
Bad Request
Forbidden
Not Found
Too Many Requests
{- "name": "Device posture check macOS",
- "description": "Query macOS devices to check if firewall is enabled",
- "variableName": "macOSFirewall",
- "platform": "MACOS",
- "type": "CUSTOM",
- "mappingType": "CHECKBOX",
- "query": "SELECT CASE WHEN global_state = 0 THEN 0 ELSE 1 END AS firewall_enabled FROM alf;",
- "remediationSettings": {
- "message": {
- "defaultI18nKey": null,
- "customText": "It is our company policy that all devices must have a firewall enabled."
}, - "link": {
- "defaultUrl": null,
- "customUrl": "example.myremediationurl.com/docs"
}
}
}
{- "id": "dch3m8o4rWhwReDeM1c5",
- "name": "Device posture check macOS",
- "lastUpdate": "2022-01-01T00:00:00.000Z",
- "createdUpdate": "2022-01-01T00:00:00.000Z",
- "lastUpdatedBy": "00u217pyf72CdUrBt1c5",
- "createdBy": "00u217pyf72CdUrBt1c5",
- "description": "Query macOS devices to check if firewall is enabled",
- "variableName": "macOSFirewall",
- "query": "SELECT CASE WHEN global_state = 0 THEN 0 ELSE 1 END AS firewall_enabled FROM alf;",
- "platform": "MACOS",
- "type": "CUSTOM",
- "mappingType": "CHECKBOX",
- "remediationSettings": {
- "message": {
- "defaultI18nKey": null,
- "customText": "It is our company policy that all devices must have a firewall enabled."
}, - "link": {
- "defaultUrl": null,
- "customUrl": "example.myremediationurl.com/docs"
}
}, - "_links": {
- "self": {
- "hints": {
- "allow": [
- "DELETE",
- "GET",
- "PUT"
]
}
}
}
}
Deletes a device posture check by postureCheckId
. You can't delete the device posture check if it's used in a device assurance policy.
No Content
Forbidden
Not Found
Conflict
Too Many Requests
{- "errorCode": "E0000006",
- "errorSummary": "You do not have permission to perform the requested action",
- "errorLink": "E0000006",
- "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
- "errorCauses": [ ]
}