Skip to main content

APISIX Control API (3.10.0)

Download OpenAPI specification:Download

APISIX Control API is used to get the internal state of APISIX. In addition to the endpoints listed below, certain plugins, such as server-info, can add additional endpoints to control API.

Schema

The schema defines the available parameters as well as their data types, properties, default values, valid values, and so on.

Get JSON Schema

Get JSON schema that is used by the APISIX instance.

Responses

Response samples

Content type
application/json
{
  • "1": {
    }
}

Health Check

Health checking is a mechanism that determines whether upstream services are healthy or unhealthy based on their responsiveness.

Get Health Check Information

Get health check information of the APISIX instance. You need to initiate a request to the route to generate Control API health check information.

Responses

Response samples

Content type
application/json
Example
{
  • "nodes": [
    ],
  • "name": "/apisix/routes/1",
  • "type": "http"
}

Get Health Status By Type and ID

Get health status of a specified resource.

path Parameters
src_type
required
string
Enum: "routes" "services" "upstreams"

The specified resource type.

src_id
required
string

The specified node ID.

Responses

Response samples

Content type
application/json
{
  • "nodes": [
    ],
  • "type": "http",
  • "name": "/apisix/routes/1"
}

Garbage Collection

Garbage collection is a form of automatic memory management. The garbage collector attempts to reclaim memory which was allocated by the program, but is no longer referenced.

Trigger Garbage Collection

Trigger a full garbage collection (GC) in the HTTP subsystem. Note that a request to this endpoint would not trigger a garbage collection in the stream subsystem because the subsystems are run in the separate Lua VM.

Responses

Response samples

Content type
application/json
{ }

Route

A route defines a path to one or more upstream services.

See Routes for more information.

Get All Routes

Get all configured routes.

Responses

Response samples

Content type
application/json
{
  • "priority": 0,
  • "uris": [
    ],
  • "id": "1",
  • "upstream": {
    },
  • "status": 1
}

Get Route by ID

Get a route by ID.

path Parameters
id
required
string

The specified route ID.

Responses

Response samples

Content type
application/json
{
  • "priority": 0,
  • "uris": [
    ],
  • "id": "1",
  • "upstream": {
    },
  • "status": 1
}

Upstream

An upstream is a logical abstraction of one or more upstream addresses.

See Upstreams for more information.

Get All Upstreams

Get all configured upstreams.

Responses

Response samples

Content type
application/json
{
  • "scheme": "http",
  • "pass_host": "pass",
  • "nodes": [
    ],
  • "hash_on": "vars",
  • "update_time": 1634543819,
  • "key": "remote_addr",
  • "create_time": 1634539759,
  • "id": "1",
  • "type": "chash"
}

Get Upstream by ID

Get an upstream by ID.

path Parameters
id
required
string

The specified upstream ID.

Responses

Response samples

Content type
application/json
{
  • "scheme": "http",
  • "pass_host": "pass",
  • "nodes": [
    ],
  • "hash_on": "vars",
  • "update_time": 1634543819,
  • "key": "remote_addr",
  • "create_time": 1634539759,
  • "id": "1",
  • "type": "chash"
}

Service

A service is a backend application providing a set of functionalities.

See Services for more information.

Get All Services

Get all configured services.

Responses

Response samples

Content type
application/json
{
  • "has_domain": false,
  • "clean_handlers": { },
  • "modifiedIndex": 671,
  • "key": "/apisix/services/200",
  • "createdIndex": 671,
  • "value": {
    }
}

Get Service by ID

Get a service by ID.

path Parameters
id
required
string

The pecified service ID.

Responses

Response samples

Content type
application/json
{
  • "has_domain": false,
  • "clean_handlers": { },
  • "modifiedIndex": 728,
  • "key": "/apisix/services/5",
  • "createdIndex": 728,
  • "value": {
    }
}

Plugin Metadata

Plugin metadata is used to configure the common metadata field(s) of all plugin instances sharing the same plugin name.
See Plugin Metadata for more information.

Get All Plugin Metadata

Get all plugin metadata.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get Plugin Metadata by Name

Get plugin metadata by the plugin name.

path Parameters
plugin_name
required
string

The specified plugin name.

Responses

Response samples

Content type
application/json
{
  • "log_format": {
    },
  • "id": "file-logger"
}

Plugin

Plugins extend base functionalities of APISIX to meet user-specific requirements.

See Plugins for more information.

Reload All Plugins

Hot reload plugins for changes to the plugin list in configuration files or plugin source files to take effect.

Responses

Response samples

Content type
application/json
"done"

Service Discovery

Service discovery is a process used in microservice-based architectures for automatically detecting and registering dynamically assigned upstream addresses.

See Service Discovery for more information.

Get Memory Dump

Get service and configuration details.

Responses

Response samples

Content type
application/json
{
  • "services": {
    },
  • "config": {
    }
}

Get Dump File

Get configured services details.

Responses

Response samples

Content type
application/json
{
  • "last_update": 1703594980,
  • "services": {
    },
  • "expire": 2592000
}

API7.ai Logo

API Management for Modern Architectures with Edge, API Gateway, Kubernetes, and Service Mesh.

Product

API7 Cloud

SOC2 Type IRed Herring

Copyright © APISEVEN Ltd. 2019 – 2024. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the

Apache Software Foundation