API7 Docs

Get a secret provider on a gateway group

GET /apisix/admin/secret_providers/{secret_provider}/{secret_provider_id}

GET /apisix/admin/secret_providers/{secret_provider}/{secret_provider_id}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

secret_provider*string

Secret provider.

Value in

  • "vault"
  • "aws"
  • "kubernetes"
secret_provider_id*string

Secret provider ID.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256

Query Parameters

gateway_group_id*string

Gateway group ID. Optional when using the gateway group admin key to authenticate.

Length1 <= length

Response Body

application/json

application/json

curl -X GET "$API_BASE_URL/apisix/admin/secret_providers/vault/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"

Get a secret by ID.

{
  "value": {
    "uri": "http://10.42.17.8:8200",
    "prefix": "kv/apisix",
    "token": "apisix-quickstart-vault-token",
    "namespace": "apisix",
    "kv_version": "kv-v1",
    "authentication_method": "token",
    "desc": "Object description.",
    "labels": {
      "version": "v2",
      "env": "prod"
    },
    "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
    "secret_provider": "vault",
    "created_at": 1742288232,
    "updated_at": 1742288235
  }
}
Complete operation details and schema variants

GET /apisix/admin/secret_providers/{secret_provider}/{secret_provider_id}

Get a secret provider on a gateway group

Retrieve details of one secret provider integration in the gateway group, including provider-specific connection settings. Required IAM Permission: Action gateway:GetSecretProvider, Resource arn:api7:gateway:gatewaygroup/%s/secret_provider/%s

Parameters

  • secret_provider (path, string, required): Secret provider.
  • secret_provider_id (path, string, required): Secret provider ID.
  • gateway_group_id (query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.

Responses

  • 200: Get a secret by ID.
  • allOf variant 1
  • value (object, optional): The specific resource.
  • allOf variant 2
  • value (object, optional): secret with management fields
  • allOf variant 1
  • allOf variant 1
  • oneOf variant 1: Vault
  • value.uri (string, required): Vault endpoint.
  • value.prefix (string, required): Vault prefix to access secrets.
  • value.token (string, required): Vault token.
  • value.namespace (string, optional): Vault namespace.
  • value.kv_version (string, optional): Vault KV secrets engine version.
  • value.authentication_method (string, optional): Authentication method.
  • oneOf variant 2: AWS Secret
  • value.access_key_id (string, required): AWS access key ID.
  • value.secret_access_key (string, required): AWS secret access key.
  • value.session_token (string, optional): AWS session token.
  • value.region (string, optional): AWS region.
  • value.endpoint_url (string, optional): AWS endpoint.
  • oneOf variant 3
  • value.apiserver_addr (string, optional): Kubernetes API server Address.
  • value.token (string, optional): Service account token for Kubernetes API authentication
  • value.token_file (string, optional): The path to the token file of the Kubernetes service account.
  • oneOf variant 1: Kubernetes Secret (Token)
  • oneOf variant 2: Kubernetes Secret (Token File)
  • allOf variant 2
  • value.desc (string, optional): The object description.
  • value.labels (object, optional): Key-value pairs of labels.
  • allOf variant 2
  • value.id (string, optional): Secret ID.
  • value.secret_provider (string, optional): Type of secret manager.
  • value.created_at (integer, optional): The object created timestamp.
  • value.updated_at (integer, optional): The object updated timestamp.
  • 400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
  • value (object, optional): The specific resource.
  • error_msg (string, optional): The error message.

cURL

curl -X GET '$API_BASE_URL/apisix/admin/secret_providers/{secret_provider}/{secret_provider_id}'