API7 Docs
API7 GatewayAPI7 Enterprise Developer Portal APIsList approvals

List approvals

GET /api/approvals

GET /api/approvals

Interactive request editor loads with JavaScript.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

status?string

Approval status.

Value in

  • "pending"
  • "finished"
result?string

Approval outcome.

Value in

  • "accepted"
  • "rejected"
  • "cancelled"
event?string

Approval event.

Value in

  • "api_product_subscription"
  • "developer_registration"
resource_type?string

Resource type.

Value in

  • "api_product"
  • "developer"
resource_name?string

Resource name.

operator_name?string

Operator name.

applicant_name?string

Applicant name.

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 approvals by.

Default"applied_at"

Value in

  • "applied_at"
  • "resource_name"
  • "operated_at"
search?string

Condition to search resources by.

Response Body

application/json

application/json

application/json

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

{
  "list": [
    {
      "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "created_at": "2025-01-01T00:00:00.000Z",
      "updated_at": "2025-01-01T00:00:00.000Z",
      "event": "api_product_subscription",
      "status": "pending",
      "result": "accepted",
      "resource_type": "api_product",
      "resource_id": "string",
      "resource_name": "string",
      "applicant_id": "string",
      "applicant_name": "string",
      "operator_id": "string",
      "operator_name": "string",
      "metadata": "string",
      "applied_at": "2025-01-01T00:00:00.000Z",
      "operated_at": "2025-01-01T00:00:00.000Z"
    }
  ],
  "total": 1
}
Complete operation details and schema variants

GET /api/approvals

List approvals

List pending and processed approval workflow items for the current portal, such as API product subscriptions and developer registrations. Results are scoped to the portal of the request token.

Parameters

  • status (query, string, optional):
  • result (query, string, optional):
  • event (query, string, optional):
  • resource_type (query, string, optional):
  • resource_name (query, string, optional): Resource name.
  • operator_name (query, string, optional): Operator name.
  • applicant_name (query, string, optional): Applicant name.
  • 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):
  • search (query, string, optional): Condition to search resources by.

Responses

  • 200:
  • list (array, required): An array of approvals.
  • allOf variant 1
  • 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.
  • allOf variant 2
  • list[].event (string, required): Approval event.
  • list[].status (string, required): Approval status.
  • list[].result (string, optional): Approval outcome.
  • list[].resource_type (string, required): Resource type.
  • list[].resource_id (string, optional): The id of the resource being approved (e.g. the API product id).
  • list[].resource_name (string, optional): The name of the resource being approved.
  • list[].applicant_id (string, optional): The id of the developer that submitted the request.
  • list[].applicant_name (string, optional): The name of the developer that submitted the request.
  • list[].operator_id (string, optional): The id of who processed the request. The literal value developer_portal_admin marks an approval processed through the developer portal by a platform admin; in that case read the real operator from metadata.
  • list[].operator_name (string, optional): The name of who processed the request.
  • list[].metadata (string, optional): Opaque JSON string with extra processing context. When operator_id is developer_portal_admin, it holds the acting platform admin's identity, e.g. {"operator_id":"...","operator_name":"..."}.
  • list[].applied_at (string, optional):
  • list[].operated_at (string, optional):
  • 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/approvals, response 400 above.
  • 500: Internal server error.

cURL

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