Skip to main content

API7 Enterprise Admin APIs (3.5.1)

Download OpenAPI specification:Download

API7 Enterprise Admin APIs are RESTful APIs that allow you to create and manage API7 resources.

Published Service

Create a published service on a gateway group.

IAM Action: gateway:CreatePublishedService, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/*

Authorizations:
APIKeyAuthBasicAuth
query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
One of
name
string [ 1 .. 65536 ] characters

The object name.

object
desc
string <= 65536 characters

The object description.

plugins
object

The key-value pairs which represent the plugins attached on the object.

type
required
string
Default: "http"
Enum: "http" "stream"
hosts
Array of strings [ 1 .. 32 ] items unique

The hosts for the service to accept incoming requests.

path_prefix
string [ 1 .. 4096 ] characters ^/

The listening path prefix of the service.

strip_path_prefix
boolean
Default: true

Weather strip the path prefix or not when proxying the request to the upstream.

object

The upstream contains necessary information for the gateway to proxy request to the backend service.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "plugins": { },
  • "type": "http",
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "strip_path_prefix": true,
  • "upstream": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

List all published services on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
query Parameters
page
integer <int64> >= 1

The page number, starting from 1.

page_size
integer <int64> >= 1

The page size. It must be greater than 0.

direction
string
Default: "desc"
Enum: "asc" "desc"

It should be ascending or descending (case-insensitive). By default, it is set to descending.

order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at" "last_published" "name"
search
string

The search keyword.

gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

runtime_type
string
Enum: "normal" "canary"
unhealthy_nodes
Array of strings
Items Enum: "unhealthy_nodes_exists" "no_unhealthy_nodes"
object non-empty
hosts
Array of strings
type
Array of strings
Items Enum: "http" "stream"

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Get a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Updatea published service(without publishing).

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
One of
name
string [ 1 .. 65536 ] characters

The object name.

object
desc
string <= 65536 characters

The object description.

plugins
object

The key-value pairs which represent the plugins attached on the object.

type
required
string
Default: "http"
Enum: "http" "stream"
hosts
Array of strings [ 1 .. 32 ] items unique

The hosts for the service to accept incoming requests.

path_prefix
string [ 1 .. 4096 ] characters ^/

The listening path prefix of the service.

strip_path_prefix
boolean
Default: true

Weather strip the path prefix or not when proxying the request to the upstream.

object

The upstream contains necessary information for the gateway to proxy request to the backend service.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "plugins": { },
  • "type": "http",
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "strip_path_prefix": true,
  • "upstream": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Patch a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
Array
One of
op
required
string
Enum: "add" "replace"

The operation to be performed

path
required
string

A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information

value
required
any

The value to add or replace, can be any type

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Delete a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "warning_msg": "string"
}

Create a upstream in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
One of
name
string [ 1 .. 65536 ] characters
Default: "default"

The object name.

scheme
string
Default: "http"
Enum: "http" "https" "grpc" "grpcs"

The protocol that is used for communicating with the backend service when the service type is http.

desc
string <= 65536 characters

The object description.

type
string
Default: "roundrobin"
Enum: "roundrobin" "least_conn" "ewma" "chash"

The load balancing strategy to distribute traffic to targets.

hash_on
string
Default: "vars"
Enum: "vars" "header" "cookie" "consumer" "vars_combinations"

Define what to use as hashing input. Accepted values are vars, header, cookie, consumer, `vars_combinations.

key
string non-empty

The key is used for consistent hash, which can be combined using variables, such as $host$uri.

retries
integer [ 0 .. 65535 ]

The number of retries while passing the request to an upstream using the underlying Nginx mechanism.

object

The upstream separate connection pool.

object

The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds).

retry_timeout
number <float> >= 0
Default: 0
pass_host
string
Default: "pass"
Enum: "pass" "node" "rewrite"

Define how to decide the host header before forwarding requests to an upstream.

upstream_host
string^\*?[0-9a-zA-Z-._]+$

The HTTP host.

Array of objects <= 64 items

The upstream endpoints.

service_name
string [ 1 .. 256 ] characters
discovery_type
string
Enum: "kubernetes" "nacos"
object
object or object
Deprecated

Replace with client_certificate and ca_certificates

client_certificate
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The object ID.

ca_certificates
Array of strings[ items [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ ]
tls_verify
boolean
object or object

The health check data.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "default",
  • "scheme": "http",
  • "desc": "string",
  • "type": "roundrobin",
  • "hash_on": "vars",
  • "key": "string",
  • "retries": 65535,
  • "keepalive_pool": {
    },
  • "timeout": {
    },
  • "retry_timeout": 0,
  • "pass_host": "pass",
  • "upstream_host": "string",
  • "nodes": [
    ],
  • "service_name": "string",
  • "discovery_type": "kubernetes",
  • "discovery_args": {
    },
  • "tls": {
    },
  • "client_certificate": "string",
  • "ca_certificates": [
    ],
  • "tls_verify": true,
  • "checks": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

List all upstreams in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

order_by
string
Default: "created_at"
Value: "created_at"
direction
string
Default: "asc"
Value: "asc"

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Get a upstream in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

upstream_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the upstream.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Update a upstream in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

upstream_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the upstream.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
One of
name
string [ 1 .. 65536 ] characters
Default: "default"

The object name.

scheme
string
Default: "http"
Enum: "http" "https" "grpc" "grpcs"

The protocol that is used for communicating with the backend service when the service type is http.

desc
string <= 65536 characters

The object description.

type
string
Default: "roundrobin"
Enum: "roundrobin" "least_conn" "ewma" "chash"

The load balancing strategy to distribute traffic to targets.

hash_on
string
Default: "vars"
Enum: "vars" "header" "cookie" "consumer" "vars_combinations"

Define what to use as hashing input. Accepted values are vars, header, cookie, consumer, `vars_combinations.

key
string non-empty

The key is used for consistent hash, which can be combined using variables, such as $host$uri.

retries
integer [ 0 .. 65535 ]

The number of retries while passing the request to an upstream using the underlying Nginx mechanism.

object

The upstream separate connection pool.

object

The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds).

retry_timeout
number <float> >= 0
Default: 0
pass_host
string
Default: "pass"
Enum: "pass" "node" "rewrite"

Define how to decide the host header before forwarding requests to an upstream.

upstream_host
string^\*?[0-9a-zA-Z-._]+$

The HTTP host.

Array of objects <= 64 items

The upstream endpoints.

service_name
string [ 1 .. 256 ] characters
discovery_type
string
Enum: "kubernetes" "nacos"
object
object or object
Deprecated

Replace with client_certificate and ca_certificates

client_certificate
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The object ID.

ca_certificates
Array of strings[ items [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$ ]
tls_verify
boolean
object or object

The health check data.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "default",
  • "scheme": "http",
  • "desc": "string",
  • "type": "roundrobin",
  • "hash_on": "vars",
  • "key": "string",
  • "retries": 65535,
  • "keepalive_pool": {
    },
  • "timeout": {
    },
  • "retry_timeout": 0,
  • "pass_host": "pass",
  • "upstream_host": "string",
  • "nodes": [
    ],
  • "service_name": "string",
  • "discovery_type": "kubernetes",
  • "discovery_args": {
    },
  • "tls": {
    },
  • "client_certificate": "string",
  • "ca_certificates": [
    ],
  • "tls_verify": true,
  • "checks": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Patch a upstream in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

upstream_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the upstream.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
Array
One of
op
required
string
Enum: "add" "replace"

The operation to be performed

path
required
string

A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information

value
required
any

The value to add or replace, can be any type

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Delete a upstream in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

upstream_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the upstream.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "warning_msg": "string"
}

Import services based on OpenAPI Specification.

IAM Action: gateway:CreatePublishedService, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/*

Authorizations:
APIKeyAuthBasicAuth
query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
Array of objects non-empty unique
name
string [ 1 .. 65536 ] characters

The object name.

object
desc
string <= 65536 characters

The object description.

plugins
object

The key-value pairs which represent the plugins attached on the object.

type
required
string
Default: "http"
Enum: "http" "stream"
hosts
Array of strings [ 1 .. 32 ] items unique

The hosts for the service to accept incoming requests.

path_prefix
string [ 1 .. 4096 ] characters ^/

The listening path prefix of the service.

strip_path_prefix
boolean
Default: true

Weather strip the path prefix or not when proxying the request to the upstream.

object

The upstream contains necessary information for the gateway to proxy request to the backend service.

Responses

Request samples

Content type
application/json
{
  • "routes": [
    ],
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "plugins": { },
  • "type": "http",
  • "hosts": [
    ],
  • "path_prefix": "string",
  • "strip_path_prefix": true,
  • "upstream": {
    }
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Convert OpenAPI Specification to service and route resources.

Authorizations:
APIKeyAuthBasicAuth
Request Body schema: application/json
raw_openapi
required
string

The raw OpenAPI.

Responses

Request samples

Content type
application/json
{
  • "raw_openapi": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Create a route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
name
required
string [ 1 .. 65536 ] characters

The object name.

object
desc
string <= 65536 characters

The object description.

methods
Array of strings [ 1 .. 9 ] items unique
Items Enum: "GET" "POST" "PUT" "DELETE" "PATCH" "HEAD" "OPTIONS" "TRACE"

The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.

vars
Array of any

Matches based on the specified variables consistent with variables in Nginx. Takes the form [[var, operator, val], [var, operator, val], ...]]. Note that this is case sensitive when matching a cookie name. See https://github.com/api7/lua-resty-expr for more details.

paths
required
Array of strings [ 1 .. 64 ] items [ items [ 1 .. 4096 ] characters ^/ ]

The URI paths that can be matched to the API.

priority
integer
Default: 0

If different Routes matches to the same uri, then the Route is matched based on its priority. A higher value corresponds to higher priority.

plugins
object

The key-value pairs which represent the plugins attached on the object.

enable_websocket
boolean

Define whether to enable Websocket for the route.

object

The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds).

service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The object ID.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "methods": [
    ],
  • "vars": [
    ],
  • "paths": [
    ],
  • "priority": 0,
  • "plugins": { },
  • "enable_websocket": true,
  • "timeout": {
    },
  • "service_id": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

List all routes in a published service.

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

Authorizations:
APIKeyAuthBasicAuth
query Parameters
service_id
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

page
integer <int64> >= 1

The page number, starting from 1.

page_size
integer <int64> >= 1

The page size. It must be greater than 0.

direction
string
Default: "desc"
Enum: "asc" "desc"

It should be ascending or descending (case-insensitive). By default, it is set to descending.

order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at"
search
string

The search keyword.

gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Get a route in a published servcie on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
route_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published route.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Update a route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
route_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published route.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
name
required
string [ 1 .. 65536 ] characters

The object name.

object
desc
string <= 65536 characters

The object description.

methods
Array of strings [ 1 .. 9 ] items unique
Items Enum: "GET" "POST" "PUT" "DELETE" "PATCH" "HEAD" "OPTIONS" "TRACE"

The allowed HTTP methods to access the route. If empty, all HTTP methods are allowed.

vars
Array of any

Matches based on the specified variables consistent with variables in Nginx. Takes the form [[var, operator, val], [var, operator, val], ...]]. Note that this is case sensitive when matching a cookie name. See https://github.com/api7/lua-resty-expr for more details.

paths
required
Array of strings [ 1 .. 64 ] items [ items [ 1 .. 4096 ] characters ^/ ]

The URI paths that can be matched to the API.

priority
integer
Default: 0

If different Routes matches to the same uri, then the Route is matched based on its priority. A higher value corresponds to higher priority.

plugins
object

The key-value pairs which represent the plugins attached on the object.

enable_websocket
boolean

Define whether to enable Websocket for the route.

object

The timeout settings for connecting to, and sending and receiving messages to and from the upstream (in seconds).

service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The object ID.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "methods": [
    ],
  • "vars": [
    ],
  • "paths": [
    ],
  • "priority": 0,
  • "plugins": { },
  • "enable_websocket": true,
  • "timeout": {
    },
  • "service_id": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Patch a route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
route_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published route.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
Array
One of
op
required
string
Enum: "add" "replace"

The operation to be performed

path
required
string

A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information

value
required
any

The value to add or replace, can be any type

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Delete a route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
route_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published route.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "warning_msg": "string"
}

Create a stream route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
name
required
string [ 1 .. 100 ] characters

The object name.

object
desc
string <= 65536 characters

The object description.

plugins
object

The key-value pairs which represent the plugins attached on the object.

IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string)
(IPAddress (IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string))) or Domain (string)
server_port
integer <= 65535
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The object ID.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "plugins": { },
  • "remote_addr": "127.0.0.1",
  • "server_addr": "mysql",
  • "server_port": 3306,
  • "service_id": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

List all stream routes in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
query Parameters
service_id
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published service.

page
integer <int64> >= 1

The page number, starting from 1.

page_size
integer <int64> >= 1

The page size. It must be greater than 0.

direction
string
Default: "desc"
Enum: "asc" "desc"

It should be ascending or descending (case-insensitive). By default, it is set to descending.

order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at"
search
string

The search keyword.

gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Get a stream stream route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
stream_route_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published stream route.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Update a stream route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
stream_route_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published stream route.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Request Body schema: application/json
name
required
string [ 1 .. 100 ] characters

The object name.

object
desc
string <= 65536 characters

The object description.

plugins
object

The key-value pairs which represent the plugins attached on the object.

IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string)
(IPAddress (IPv4 (string) or IPv4/CIDR (string) or IPv6 (string) or IPv6/CIDR (string))) or Domain (string)
server_port
integer <= 65535
service_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The object ID.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "labels": {
    },
  • "desc": "string",
  • "plugins": { },
  • "remote_addr": "127.0.0.1",
  • "server_addr": "mysql",
  • "server_port": 3306,
  • "service_id": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Delete a stream route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
stream_route_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the published stream route.

query Parameters
gateway_group_id
required
string >= 1

It's optional when client authenticate with gateway group admin key.

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "warning_msg": "string"
}

List all published services in a gateway group. Deprecated

IAM Action: gateway:GetPublishedService, Resource: arn:api7:gateway:gatewaygroup/%s/publishedservice/%s Deprecated, you can use GET /apisix/admin/services for instead.

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
query Parameters
runtime_type
string
Enum: "normal" "canary"
unhealthy_nodes
Array of strings
Items Enum: "unhealthy_nodes_exists" "no_unhealthy_nodes"
direction
string
Default: "desc"
Enum: "asc" "desc"

It should be ascending or descending (case-insensitive). By default, it is set to descending.

page_size
integer <int64> >= 1

The page size. It must be greater than 0.

page
integer <int64> >= 1

The page number, starting from 1.

order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at" "publish_time" "name"
search
string

The search keyword.

object non-empty
hosts
Array of strings
type
Array of strings
Items Enum: "http" "stream"

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Get a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Delete a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

Responses

Response samples

Content type
application/json
{
  • "value": { },
  • "warning_msg": "string"
}

Get the OpenAPI Specification of a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Update the OpenAPI Specification of a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

Request Body schema: application/json
raw_openapi
string

The raw OpenAPI specification of the service.

Responses

Request samples

Content type
application/json
{
  • "raw_openapi": "string"
}

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

List all routes of published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

query Parameters
page
integer <int64> >= 1

The page number, starting from 1.

page_size
integer <int64> >= 1

The page size. It must be greater than 0.

direction
string
Default: "desc"
Enum: "asc" "desc"

It should be ascending or descending (case-insensitive). By default, it is set to descending.

order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at"

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Get a route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

route_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the route template.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Get the runtime configuration of a route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

route_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the route template.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Update the runtime configuration of a route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

route_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the route template.

Request Body schema: application/json
Array
One of
op
required
string
Enum: "add" "replace"

The operation to be performed

path
required
string

A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information

value
required
any

The value to add or replace, can be any type

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

List all stream routes of a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

query Parameters
page
integer <int64> >= 1

The page number, starting from 1.

page_size
integer <int64> >= 1

The page size. It must be greater than 0.

direction
string
Default: "desc"
Enum: "asc" "desc"

It should be ascending or descending (case-insensitive). By default, it is set to descending.

order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at"

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}

Get a stream route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

stream_route_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the stream route template.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Get the runtime configuration of a stream route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

stream_route_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the stream route template.

Responses

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

Update the runtime configuration of a stream route in a published service on a gateway group.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

stream_route_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the stream route template.

Request Body schema: application/json
Array
One of
op
required
string
Enum: "add" "replace"

The operation to be performed

path
required
string

A JSON Pointer path to the value you wish to modify or add, see https://jsonpatch.com/#json-pointer for more information

value
required
any

The value to add or replace, can be any type

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "value": {
    },
  • "warning_msg": "string"
}

List all history versions of a published services on a gateway group by service ID.

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

Authorizations:
APIKeyAuthBasicAuth
path Parameters
gateway_group_id
required
string >= 1
Example: 86fb9981-d9d2-4555-9df8-91ae92129335
service_template_id
required
string [ 1 .. 256 ] characters ^[a-zA-Z0-9-_.]+$

The unique identifier of the service template.

query Parameters
direction
string
Default: "desc"
Enum: "asc" "desc"

It should be ascending or descending (case-insensitive). By default, it is set to descending.

order_by
string
Default: "publish_time"
Value: "publish_time"

Responses

Response samples

Content type
application/json
{
  • "list": [
    ],
  • "total": 0
}