Create integration
zero_trust.casb.integrations.create(IntegrationCreateParams**kwargs) -> IntegrationCreateResponse
POST/accounts/{account_id}/one/integrations
Creates a new integration for the specified application.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Parameters
Create 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.casb.integrations.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
application="GOOGLE_WORKSPACE",
credentials={
"admin_email": "admin@corp.com"
},
name="My Google Workspace",
auth_method="service_account",
dlp_profiles=["e91a2360-da51-4fdf-9711-bcdecd462614"],
permissions=["https://www.googleapis.com/auth/drive.readonly"],
use_cases=["casb", "ces"],
)
print(integration.id){
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"application": {
"foo": "string"
},
"auth_method": {
"foo": "string"
},
"authorization_link": {
"components": {
"foo": "bar"
},
"link": "link"
},
"created": "2019-12-27T18:11:19.117Z",
"credentials_expiry": "2019-12-27T18:11:19.117Z",
"dlp_profiles": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"health_details": [
{
"foo": "bar"
}
],
"is_paused": true,
"last_hydrated": "2019-12-27T18:11:19.117Z",
"name": "name",
"organization_id": 0,
"status": "status",
"updated": "2019-12-27T18:11:19.117Z",
"use_cases": [
{
"foo": "bar"
}
]
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"application": {
"foo": "string"
},
"auth_method": {
"foo": "string"
},
"authorization_link": {
"components": {
"foo": "bar"
},
"link": "link"
},
"created": "2019-12-27T18:11:19.117Z",
"credentials_expiry": "2019-12-27T18:11:19.117Z",
"dlp_profiles": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"health_details": [
{
"foo": "bar"
}
],
"is_paused": true,
"last_hydrated": "2019-12-27T18:11:19.117Z",
"name": "name",
"organization_id": 0,
"status": "status",
"updated": "2019-12-27T18:11:19.117Z",
"use_cases": [
{
"foo": "bar"
}
]
}