Skip to content
Start here

Create a device posture integration

zero_trust.devices.posture.integrations.create(IntegrationCreateParams**kwargs) -> Integration
POST/accounts/{account_id}/devices/posture/integration

Create a new device posture integration.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Zero Trust Write
ParametersExpand Collapse
account_id: str
config: Config

The configuration object containing third-party integration information.

One of the following:
class ConfigTeamsDevicesWorkspaceOneConfigRequest:
api_url: str

The Workspace One API URL provided in the Workspace One Admin Dashboard.

auth_url: str

The Workspace One Authorization URL depending on your region.

client_id: str

The Workspace One client ID provided in the Workspace One Admin Dashboard.

client_secret: str

The Workspace One client secret provided in the Workspace One Admin Dashboard.

class ConfigTeamsDevicesCrowdstrikeConfigRequest:
api_url: str

The Crowdstrike API URL.

client_id: str

The Crowdstrike client ID.

client_secret: str

The Crowdstrike client secret.

customer_id: str

The Crowdstrike customer ID.

class ConfigTeamsDevicesUptycsConfigRequest:
api_url: str

The Uptycs API URL.

client_key: str

The Uptycs client secret.

client_secret: str

The Uptycs client secret.

customer_id: str

The Uptycs customer ID.

class ConfigTeamsDevicesIntuneConfigRequest:
client_id: str

The Intune client ID.

client_secret: str

The Intune client secret.

customer_id: str

The Intune customer ID.

class ConfigTeamsDevicesKolideConfigRequest:
client_id: str

The Kolide client ID.

client_secret: str

The Kolide client secret.

class ConfigTeamsDevicesTaniumConfigRequest:
api_url: str

The Tanium API URL.

client_secret: str

The Tanium client secret.

access_client_id: Optional[str]

If present, this id will be passed in the CF-Access-Client-ID header when hitting the api_url.

access_client_secret: Optional[str]

If present, this secret will be passed in the CF-Access-Client-Secret header when hitting the api_url.

class ConfigTeamsDevicesSentineloneS2sConfigRequest:
api_url: str

The SentinelOne S2S API URL.

client_secret: str

The SentinelOne S2S client secret.

class ConfigTeamsDevicesCustomS2sConfigRequest:
access_client_id: str

This id will be passed in the CF-Access-Client-ID header when hitting the api_url.

access_client_secret: str

This secret will be passed in the CF-Access-Client-Secret header when hitting the api_url.

api_url: str

The Custom Device Posture Integration API URL.

interval: str

The interval between each posture check with the third-party API. Use m for minutes (e.g. 5m) and h for hours (e.g. 12h).

name: str

The name of the device posture integration.

type: Literal["workspace_one", "crowdstrike_s2s", "uptycs", 5 more]

The type of device posture integration.

One of the following:
"workspace_one"
"crowdstrike_s2s"
"uptycs"
"intune"
"kolide"
"tanium_s2s"
"sentinelone_s2s"
"custom_s2s"
ReturnsExpand Collapse
class Integration:
id: Optional[str]

API UUID.

maxLength36
config: Optional[Config]

The configuration object containing third-party integration information.

api_url: str

The Workspace One API URL provided in the Workspace One Admin Dashboard.

auth_url: str

The Workspace One Authorization URL depending on your region.

client_id: str

The Workspace One client ID provided in the Workspace One Admin Dashboard.

interval: Optional[str]

The interval between each posture check with the third-party API. Use m for minutes (e.g. 5m) and h for hours (e.g. 12h).

name: Optional[str]

The name of the device posture integration.

type: Optional[Literal["workspace_one", "crowdstrike_s2s", "uptycs", 5 more]]

The type of device posture integration.

One of the following:
"workspace_one"
"crowdstrike_s2s"
"uptycs"
"intune"
"kolide"
"tanium_s2s"
"sentinelone_s2s"
"custom_s2s"

Create a device posture integration

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
integration = client.zero_trust.devices.posture.integrations.create(
    account_id="699d98642c564d2e855e9661899b7252",
    config={
        "api_url": "https://as123.awmdm.com/API",
        "auth_url": "https://na.uemauth.workspaceone.com/connect/token",
        "client_id": "example client id",
        "client_secret": "example client secret",
    },
    interval="10m",
    name="My Workspace One Integration",
    type="workspace_one",
)
print(integration.id)
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "config": {
      "api_url": "https://as123.awmdm.com/API",
      "auth_url": "https://na.uemauth.workspaceone.com/connect/token",
      "client_id": "example client id"
    },
    "interval": "10m",
    "name": "My Workspace One Integration",
    "type": "workspace_one"
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "config": {
      "api_url": "https://as123.awmdm.com/API",
      "auth_url": "https://na.uemauth.workspaceone.com/connect/token",
      "client_id": "example client id"
    },
    "interval": "10m",
    "name": "My Workspace One Integration",
    "type": "workspace_one"
  },
  "success": true
}