API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsList all users

List all users

GET /api/users

GET /api/users

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Query Parameters

direction?string

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

Default"desc"

Value in

  • "asc"
  • "desc"
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
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
order_by?string

Index to order resources by.

Default"updated_at"

Value in

  • "created_at"
  • "updated_at"
roles?array<string>

Any array of roles.

Items1 <= items

Response Body

application/json

curl -X GET "$API_BASE_URL/api/users"

Successfully retrieved the paginated list of users.

{
  "total": 1,
  "list": [
    {
      "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "username": "admin",
      "name": "admin",
      "email": "test@email.com",
      "email_verified": true,
      "created_at": 1742288232,
      "updated_at": 1742288235,
      "provider": "builtin",
      "two_factor_enabled": true,
      "roles": [
        {
          "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
          "name": "super_admin",
          "desc": "Object description.",
          "type": "built_in",
          "policies": [
            "super-admin-permission-policy"
          ]
        }
      ],
      "boundaries": [
        {
          "name": "sample-policy",
          "type": "built_in",
          "desc": "Object description.",
          "labels": {
            "version": "v2",
            "env": "prod"
          },
          "policy_document": {
            "statement": [
              {
                "effect": "allow",
                "resources": [
                  "arn:api7:gateway:gatewaygroup/<.*>/service/<.*>"
                ],
                "actions": [
                  "gateway:GetPublishedService"
                ],
                "conditions": {
                  "gateway_group_label": {
                    "type": "MatchLabel",
                    "options": {
                      "key": "env",
                      "operator": "exact_match",
                      "value": "prod"
                    }
                  }
                }
              }
            ]
          },
          "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
          "created_at": 1742288232,
          "updated_at": 1742288235
        }
      ]
    }
  ]
}
Complete operation details and schema variants

GET /api/users

List all users

List dashboard user accounts with pagination and role-based filtering. Use this to audit who can authenticate by local credentials or configured SSO methods. Required IAM Permission: Action iam:GetUser, Resource arn:api7:iam:user/%s

Parameters

  • direction (query, string, optional): Order to list the resources by. The sorting index follows the configuration of order_by.
  • 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.
  • 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.
  • order_by (query, string, optional): Index to order resources by.
  • roles (query, array, optional):

Responses

  • 200: Successfully retrieved the paginated list of users.

  • allOf variant 1

  • list (array, optional): An array of resources.

  • total (integer, optional): Total number of objects.

  • allOf variant 2

  • list (array, optional): An array of users.

  • allOf variant 1

  • list[].id (string, optional): Operator ID.

  • list[].username (string, optional): Operator username.

  • list[].name (string, optional): Operator name.

  • list[].email (string, optional): Operator email.

  • list[].email_verified (boolean, optional): If true, the operator email is verified.

  • allOf variant 2

  • list[].created_at (integer, optional): The object created timestamp.

  • list[].updated_at (integer, optional): The object updated timestamp.

  • list[].provider (string, optional): Method used for user authentication or provisioning source.

  • list[].two_factor_enabled (boolean, optional): If true, the user has enabled two-factor authentication (TOTP).

  • list[].roles (array, optional): An array of roles to be assigned to a user.

  • list[].roles[].id (string, optional): The unique identifier of the role.

  • list[].roles[].name (string, optional): The role name.

  • list[].roles[].desc (string, optional): The object description.

  • list[].roles[].type (string, optional): Type of the role.

  • list[].roles[].policies (array, optional): The policies of the role.

  • list[].boundaries (array, optional): An array of boundaries to be assigned to the user.

  • allOf variant 1

  • list[].boundaries[].name (string, required): The policy name.

  • list[].boundaries[].type (string, optional): The permission policy type.

  • list[].boundaries[].desc (string, optional): The description of the policy.

  • list[].boundaries[].labels (object, optional): The labels of the policy.

  • list[].boundaries[].policy_document (object, required): Policy document.

  • list[].boundaries[].policy_document.statement (array, required): The statements of the policy.

  • list[].boundaries[].policy_document.statement[].effect (string, required): The effect of the statement.

  • list[].boundaries[].policy_document.statement[].resources (array, required): The resources for requests.

  • list[].boundaries[].policy_document.statement[].actions (array, required): The actions for requests.

  • anyOf variant 1

  • list[].boundaries[].policy_document.statement[].conditions (object, optional): Rules for matching requests. The key is the condition name, the value is the condition expression which specifies the function name and parameter structure of condition.

  • anyOf variant 1: Condition for Gateway Group

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 2: Condition for Service

  • list[].boundaries[].policy_document.statement[].conditions.service_label (object, optional): Condition for service label.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 3: Condition for Permission Policy

  • list[].boundaries[].policy_document.statement[].conditions.permission_policy_label (object, optional): Condition for permission policy label.

  • list[].boundaries[].policy_document.statement[].conditions.permission_policy_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.permission_policy_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.permission_policy_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.permission_policy_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.permission_policy_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 4: Condition for Service

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • list[].boundaries[].policy_document.statement[].conditions.service_label (object, optional): Condition for service label.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.service_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 5: Condition for Role

  • list[].boundaries[].policy_document.statement[].conditions.role_label (object, optional): Condition for role label.

  • list[].boundaries[].policy_document.statement[].conditions.role_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.role_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.role_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.role_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.role_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 6: Condition for User

  • list[].boundaries[].policy_document.statement[].conditions.user_label (object, optional): Condition for user label.

  • list[].boundaries[].policy_document.statement[].conditions.user_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.user_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.user_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.user_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.user_label.options.value (string, optional): The value to compare against the label.

  • list[].boundaries[].policy_document.statement[].conditions.permission_boundaries (object, optional): Condition for permission boundaries.

  • list[].boundaries[].policy_document.statement[].conditions.permission_boundaries.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.permission_boundaries.options (array, optional): An array of options.

  • anyOf variant 7: Condition for Consumer

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • list[].boundaries[].policy_document.statement[].conditions.consumer_label (object, optional): Condition for consumer label.

  • list[].boundaries[].policy_document.statement[].conditions.consumer_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.consumer_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.consumer_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.consumer_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.consumer_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 8: Condition for Secret

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • list[].boundaries[].policy_document.statement[].conditions.secret_provider_label (object, optional): Condition for secret provider label.

  • list[].boundaries[].policy_document.statement[].conditions.secret_provider_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.secret_provider_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.secret_provider_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.secret_provider_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.secret_provider_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 9: Condition for Contact Point

  • list[].boundaries[].policy_document.statement[].conditions.contact_point_label (object, optional): Condition for contact point label.

  • list[].boundaries[].policy_document.statement[].conditions.contact_point_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.contact_point_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.contact_point_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.contact_point_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.contact_point_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 10: Condition for Alert Policy

  • list[].boundaries[].policy_document.statement[].conditions.alert_policy_label (object, optional): Condition for alert policy label.

  • list[].boundaries[].policy_document.statement[].conditions.alert_policy_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.alert_policy_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.alert_policy_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.alert_policy_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.alert_policy_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 11: Condition for Developer

  • list[].boundaries[].policy_document.statement[].conditions.developer_label (object, optional): Condition for developer label.

  • list[].boundaries[].policy_document.statement[].conditions.developer_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.developer_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.developer_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.developer_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.developer_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 12: Condition for API Product

  • list[].boundaries[].policy_document.statement[].conditions.api_product_label (object, optional): Condition for API product label.

  • list[].boundaries[].policy_document.statement[].conditions.api_product_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.api_product_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.api_product_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.api_product_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.api_product_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 13: Condition for CA Certificate

  • list[].boundaries[].policy_document.statement[].conditions.ca_certificate_label (object, optional): Condition for CA certificate label.

  • list[].boundaries[].policy_document.statement[].conditions.ca_certificate_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.ca_certificate_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.ca_certificate_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.ca_certificate_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.ca_certificate_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 14: Condition for Certificate

  • list[].boundaries[].policy_document.statement[].conditions.certificate_label (object, optional): Condition for certificate label.

  • list[].boundaries[].policy_document.statement[].conditions.certificate_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.certificate_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.certificate_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.certificate_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.certificate_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 15: Condition for SNI

  • list[].boundaries[].policy_document.statement[].conditions.sni_label (object, optional): Condition for SNI label.

  • list[].boundaries[].policy_document.statement[].conditions.sni_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.sni_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.sni_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.sni_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.sni_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 16: Condition for Portal

  • list[].boundaries[].policy_document.statement[].conditions.portal_label (object, optional): Condition for portal label.

  • list[].boundaries[].policy_document.statement[].conditions.portal_label.type (string, optional): Type of condition.

  • list[].boundaries[].policy_document.statement[].conditions.portal_label.options (object, optional): Matching expressions.

  • list[].boundaries[].policy_document.statement[].conditions.portal_label.options.key (string, optional): The label key to match against.

  • list[].boundaries[].policy_document.statement[].conditions.portal_label.options.operator (string, optional): The comparison operator used for matching the label.

  • list[].boundaries[].policy_document.statement[].conditions.portal_label.options.value (string, optional): The value to compare against the label.

  • allOf variant 2

  • list[].boundaries[].id (string, optional): The policy ID.

  • list[].boundaries[].created_at (integer, optional): The object created timestamp.

  • list[].boundaries[].updated_at (integer, optional): The object updated timestamp.

  • 400: Invalid arguments. Error details will be provided in the response.

cURL

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