API7 Docs

List all secret providers on a gateway group

GET /apisix/admin/secret_providers

GET /apisix/admin/secret_providers

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Query Parameters

page?integer

Page number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.

Formatint32
Range1 <= value
page_size?integer

Number of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.

Formatint32
Range1 <= value
direction?string

Order to list the resources by. The sorting index follows the configuration of order_by.

Default"desc"

Value in

  • "asc"
  • "desc"
order_by?string

Index to order resources by.

Default"updated_at"

Value in

  • "created_at"
  • "updated_at"
search?string

Condition to search resources by.

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?search=version%253Dv2&gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"

Get all secrets.

{
  "total": 1,
  "list": [
    {
      "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

List all secret providers on a gateway group

List secret provider integrations configured for the gateway group, such as Vault or cloud secret managers. Use this view to audit external secret backends available for plugin and route configurations. Required IAM Permission: Action gateway:GetSecretProvider, Resource arn:api7:gateway:gatewaygroup/%s/secret_provider/%s

Parameters

  • page (query, integer, optional): Page number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
  • page_size (query, integer, optional): Number of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
  • direction (query, string, optional): Order to list the resources by. The sorting index follows the configuration of order_by.
  • order_by (query, string, optional): Index to order resources by.
  • search (query, string, optional): Condition to search resources by.
  • gateway_group_id (query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.

Responses

  • 200: Get all secrets.
  • allOf variant 1
  • list (array, optional): An array of resources.
  • total (integer, optional): Total number of objects.
  • allOf variant 2
  • list (array, optional): Array of Secrets.
  • allOf variant 1
  • allOf variant 1
  • oneOf variant 1: Vault
  • list[].uri (string, required): Vault endpoint.
  • list[].prefix (string, required): Vault prefix to access secrets.
  • list[].token (string, required): Vault token.
  • list[].namespace (string, optional): Vault namespace.
  • list[].kv_version (string, optional): Vault KV secrets engine version.
  • list[].authentication_method (string, optional): Authentication method.
  • oneOf variant 2: AWS Secret
  • list[].access_key_id (string, required): AWS access key ID.
  • list[].secret_access_key (string, required): AWS secret access key.
  • list[].session_token (string, optional): AWS session token.
  • list[].region (string, optional): AWS region.
  • list[].endpoint_url (string, optional): AWS endpoint.
  • oneOf variant 3
  • list[].apiserver_addr (string, optional): Kubernetes API server Address.
  • list[].token (string, optional): Service account token for Kubernetes API authentication
  • list[].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
  • list[].desc (string, optional): The object description.
  • list[].labels (object, optional): Key-value pairs of labels.
  • allOf variant 2
  • list[].id (string, optional): Secret ID.
  • list[].secret_provider (string, optional): Type of secret manager.
  • list[].created_at (integer, optional): The object created timestamp.
  • list[].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'