Skip to content
Start here

Create a device posture integration

client.ZeroTrust.Devices.Posture.Integrations.New(ctx, params) (*Integration, error)
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
params DevicePostureIntegrationNewParams
AccountID param.Field[string]

Path param

Body param: The configuration object containing third-party integration information.

type DevicePostureIntegrationNewParamsConfigTeamsDevicesWorkspaceOneConfigRequest struct{…}
APIURL string

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

AuthURL string

The Workspace One Authorization URL depending on your region.

ClientID string

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

ClientSecret string

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

type DevicePostureIntegrationNewParamsConfigTeamsDevicesCrowdstrikeConfigRequest struct{…}
APIURL string

The Crowdstrike API URL.

ClientID string

The Crowdstrike client ID.

ClientSecret string

The Crowdstrike client secret.

CustomerID string

The Crowdstrike customer ID.

type DevicePostureIntegrationNewParamsConfigTeamsDevicesUptycsConfigRequest struct{…}
APIURL string

The Uptycs API URL.

ClientKey string

The Uptycs client secret.

ClientSecret string

The Uptycs client secret.

CustomerID string

The Uptycs customer ID.

type DevicePostureIntegrationNewParamsConfigTeamsDevicesIntuneConfigRequest struct{…}
ClientID string

The Intune client ID.

ClientSecret string

The Intune client secret.

CustomerID string

The Intune customer ID.

type DevicePostureIntegrationNewParamsConfigTeamsDevicesKolideConfigRequest struct{…}
ClientID string

The Kolide client ID.

ClientSecret string

The Kolide client secret.

type DevicePostureIntegrationNewParamsConfigTeamsDevicesTaniumConfigRequest struct{…}
APIURL string

The Tanium API URL.

ClientSecret string

The Tanium client secret.

AccessClientID stringOptional

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

AccessClientSecret stringOptional

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

type DevicePostureIntegrationNewParamsConfigTeamsDevicesSentineloneS2sConfigRequest struct{…}
APIURL string

The SentinelOne S2S API URL.

ClientSecret string

The SentinelOne S2S client secret.

type DevicePostureIntegrationNewParamsConfigTeamsDevicesCustomS2sConfigRequest struct{…}
AccessClientID string

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

AccessClientSecret string

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

APIURL string

The Custom Device Posture Integration API URL.

Interval param.Field[string]

Body param: 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 param.Field[string]

Body param: The name of the device posture integration.

Body param: The type of device posture integration.

const DevicePostureIntegrationNewParamsTypeWorkspaceOne DevicePostureIntegrationNewParamsType = "workspace_one"
const DevicePostureIntegrationNewParamsTypeCrowdstrikeS2s DevicePostureIntegrationNewParamsType = "crowdstrike_s2s"
const DevicePostureIntegrationNewParamsTypeUptycs DevicePostureIntegrationNewParamsType = "uptycs"
const DevicePostureIntegrationNewParamsTypeIntune DevicePostureIntegrationNewParamsType = "intune"
const DevicePostureIntegrationNewParamsTypeKolide DevicePostureIntegrationNewParamsType = "kolide"
const DevicePostureIntegrationNewParamsTypeTaniumS2s DevicePostureIntegrationNewParamsType = "tanium_s2s"
const DevicePostureIntegrationNewParamsTypeSentineloneS2s DevicePostureIntegrationNewParamsType = "sentinelone_s2s"
const DevicePostureIntegrationNewParamsTypeCustomS2s DevicePostureIntegrationNewParamsType = "custom_s2s"
ReturnsExpand Collapse
type Integration struct{…}
ID stringOptional

API UUID.

maxLength36
Config IntegrationConfigOptional

The configuration object containing third-party integration information.

APIURL string

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

AuthURL string

The Workspace One Authorization URL depending on your region.

ClientID string

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

Interval stringOptional

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 stringOptional

The name of the device posture integration.

Type IntegrationTypeOptional

The type of device posture integration.

One of the following:
const IntegrationTypeWorkspaceOne IntegrationType = "workspace_one"
const IntegrationTypeCrowdstrikeS2s IntegrationType = "crowdstrike_s2s"
const IntegrationTypeUptycs IntegrationType = "uptycs"
const IntegrationTypeIntune IntegrationType = "intune"
const IntegrationTypeKolide IntegrationType = "kolide"
const IntegrationTypeTaniumS2s IntegrationType = "tanium_s2s"
const IntegrationTypeSentineloneS2s IntegrationType = "sentinelone_s2s"
const IntegrationTypeCustomS2s IntegrationType = "custom_s2s"

Create a device posture integration

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/option"
  "github.com/stainless-sdks/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  integration, err := client.ZeroTrust.Devices.Posture.Integrations.New(context.TODO(), zero_trust.DevicePostureIntegrationNewParams{
    AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"),
    Config: cloudflare.F[zero_trust.DevicePostureIntegrationNewParamsConfigUnion](zero_trust.DevicePostureIntegrationNewParamsConfigTeamsDevicesWorkspaceOneConfigRequest{
      APIURL: cloudflare.F("https://as123.awmdm.com/API"),
      AuthURL: cloudflare.F("https://na.uemauth.workspaceone.com/connect/token"),
      ClientID: cloudflare.F("example client id"),
      ClientSecret: cloudflare.F("example client secret"),
    }),
    Interval: cloudflare.F("10m"),
    Name: cloudflare.F("My Workspace One Integration"),
    Type: cloudflare.F(zero_trust.DevicePostureIntegrationNewParamsTypeWorkspaceOne),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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
}