API7 Docs
API7 GatewayAPI7 Enterprise Developer Portal APIsList all Credentials

List all Credentials

GET /api/credentials

GET /api/credentials

Interactive request editor loads with JavaScript.

Authorization

BearerAuth DeveloperIDHeader
AuthorizationBearer <token>

In: header

X-Portal-Developer-ID<token>

In: header

Query Parameters

application_id?array<>
auth_method?string

The authentication method of the developer credential.

Value in

  • "key-auth"
  • "basic-auth"
  • "oauth"
plugin_name?string
Deprecated

The plugin name of the application credential, recommended to use auth_method instead.

Length1 <= length <= 100
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 credentials by.

Default"updated_at"

Value in

  • "created_at"
  • "updated_at"
  • "name"
search?string

Condition to search resources by.

labels?string

Label(s) to filter resources by. The format is labels[key]=value and should be URL-encoded.

Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "$API_BASE_URL/api/credentials?search=version%253Dv2"

{
  "list": [
    {
      "application_id": "default",
      "application_name": "us-west-rsc",
      "desc": "Object description.",
      "labels": {
        "version": "v2",
        "env": "prod"
      },
      "type": "key-auth",
      "name": "us-west-rsc",
      "key-auth": {
        "key": "string"
      },
      "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "created_at": "2025-01-01T00:00:00.000Z",
      "updated_at": "2025-01-01T00:00:00.000Z"
    }
  ],
  "total": 1
}
Complete operation details and schema variants

GET /api/credentials

List all Credentials

Parameters

  • application_id (query, array, optional):
  • auth_method (query, string, optional): The authentication method of the developer credential.
  • plugin_name (query, string, optional): The plugin name of the application credential, recommended to use auth_method instead.
  • 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 credentials by.
  • search (query, string, optional): Condition to search resources by.
  • labels (query, string, optional): Label(s) to filter resources by. The format is labels[key]=value and should be URL-encoded.

Responses

  • 200:
  • list (array, required): An array of application credentials.
  • allOf variant 1
  • oneOf variant 1
  • allOf variant 1
  • list[].application_id (string, required): Application ID.
  • list[].application_name (string, required): The object name.
  • list[].desc (string, optional): The object description.
  • list[].labels (object, optional): Key-value pairs of labels.
  • allOf variant 2
  • list[].type (string, required): The credential type.
  • list[].name (string, required): The object name.
  • list[].key-auth (object, optional): Key Auth configuration.
  • list[].key-auth.key (string, optional): The key is only returned upon creation or regeneration.
  • oneOf variant 2
  • allOf variant 1
  • list[].application_id (string, required): Application ID.
  • list[].application_name (string, required): The object name.
  • list[].desc (string, optional): The object description.
  • list[].labels (object, optional): Key-value pairs of labels.
  • allOf variant 2
  • list[].type (string, required): The credential type.
  • list[].name (string, required): The object name.
  • list[].basic-auth (object, optional): Basic Auth configuration.
  • list[].basic-auth.username (string, optional): The username.
  • list[].basic-auth.password (string, optional): The password is only returned upon creation or regeneration.
  • oneOf variant 3
  • allOf variant 1
  • list[].application_id (string, required): Application ID.
  • list[].application_name (string, required): The object name.
  • list[].desc (string, optional): The object description.
  • list[].labels (object, optional): Key-value pairs of labels.
  • allOf variant 2
  • list[].type (string, required): The credential type.
  • list[].oauth (object, required):
  • list[].oauth.dcr_provider_id (string, required): The DCR provider ID.
  • list[].oauth.dcr_provider (object, optional):
  • list[].oauth.dcr_provider.id (string, required): The object ID.
  • list[].oauth.dcr_provider.name (string, required): The name of the Dynamic Client Registration (DCR) Provider.
  • list[].oauth.dcr_provider.provider_type (string, optional): The type of DCR provider.
  • list[].oauth.dcr_provider.issuer (string, required): The issuer URL of the Authorization Server.
  • list[].oauth.client_id (string, required): The client ID.
  • list[].oauth.client_secret (string, optional): The client secret is only returned upon creation or regeneration.
  • list[].oauth.redirect_uris (array, optional): The redirect URIs.
  • allOf variant 2
  • list[].id (string, required): The object ID.
  • list[].created_at (string, required): The time when the object was created in ISO 8601 format.
  • list[].updated_at (string, required): The time when the object was last updated in ISO 8601 format.
  • total (integer, required): Total number of objects.
  • 400: Bad request.
  • status (integer, required): The HTTP status code of the error response.
  • message (string, required): The error message.
  • 401: Unauthorized. Response fields (application/json): identical to GET /api/credentials, response 400 above.
  • 500: Internal server error.

cURL

curl -X GET '$API_BASE_URL/api/credentials'