API7 Docs

Get the usage of a plugin in a gateway group

GET /api/gateway_groups/{gateway_group_id}/plugins/{plugin_name}/usage

GET /api/gateway_groups/{gateway_group_id}/plugins/{plugin_name}/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
plugin_name*string

Name of the plugin.

Length1 <= length <= 64

Response Body

application/json

curl -X GET "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/plugins/string/usage"

Successfully retrieved the plugin usage across services, consumers, and global rules.

{
  "value": {
    "consumer_credential": {
      "list": [
        {
          "name": "ka",
          "id": "9f1c2c80b6093aa7e9cbd9f0855f56586a646ba0",
          "gateway_group_id": "default",
          "gateway_group_name": "default"
        },
        {
          "name": "jack",
          "id": "439129f8-a6c5-4ea7-9f96-6ed108cfc0b0",
          "gateway_group_id": "ce9bf912-eb47-4c28-85a7-ffae5256d226",
          "gateway_group_name": "jack"
        },
        {
          "name": "test",
          "id": "21c3b211-2463-4cfc-8eb4-1f8cd679eec0",
          "gateway_group_id": "b14f4ec3-f79b-4aa7-baeb-f892540c26f3",
          "gateway_group_name": "29jjc"
        }
      ],
      "total": 3
    },
    "published_service": {
      "list": [
        {
          "name": "httpbin",
          "id": "60109630-3022-4c6d-9b1f-0440ec88ef5f",
          "gateway_group_id": "bfc91d42-b83a-4309-8cab-6763c27f715e",
          "gateway_group_name": "jw_test"
        },
        {
          "name": "name2",
          "id": "4bc1938e-8d3c-4a89-8089-b31bfa6989dc",
          "gateway_group_id": "b14f4ec3-f79b-4aa7-baeb-f892540c26f3",
          "gateway_group_name": "29jjc"
        }
      ],
      "total": 2
    }
  }
}
Complete operation details and schema variants

GET /api/gateway_groups/{gateway_group_id}/plugins/{plugin_name}/usage

Get the usage of a plugin in a gateway group

List the resources of the gateway group that reference the plugin. A custom plugin belongs to a gateway group, so its usage is a question about one group.

Required IAM Permission: Action gateway:GetCustomPlugin, Resource arn:api7:gateway:gatewaygroup/{gateway_group_id}

Parameters

  • gateway_group_id (path, string, required): Gateway group ID.
  • plugin_name (path, string, required): Name of the plugin.

Responses

  • 200: Successfully retrieved the plugin usage across services, consumers, and global rules.
  • allOf variant 1
  • value (object, optional): The specific resource.
  • allOf variant 2
  • value (object, optional):
  • value.published_service (object, optional): Services in all gateway groups.
  • value.published_service.total (integer, optional): Total number of services.
  • value.published_service.list (array, optional): An array of services in all gateway groups.
  • value.published_service.list[].name (string, optional):
  • value.published_service.list[].id (string, optional):
  • value.published_service.list[].gateway_group_id (string, optional): The gateway group ID.
  • value.published_service.list[].gateway_group_name (string, optional): The gateway group ID.
  • value.consumer (object, optional): Consumers in all gateway groups.
  • value.consumer.total (integer, optional): Total number of consumers.
  • value.consumer.list (array, optional): An array of consumers in all gateway groups.
  • value.consumer.list[].name (string, optional):
  • value.consumer.list[].id (string, optional):
  • value.consumer.list[].gateway_group_id (string, optional): The gateway group ID.
  • value.consumer.list[].gateway_group_name (string, optional): The gateway group ID.
  • value.global_rule (object, optional): Global rules in all gateway groups.
  • value.global_rule.total (integer, optional): Total number of global rules.
  • value.global_rule.list (array, optional): An array of global rules in all gateway groups.
  • value.global_rule.list[].name (string, optional):
  • value.global_rule.list[].id (string, optional):
  • value.global_rule.list[].gateway_group_id (string, optional): The gateway group ID.
  • value.global_rule.list[].gateway_group_name (string, optional): The gateway group ID.
  • 400: Invalid arguments. Error details will be provided in the response.

cURL

curl -X GET '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/plugins/{plugin_name}/usage'