Skip to main content

Provision

Automatically provision a well-known drive integration (Google Drive or OneDrive) with pre-configured OAuth settings. This is an idempotent endpoint — if an integration of the requested type already exists, it returns the existing one.

POST /api/integrations/provision

Provision or retrieve a drive integration by type.

Authentication: Required

Permissions:

  • If an integration of the requested type already exists, any authenticated user with integrations.read can retrieve it.
  • If no integration exists yet, the user must also have integrationCreation permission to create one. Otherwise a 403 is returned.

Request Body:

FieldTypeRequiredDescription
driverTypestringYesThe drive type to provision. Must be googledrive or onedrive.

Example Request:

{
"driverType": "googledrive"
}

Response (201 Created): When a new integration is provisioned.

{
"id": "abc123",
"type": "googledrive",
"name": "Google Drive",
"imageUrl": "/images/icons/integrations/googledrive.svg",
"clientId": "entrinsik_google_drive",
"shared": true,
"ownerId": "admin"
}

Response (200 OK): When an existing integration of the requested type is found.

{
"id": "abc123",
"type": "googledrive",
"name": "Google Drive",
"shared": true
}

Error Responses:

StatusDescription
400Invalid or missing driverType
403No integration exists and user lacks integrationCreation permission
Idempotent

This endpoint is safe to call multiple times. The first call creates the integration; subsequent calls return the existing one. This makes it ideal for on-demand provisioning from features like the Drive Upload job action.