Create a shared credential for a provider
Changed onCreates a shared credential for a provider. For a static_secret provider, stores a literal secret value (at most one, a second create returns 409). For a shared authorization_code provider, mints an OAuth enrollment URL for an admin to complete once instead of accepting a secret value.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Path parameters
ID of the directory
ID of the vault provider
Request body
The secret to store. Required and used verbatim for a static_secret provider. Must be omitted for a shared authorization_code provider, where the response instead carries an enrollment_url for an admin to complete OAuth consent.
Pre-issued static credential (API key, PAT, etc.). Stored encrypted, never returned in read APIs.
CEL expression deciding which callers this credential applies to. Omit to make it the provider's default, which applies to every caller and is considered after all the others.
Order in which this credential is considered, lowest first. Required with a selector, and must be omitted without one.
Response
Shared credential metadata (never includes the value)
Contains a unique identifier used for this resource.
CEL expression deciding which callers this credential applies to. Omit to make it the provider's default, which applies to every caller and is considered after all the others.
Order in which this credential is considered, lowest first. Required with a selector, and must be omitted without one.
"pending" until admin enrollment completes; "active" once the secret exists.
URL to complete OAuth consent. Fresh on every get-by-id call; set on create for a shared authorization_code provider. Omitted from list responses.
Example response
{
"id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7"
}Changes
- info
endpoint added
- info