API7 Docs

List SNI Usage in a gateway group

GET /api/gateway_groups/{gateway_group_id}/snis/{sni_id}/usage

GET /api/gateway_groups/{gateway_group_id}/snis/{sni_id}/usage

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

gateway_group_id*string

Gateway group ID.

Length1 <= length
sni_id*string

The unique identifier of the SNI object.

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

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
search?string

Condition to search resources by.

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 SNI usages by. Ordering runs on the underlying service_v2 table.

Default"updated_at"

Value in

  • "name"
  • "created_at"
  • "updated_at"

Response Body

application/json

application/json

curl -X GET "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/snis/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101/usage?search=version%253Dv2"

Successfully retrieved the paginated list of SNI usages.

{
  "total": 1,
  "list": [
    {
      "service_id": "b32e678e-7f6b-4a50-b113-550621ed4c01",
      "service_name": "us-west-rsc",
      "hosts": [
        "httpbin.org"
      ]
    }
  ]
}
Complete operation details and schema variants

GET /api/gateway_groups/{gateway_group_id}/snis/{sni_id}/usage

List SNI Usage in a gateway group

IAM Action: gateway:GetSNI, Resource: arn:api7:gateway:gatewaygroup/%s

Parameters

  • gateway_group_id (path, string, required): Gateway group ID.
  • sni_id (path, string, required): The unique identifier of the SNI object.
  • 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.
  • search (query, string, optional): Condition to search resources by.
  • 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 SNI usages by. Ordering runs on the underlying service_v2 table.

Responses

  • 200: Successfully retrieved the paginated list of SNI usages.
  • allOf variant 1
  • list (array, optional): An array of resources.
  • total (integer, optional): Total number of objects.
  • allOf variant 2
  • list (array, optional): The array of SNI Usage.
  • list[].service_id (string, optional): ID of the service.
  • list[].service_name (string, optional): Name of the service.
  • list[].hosts (array, optional): Hostnames related to the SNIs.
  • 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/api/gateway_groups/{gateway_group_id}/snis/{sni_id}/usage'