API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsCreate a debug session

Create a debug session

POST /api/gateway_groups/{gateway_group_id}/debug_sessions

POST /api/gateway_groups/{gateway_group_id}/debug_sessions

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

gateway_group_id*string

Gateway group ID.

Length1 <= length

Request Body

application/json

Response Body

application/json

application/json

curl -X POST "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/debug_sessions" \  -H "Content-Type: application/json" \  -d '{    "name": "us-west-rsc",    "target_instances": [      "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"    ]  }'

Successfully retrieved or modified the debug session.

{
  "value": {
    "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
    "name": "us-west-rsc",
    "description": "Object description.",
    "target_instances": [
      "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"
    ],
    "sampling_rule": [
      [
        "status",
        ">=",
        500
      ]
    ],
    "max_samples": 0,
    "duration_secs": 0,
    "status": "active",
    "created_at": 1742288232,
    "updated_at": 1742288235,
    "started_at": 1742288230,
    "stopped_at": 1742288230,
    "completed_at": 1742288230
  }
}
Complete operation details and schema variants

POST /api/gateway_groups/{gateway_group_id}/debug_sessions

Create a debug session

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

Parameters

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

Request body

Content type: application/json

  • name (string, required): The object name.
  • description (string, optional): The object description.
  • target_instances (array, required):
  • sampling_rule (array,null, optional): Sampling rules in lua-resty-expr format.
  • max_samples (integer, optional): Maximum number of traces returned by the list API.
  • duration_secs (integer, optional): Time-to-live in seconds for data plane configuration.

Responses

  • 200: Successfully retrieved or modified the debug session.
  • allOf variant 1
  • value (object, optional): The specific resource.
  • allOf variant 2
  • value (object, optional):
  • value.id (string, optional): The object ID.
  • value.name (string, optional): The object name.
  • value.description (string, optional): The object description.
  • value.target_instances (array, optional):
  • value.sampling_rule (array,null, optional): Sampling rules in lua-resty-expr format.
  • value.max_samples (integer, optional): Maximum number of traces returned by the list API.
  • value.duration_secs (integer, optional): Time-to-live in seconds for data plane configuration.
  • value.status (string, optional):
  • value.created_at (integer, optional): The object created timestamp.
  • value.updated_at (integer, optional): The object updated timestamp.
  • value.started_at (integer,null, optional): The object timestamp.
  • value.stopped_at (integer,null, optional): The object timestamp.
  • value.completed_at (integer,null, optional): The object 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 POST '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/debug_sessions'