Providers
Grant a connection to an agent
POST /v1/connection-grants · SDK createConnectionGrant · CLI deployments grant create
POST
platformBearerheader
AuthorizationBearer <token>Platform bearer credential accepted as an opaque API key or JWT.
x-deployments-environment*stringMatch
^[0-7][0-9A-HJKMNP-TV-Z]{25}$idempotency-key*stringLength
1 <= length <= 512application/json- body
connectionId*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$externalResourceConstraints?purpose*stringMatch
^\S[\s\S]*\S$|^\S$|^$Length
1 <= length <= 2048scopes*array<>workspaceId*|Workspace whose runs may use the connection. null grants every workspace in the environment and is accepted only for a connection that uses no credential; any other connection fails with 422 environment_grant_requires_credentialless_connection.
ConnectionGrantResponse
application/json- response
authorizationVersion*integerRange
0 <= valueconnectionId*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$createdAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeexternalAccountId*stringexternalResourceConstraints*id*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$providerKey*stringMatch
^[a-z0-9](?:[a-z0-9._-]{0,126}[a-z0-9])?$purpose*stringscopes*array<string>status*stringValue in
"active""revoked"updatedAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeversion*integerRange
0 <= valueworkspaceId*|Granted workspace, or null when the grant covers every workspace in the environment.
curl -X POST "https://example.com/v1/connection-grants" \ -H "x-deployments-environment: string" \ -H "idempotency-key: string" \ -H "Content-Type: application/json" \ -d '{ "connectionId": "string", "purpose": "string", "scopes": [ "string" ], "workspaceId": "string" }'{ "authorizationVersion": 0, "connectionId": "string", "createdAt": "2019-08-24T14:15:22Z", "externalAccountId": "string", "externalResourceConstraints": { "property1": null, "property2": null }, "id": "string", "providerKey": "string", "purpose": "string", "scopes": [ "string" ], "status": "active", "updatedAt": "2019-08-24T14:15:22Z", "version": 0, "workspaceId": "string"}