API reference

/v1/url-auth-policies

7 operations · 7 support API keys

← All groups · First call? Read the tutorial: auth, permissions, requests and responses, common failures

MethodPathSummaryAuth
GET/v1/url-auth-policiesList tenant URL authentication policiesAPI keySession
POST/v1/url-auth-policiesCreate a site-bound HMAC-SHA256 URL authentication policyAPI keySession
GET/v1/url-auth-policies/{id}Get URL authentication policy metadataAPI keySession
PATCH/v1/url-auth-policies/{id}Replace URL authentication policy fields using optimistic concurrencyAPI keySession
GET/v1/url-auth-policies/{id}/edge-snapshotGet the deterministic edge-compatible policy snapshotAPI keySession
POST/v1/url-auth-policies/{id}/revokeRevoke the current previous keyAPI keySession
POST/v1/url-auth-policies/{id}/rotateRotate the current HMAC keyAPI keySession

Contract file:api/openapi/v1/control.yaml

Operation details

GET /v1/url-auth-policies

List tenant URL authentication policies

operationId
listURLAuthPolicies
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Description (from the contract)

Requires url_auth_policies.read. Tenant identities are restricted to their active scope and owner metadata is omitted.

Parameters

listURLAuthPolicies Parameters
NameInTypeRequiredDescription
pagequeryintegerNo—
limitqueryintegerNo—
statusquerystring: enabled / disabledNo—
namequerystringNo—
site_idquerystring(uuid)No—

Responses

listURLAuthPolicies Responses
StatusDescription
200Stable page ordered newest first. Secret material is never returned.

Fields:items: array<URLAuthPolicy> total: integer(int64) page: integer limit: integer

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/url-auth-policies

Create a site-bound HMAC-SHA256 URL authentication policy

operationId
createURLAuthPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Description (from the contract)

Requires url_auth_policies.manage. The generated key secret is returned exactly once on the first successful request. An identical idempotent replay returns the same policy with replayed=true and no secret. CDNFly Type A, Type B, and MD5 are migration provenance only and cannot be selected for new execution. This endpoint records a deterministic edge-compatible snapshot but does not publish it to Gateway or an edge node.

Parameters

createURLAuthPolicy Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYes—

Request body

application/json · Required:Yes

createURLAuthPolicy Request body
NameTypeRequiredDescription
site_idstring(uuid)Yes—
namestringYes—
enabledbooleanYes—
algorithmstringYes—
signature_parameterstringYes—
expiration_parameterstringYes—
key_id_parameterstringYes—
bind_client_ipbooleanYes—
max_clock_skew_secondsintegerYes—
max_validity_secondsintegerYes—
max_signature_usesintegerYes—
excluded_query_parametersarray<string>Yes—
trusted_proxy_cidrsarray<string>Yes—
target_scope_idstring(uuid)No—
owner_idstring(uuid)No—

Responses

createURLAuthPolicy Responses
StatusDescription
201Policy, revision-one snapshot, and first-response-only key secret.

Fields:policy: URLAuthPolicy secret?: string replayed: boolean

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
409The requested state conflicts with an existing resource or idempotency fact.
503A required dependency is unavailable.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

GET /v1/url-auth-policies/{id}

Get URL authentication policy metadata

operationId
getURLAuthPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Parameters

getURLAuthPolicy Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—

Responses

getURLAuthPolicy Responses
StatusDescription
200Current policy and key metadata without secret, digest, or ciphertext.

Fields:site_id: string(uuid) name: string enabled: boolean algorithm: string signature_parameter: string expiration_parameter: string key_id_parameter: string bind_client_ip: boolean max_clock_skew_seconds: integer max_validity_seconds: integer max_signature_uses: integer excluded_query_parameters: array<string> trusted_proxy_cidrs: array<string> id: string(uuid) scope_id: string(uuid) owner?: URLAuthOwner | null site: URLAuthSite migration_marker?: string: cdnfly_type_a_md5 / cdnfly_type_b_md5 current_key: URLAuthKeyMetadata previous_key?: URLAuthKeyMetadata version: integer(int64) created_at: string(date-time) updated_at: string(date-time)

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

PATCH /v1/url-auth-policies/{id}

Replace URL authentication policy fields using optimistic concurrency

operationId
updateURLAuthPolicy
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Description (from the contract)

Requires url_auth_policies.manage. The algorithm remains fixed to hmac-sha256 and migration_marker is read-only.

Parameters

updateURLAuthPolicy Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Request body

application/json · Required:Yes

updateURLAuthPolicy Request body
NameTypeRequiredDescription
site_idstring(uuid)Yes—
namestringYes—
enabledbooleanYes—
algorithmstringYes—
signature_parameterstringYes—
expiration_parameterstringYes—
key_id_parameterstringYes—
bind_client_ipbooleanYes—
max_clock_skew_secondsintegerYes—
max_validity_secondsintegerYes—
max_signature_usesintegerYes—
excluded_query_parametersarray<string>Yes—
trusted_proxy_cidrsarray<string>Yes—

Responses

updateURLAuthPolicy Responses
StatusDescription
200Updated policy and immutable snapshot, or a matching replay.

Fields:policy: URLAuthPolicy replayed: boolean

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

GET /v1/url-auth-policies/{id}/edge-snapshot

Get the deterministic edge-compatible policy snapshot

operationId
getURLAuthPolicyEdgeSnapshot
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Description (from the contract)

Returns the current cdnca.edge.urlauth/v1 document and its SHA-256. Key paths are deterministic references; no key material is returned. Gateway packaging and delivery are intentionally outside this slice.

Parameters

getURLAuthPolicyEdgeSnapshot Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—

Responses

getURLAuthPolicyEdgeSnapshot Responses
StatusDescription
200Current immutable edge snapshot.

Fields:policy_id: string(uuid) version: integer(int64) sha256: string document: URLAuthEdgePolicy

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/url-auth-policies/{id}/revoke

Revoke the current previous key

operationId
revokeURLAuthPolicyPreviousKey
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Description (from the contract)

The current signing key cannot be revoked. Disable the policy first when URL authentication must stop.

Parameters

revokeURLAuthPolicyPreviousKey Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Request body

application/json · Required:Yes

revokeURLAuthPolicyPreviousKey Request body
NameTypeRequiredDescription
key_idstringYes—

Responses

revokeURLAuthPolicyPreviousKey Responses
StatusDescription
200Previous key revoked and policy version incremented.

Fields:policy: URLAuthPolicy replayed: boolean

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list

POST /v1/url-auth-policies/{id}/rotate

Rotate the current HMAC key

operationId
rotateURLAuthPolicyKey
Auth
  • API key: header Authorization: CdncaKey <key_id>.<secret>. Effective permissions are the key scopes intersected with the owner’s current permissions.
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Description (from the contract)

Promotes the current key to previous, revokes an older previous key, and returns the new secret exactly once. Matching idempotent replay returns no secret.

Parameters

rotateURLAuthPolicyKey Parameters
NameInTypeRequiredDescription
idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
If-MatchheaderstringYes—

Responses

rotateURLAuthPolicyKey Responses
StatusDescription
200Rotated policy and first-response-only key secret.

Fields:policy: URLAuthPolicy secret?: string replayed: boolean

400The request body or parameters are invalid.
401Authentication failed or the session is invalid.
403The authenticated principal is not allowed to perform the action.
404The requested resource was not found.
409The requested state conflicts with an existing resource or idempotency fact.
503A required dependency is unavailable.
500The request could not be completed because of an internal failure.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.
  • 500 Outcome unknown: read back by ID or list first, then decide whether to retry with the original Idempotency-Key.

↑ Back to list