API7 Docs

List AI Gateway instances in a group

GET /api/ai_gateway_groups/{ai_gateway_group_id}/instances

GET /api/ai_gateway_groups/{ai_gateway_group_id}/instances

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

ai_gateway_group_id*string

AI Gateway group ID.

Length1 <= length

Response Body

application/json

application/json

curl -X GET "$API_BASE_URL/api/ai_gateway_groups/abc1234567890/instances"

Successfully retrieved the list of AI Gateway instances.

{
  "total": 1,
  "list": [
    {
      "instance_id": "aisix-node-001",
      "ai_gateway_group_id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
      "hostname": "aisix-node-001",
      "ip": "192.168.1.100",
      "version": "1.0.0",
      "ports": [
        9080,
        9443
      ],
      "last_heartbeat_time": "2019-08-24T14:15:22Z",
      "status": "Healthy",
      "created_at": 1742288232
    }
  ]
}
Complete operation details and schema variants

GET /api/ai_gateway_groups/{ai_gateway_group_id}/instances

List AI Gateway instances in a group

IAM Action: ai_gateway:GetAIGatewayInstance, Resource: arn:api7:ai_gateway:aigatewaygroup/%s Returns all AI Gateway instances (AISIX nodes) registered in the specified group. Instance status is computed dynamically from the last heartbeat time: Healthy within 60 seconds, LostConnection between 60 seconds and 2 hours, Offline beyond 2 hours.

Parameters

  • ai_gateway_group_id (path, string, required): AI Gateway group ID.

Responses

  • 200: Successfully retrieved the list of AI Gateway instances.

  • 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 AI Gateway instances.

  • list[].instance_id (string, optional): The unique identifier for the instance.

  • list[].ai_gateway_group_id (string, optional): The object ID.

  • list[].hostname (string, optional): Hostname of the instance.

  • list[].ip (string, optional): IP address of the instance.

  • list[].version (string, optional): Version of the AISIX binary.

  • list[].ports (array, optional): Ports the instance is listening on.

  • list[].last_heartbeat_time (string, optional): Timestamp of the last heartbeat received from the instance.

  • list[].status (string, optional): The computed health status of the instance.

  • Healthy: last heartbeat was received within 60 seconds.

  • LostConnection: last heartbeat was received between 60 seconds and 2 hours ago.

  • Offline: no heartbeat received for more than 2 hours.

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

  • 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/ai_gateway_groups/{ai_gateway_group_id}/instances'