Skip to content

Auth Links

Upsert an auth link draft

View source specification ↗
POST /auth-link-drafts

Creates a DRAFT auth link for a plugin authorization variant and regionalization. A draft holds the customer-owned OAuth client and provider configuration while the customer completes setup; it is not usable by endpoints until the provider connection is established. Requires the plugin-establish-link permission, evaluated with the variant and regionalization as operation context. The same Idempotency-Key and payload replays the committed response.

Required scope

Any authenticated access token

Header parameters

Idempotency-KeystringRequired

Client-chosen key that makes a non-idempotent request retry-safe, following draft-ietf-httpapi-idempotency-key-header. A committed response is stored for 24 hours and replayed for the same principal, operation, key and payload. Missing key returns 400 IDEMPOTENCY_KEY_REQUIRED, a key longer than 255 characters returns 400 IDEMPOTENCY_KEY_INVALID, the same key with a different payload returns 422, and the same key while the first request is still in flight returns 409. Requests rolled back before external provider attempts do not consume the key. Group mutations retain terminal failed responses after provider attempts together with received provider truth; their operation contract defines these replayable outcomes.

minLength: 1

maxLength: 255

If-Matchstring

Required for a full replacement when the request identifies an existing resource. Send that resource's quoted strong etag from its last GET. A missing condition on a replacement returns 428 PRECONDITION_REQUIRED; a stale condition returns 412 PRECONDITION_FAILED. Omit this header when creating a new resource without an id. Wildcards are accepted only where the operation explicitly permits them.

minLength: 1

Request body

Required

Fields

idstring

Existing draft ID for full replacement. Omit to create a server-assigned draft.

pluginIdstringRequired

The plugin the link is for.

authorizationVariantIdstringRequired

The plugin authorization variant the link uses.

pattern: "^[a-z0-9][a-z0-9-]{0,62}$"

maxLength: 63

regionalizationIdstringRequired

The plugin regionalization the link targets.

pattern: "^[a-z0-9][a-z0-9-]{0,62}$"

maxLength: 63

providerConfigurationAuthLinkProviderConfiguration

Provider-specific, non-secret configuration of an auth link.

oauthClientExistingOAuthClient | NewOAuthClient

The customer OAuth client, either an existing secret or new client credentials.

Returns

200

Draft auth link replaced; committed responses replay for 24 hours.

Fields
idstring

The unique identifier for the auth link

pattern: "^port1/[^/]+/[^/]+/auth-links/[^/]+$"

ownerIdstring

The owner ID of the auth link

readOnly: true

associatedPrincipalIdstring

The ID of the associated principal that the auth link is established against

associatedSecretsarray<AuthLinkSecret>

List of associated secrets that are relevant to the auth link

idstringRequired

The unique identifier for the secret

rolestringRequired

The role a secret plays within an auth link.

Allowed values

  • OAUTH_CLIENT
  • PROVIDER_TOKEN
  • API_KEY
  • PERSONAL_ACCESS_TOKEN
  • USERNAME_PASSWORD
  • PUSH_CREDENTIALS
  • UNCLASSIFIED
associatedPluginIdstring

The ID of the associated plugin

ownerPrincipal

readOnly: true

statusstring

Lifecycle state of an auth link. A DRAFT is incomplete and not yet usable by endpoints.

readOnly: true

Allowed values

  • DRAFT
  • CONNECTED
authorizationVariantIdstring

The plugin authorization variant the link uses

regionalizationIdstring

The plugin regionalization the link targets

providerConfigurationAuthLinkProviderConfiguration

Provider-specific, non-secret configuration of an auth link.

etagstring

The quoted strong entity tag of the auth link, for If-Match

readOnly: true

readinessAuthLinkReadiness

Whether an auth link has everything its authorization variant requires.

readOnly: true

Response headers
ETagstring

Opaque strong entity tag of the returned resource version. Send it back in `If-Match` on the next mutation of the same resource.

201

Draft auth link created

Fields
idstring

The unique identifier for the auth link

pattern: "^port1/[^/]+/[^/]+/auth-links/[^/]+$"

ownerIdstring

The owner ID of the auth link

readOnly: true

associatedPrincipalIdstring

The ID of the associated principal that the auth link is established against

associatedSecretsarray<AuthLinkSecret>

List of associated secrets that are relevant to the auth link

idstringRequired

The unique identifier for the secret

rolestringRequired

The role a secret plays within an auth link.

Allowed values

  • OAUTH_CLIENT
  • PROVIDER_TOKEN
  • API_KEY
  • PERSONAL_ACCESS_TOKEN
  • USERNAME_PASSWORD
  • PUSH_CREDENTIALS
  • UNCLASSIFIED
associatedPluginIdstring

The ID of the associated plugin

ownerPrincipal

readOnly: true

statusstring

Lifecycle state of an auth link. A DRAFT is incomplete and not yet usable by endpoints.

readOnly: true

Allowed values

  • DRAFT
  • CONNECTED
authorizationVariantIdstring

The plugin authorization variant the link uses

regionalizationIdstring

The plugin regionalization the link targets

providerConfigurationAuthLinkProviderConfiguration

Provider-specific, non-secret configuration of an auth link.

etagstring

The quoted strong entity tag of the auth link, for If-Match

readOnly: true

readinessAuthLinkReadiness

Whether an auth link has everything its authorization variant requires.

readOnly: true

Response headers
ETagstring

Opaque strong entity tag of the returned resource version. Send it back in `If-Match` on the next mutation of the same resource.

Errors

400 BAD_REQUEST

Invalid request payload

Check the request fields and any validation details, then correct the payload.

403 FORBIDDEN

Forbidden - insufficient permissions

Check the linked account and its permissions for the device or resource.

404

The supplied draft ID does not exist.

Verify the target identifier and that its endpoint or plugin route still exists.

409 CONFLICT

The Idempotency-Key request is still in flight

Check the device’s current mode or state. Retry only after the conflict is resolved.

412

The draft changed since the supplied etag.

Inspect the returned code and family and follow the error handling guide.

422 UNPROCESSABLE_ENTITY

The Idempotency-Key was already used with a different payload

Correct the rejected value using the constraints in the error details or request schema.

428

If-Match is required for replacement.

Inspect the returned code and family and follow the error handling guide.

Enumerate reusable OAuth client credentials

View source specification ↗
GET /auth-link-client-credentials

Lists metadata of the caller's own OAuth client secrets that the caller's auth links for the plugin reference, never the secret values. Only links the caller may read are considered. The list is self-scoped and needs no plugin-establish-link permission.

Required scope

Any authenticated access token

Query parameters

pluginIdstringRequired

The plugin whose OAuth client credentials to list.

maxResultsinteger

Maximum number of results to return.

minimum: 1

maximum: 100

nextTokenstring

Opaque token for the next page of results. Pass the continuation token returned by the previous response, unchanged. Omit it to start from the first page.

Returns

200

OAuth client credentials retrieved successfully

Fields
resultsarray<AuthLinkClientCredentialSummary>Required

A reusable customer OAuth client, without its secret.

idstringRequired

The secret ID of the client credential.

typestringRequired

The secret type.

clientIdstringRequired

The OAuth client ID.

updatedAtstringRequired

format: "date-time"

etagstringRequired

The quoted strong entity tag of the credential.

paginationContextPaginationContext

Errors

400 BAD_REQUEST

Invalid request payload

Check the request fields and any validation details, then correct the payload.

403 FORBIDDEN

Forbidden - insufficient permissions

Check the linked account and its permissions for the device or resource.