Skip to main content

API7 Cloud OpenAPI Specification (0.11.0)

Download OpenAPI specification:Download

The OpenAPI specification for API7 Cloud APIs. All APIs are built around Rest. They accept JSON-encoded request body (if necessary) and return JSON-encoded response. The actual API response payload is decorated with some metadata fields:

{
  "status": {
    "code": <ERROR CODE>,
    "message": "<ERROR MESSAGE>"
  },
  "error": "ERROR DETAILS",
  "payload": <SPECIFIC API RESPONSE>
}

The status and error fields indicate the error code and error message for this API call. payload field contains the specific API response and should be decoded according to the given schema.

Organizations

Create Organization

Authorizations:
token
Request Body schema: application/json
name
required
string [ 1 .. 32 ] characters \S+

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Get Organization Information

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Delete Organization

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Create a new subscription

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

Request Body schema: application/json
plan
required
string non-empty

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {}
}

Get Upcoming Invoice

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Redirect to stripe customer portal

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Initialize Organization

Authorizations:
token
Request Body schema: application/json
name
required
string [ 1 .. 32 ] characters \S+

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

List Available Plugins

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Clusters

List Clusters

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

query Parameters
order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at"
direction
string
Default: "DESC"
Enum: "ASC" "DESC"

Direction should be ASC or DESC (case-insensitive). Default value is DESC.

page_size
integer <int64> >= 1
Default: 10

PageSize is the page size. Must greater than 0.

page
integer <int64> >= 1
Default: 1

Page is the page number, starting from 1.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Create Cluster

Authorizations:
token
path Parameters
id
required
string non-empty ^[1-9][0-9]*$

ID is the organization id

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Get Cluster Details

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Update Cluster

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Request Body schema: application/json
object
object
object

Responses

Request samples

Content type
application/json
{
  • "client_settings": {
    },
  • "observability_settings": {
    },
  • "api_proxy_settings": {
    }
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Update Cluster Plugins

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Request Body schema: application/json
(object or object)
object

LoggingPolicy is used to decide how to handle the access log of the gateway instance instances.

object or object or object or object or object

AuthenticationPlugin is the definition of the authentication plugin.

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "acl": {
    },
  • "logging": {
    },
  • "authentication": {
    }
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Generate a client certificate for communicating with the cluster for the given cluster.

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

List Gateway Instances

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Get Gateway Instance Configuration Template

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

config_type
required
string
Enum: "apisix" "helm"

config_type is used to filter the config

  • apisix is the key of apisix startup config.
  • helm is the key of apisix helm chart values config.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Get Cluster Metrics

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

metric_type
required
string
Enum: "api-requests" "api-failure-requests" "api-status-dist" "api-latency" "api-bandwidth" "api-connections" "api-qps"

metrics_type is used to filter the metrics

  • api-requests is the key of api requests metrics.
  • api-failure-requests is the key of failed api requests (status code >= 400) metrics.
  • api-status-dist is the key of api http status metrics.
  • api-latency is the key of api latency metrics.
  • api-bandwidth is the key of api bandwidth metrics.
  • api-connections is the key of api connections metrics.
  • api-qps is the key of api qps metrics.
query Parameters
start
required
string <date-time>
Example: start=2022-09-19T12:57:08.177Z

Start time of query time range, the date-time notation as defined by RFC 3339.

end
required
string <date-time>
Example: end=2022-09-19T12:57:08.177Z

End time of query time range, the date-time notation as defined by RFC 3339.

step
required
integer <int64>
Example: step=15

Query resolution step width in the number of seconds.

api_id
string^[1-9][0-9]*$

api_id is used to filter by specific the api id

app_id
string^[1-9][0-9]*$

app_id is used to filter by specific application id

instance_id
string^[A-Za-z0-9_-]*$

instance_id is used to filter by specific instance id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Load Plugin

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Request Body schema: application/json
plugin_management_id
string

The id of the data.

name
required
string non-empty

The name of the plugin.

type
string

The category of the plugin.

object

The metadata of the plugin in Apache APISIX

Responses

Request samples

Content type
application/json
{
  • "plugin_management_id": "string",
  • "name": "string",
  • "type": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

List Loaded Plugins

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

query Parameters
order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at"
direction
string
Default: "DESC"
Enum: "ASC" "DESC"

Direction should be ASC or DESC (case-insensitive). Default value is DESC.

page_size
integer <int64> >= 1
Default: 10

PageSize is the page size. Must greater than 0.

page
integer <int64> >= 1
Default: 1

Page is the page number, starting from 1.

search
string

search is used to filter the result

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Update Loaded Plugin

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

plugin_management_id
required
string non-empty

PluginManagementId is the plugin management id

Request Body schema: application/json
object

The metadata of the plugin in Apache APISIX

property name*
additional property
any

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Delete Loaded Plugin

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

plugin_management_id
required
string non-empty

PluginManagementId is the plugin management id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Get Plugin Reference

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

plugin_management_id
required
string non-empty

PluginManagementId is the plugin management id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Applications

List Applications

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

query Parameters
order_by
string
Enum: "created_at" "updated_at" "name" "path_prefix"
direction
string
Default: "DESC"
Enum: "ASC" "DESC"

Direction should be ASC or DESC (case-insensitive). Default value is DESC.

page_size
integer <int64> >= 1
Default: 10

PageSize is the page size. Must greater than 0.

page
integer <int64> >= 1
Default: 1

Page is the page number, starting from 1.

search
string

search is used to filter the result

labels
Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used to filter the result

active
string
Default: "-1"
Enum: "-1" "0" "1"

Active is the status of the Application 0 stands for active 1 stands for inactive

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Create Application

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Request Body schema: application/json
non-empty
description
string <= 256 characters
hosts
required
Array of strings non-empty unique
name
required
string [ 1 .. 64 ] characters
path_prefix
required
string [ 1 .. 4096 ] characters ^/

The listening path prefix for this application

object

Plugins contains a collect of polices like CORS.

protocol
string
Enum: "HTTP" "HTTPS"

The API Protocol definition

protocols
Array of strings [ 1 .. 2 ] items unique
Items Enum: "HTTP" "HTTPS"
required
Array of objects [ 1 .. 10 ] items unique

Upstream settings for the Application

default_upstream_version
string [ 0 .. 64 ] characters
Default: "default"
labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

active
integer
Default: 0
Enum: 0 1

Active is the status of the Application 0 stands for active 1 stands for inactive

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "hosts": [
    ],
  • "name": "string",
  • "path_prefix": "string",
  • "plugins": {
    },
  • "protocol": "HTTP",
  • "protocols": [
    ],
  • "upstreams": [
    ],
  • "default_upstream_version": "default",
  • "labels": [
    ],
  • "active": 0
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Delete All Applications

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

query Parameters
cascade
boolean
Default: false

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Get Application Details

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Update Application

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

Request Body schema: application/json
non-empty
description
string <= 256 characters
hosts
required
Array of strings non-empty unique
name
required
string [ 1 .. 64 ] characters
path_prefix
required
string [ 1 .. 4096 ] characters ^/

The listening path prefix for this application

object

Plugins contains a collect of polices like CORS.

protocol
string
Enum: "HTTP" "HTTPS"

The API Protocol definition

protocols
Array of strings [ 1 .. 2 ] items unique
Items Enum: "HTTP" "HTTPS"
required
Array of objects [ 1 .. 10 ] items unique

Upstream settings for the Application

default_upstream_version
string [ 0 .. 64 ] characters
Default: "default"
labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

active
integer
Default: 0
Enum: 0 1

Active is the status of the Application 0 stands for active 1 stands for inactive

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "hosts": [
    ],
  • "name": "string",
  • "path_prefix": "string",
  • "plugins": {
    },
  • "protocol": "HTTP",
  • "protocols": [
    ],
  • "upstreams": [
    ],
  • "default_upstream_version": "default",
  • "labels": [
    ],
  • "active": 0
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Patch Application

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

Request Body schema: application/json
non-empty
description
string <= 256 characters
hosts
Array of strings non-empty unique
name
string [ 1 .. 64 ] characters
path_prefix
string [ 1 .. 4096 ] characters ^/

The listening path prefix for this application

object

Plugins contains a collect of polices like CORS.

protocol
string
Enum: "HTTP" "HTTPS"

The API Protocol definition

protocols
Array of strings [ 1 .. 2 ] items unique
Items Enum: "HTTP" "HTTPS"
Array of objects [ 1 .. 10 ] items unique

Upstream settings for the Application

default_upstream_version
string [ 0 .. 64 ] characters
Default: "default"
labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

active
integer
Default: 0
Enum: 0 1

Active is the status of the Application 0 stands for active 1 stands for inactive

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "hosts": [
    ],
  • "name": "string",
  • "path_prefix": "string",
  • "plugins": {
    },
  • "protocol": "HTTP",
  • "protocols": [
    ],
  • "upstreams": [
    ],
  • "default_upstream_version": "default",
  • "labels": [
    ],
  • "active": 0
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Delete Application

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

query Parameters
cascade
boolean
Default: false

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Create Application

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Request Body schema: application/json
openapi
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

APIs

List APIs

Authorizations:
token
path Parameters
app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

query Parameters
order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at" "name"
direction
string
Default: "DESC"
Enum: "ASC" "DESC"

Direction should be ASC or DESC (case-insensitive). Default value is DESC.

page_size
integer <int64> >= 1
Default: 10

PageSize is the page size. Must greater than 0.

page
integer <int64> >= 1
Default: 1

Page is the page number, starting from 1.

search
string

search is used to filter the result

labels
Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used to filter the result

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Create API

Authorizations:
token
path Parameters
app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

Request Body schema: application/json
non-empty
active
integer <int64>
Enum: 0 1

Active is the status of the API 0 stands for active 1 stands for inactive

description
string <= 256 characters
Array of strings or Array of strings

Allowed HTTP methods to access this API, if absent, all HTTP methods are allowed

name
required
string [ 1 .. 64 ] characters
required
Array of objects [ 1 .. 64 ] items

Which URI paths can be matched to this API

object

Fine grained route control settings.

object

Plugins contains a collect of polices like CORS.

strip_path_prefix
boolean

Whether to strip the path prefix (defined in the Application)

labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

type
string
Default: "Rest"
Enum: "Rest" "WebSocket"

Type is the type of the API Rest means this is a Rest API. WebSocket means this is a WebSocket API.

Responses

Request samples

Content type
application/json
{
  • "active": 0,
  • "description": "string",
  • "methods": [
    ],
  • "name": "string",
  • "paths": [
    ],
  • "fine_grained_route_control": {
    },
  • "plugins": {
    },
  • "strip_path_prefix": true,
  • "labels": [
    ],
  • "type": "Rest"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Delete All APIs

Authorizations:
token
path Parameters
app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Get API Details

Authorizations:
token
path Parameters
app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

api_id
required
string^[1-9][0-9]*$

APIID is the API id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Update API

Authorizations:
token
path Parameters
app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

api_id
required
string^[1-9][0-9]*$

APIID is the API id

Request Body schema: application/json
non-empty
active
integer <int64>
Enum: 0 1

Active is the status of the API 0 stands for active 1 stands for inactive

description
string <= 256 characters
Array of strings or Array of strings

Allowed HTTP methods to access this API, if absent, all HTTP methods are allowed

name
required
string [ 1 .. 64 ] characters
required
Array of objects [ 1 .. 64 ] items

Which URI paths can be matched to this API

object

Fine grained route control settings.

object

Plugins contains a collect of polices like CORS.

strip_path_prefix
boolean

Whether to strip the path prefix (defined in the Application)

labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

type
string
Default: "Rest"
Enum: "Rest" "WebSocket"

Type is the type of the API Rest means this is a Rest API. WebSocket means this is a WebSocket API.

Responses

Request samples

Content type
application/json
{
  • "active": 0,
  • "description": "string",
  • "methods": [
    ],
  • "name": "string",
  • "paths": [
    ],
  • "fine_grained_route_control": {
    },
  • "plugins": {
    },
  • "strip_path_prefix": true,
  • "labels": [
    ],
  • "type": "Rest"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Patch API

Authorizations:
token
path Parameters
app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

api_id
required
string^[1-9][0-9]*$

APIID is the API id

Request Body schema: application/json
non-empty
active
integer <int64>
Enum: 0 1

Active is the status of the API 0 stands for active 1 stands for inactive

description
string <= 256 characters
Array of strings or Array of strings

Allowed HTTP methods to access this API, if absent, all HTTP methods are allowed

name
string [ 1 .. 64 ] characters
Array of objects [ 1 .. 64 ] items

Which URI paths can be matched to this API

object

Fine grained route control settings.

object

Plugins contains a collect of polices like CORS.

strip_path_prefix
boolean

Whether to strip the path prefix (defined in the Application)

labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

type
string
Default: "Rest"
Enum: "Rest" "WebSocket"

Type is the type of the API Rest means this is a Rest API. WebSocket means this is a WebSocket API.

Responses

Request samples

Content type
application/json
{
  • "active": 0,
  • "description": "string",
  • "methods": [
    ],
  • "name": "string",
  • "paths": [
    ],
  • "fine_grained_route_control": {
    },
  • "plugins": {
    },
  • "strip_path_prefix": true,
  • "labels": [
    ],
  • "type": "Rest"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Delete API

Authorizations:
token
path Parameters
app_id
required
string^[1-9][0-9]*$

The id of the pet to retrieve

api_id
required
string^[1-9][0-9]*$

APIID is the API id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Search APIs in current cluster (also include their parent applications)

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

query Parameters
search
string

search is used to filter the result

order_by
string
Default: "updated_at"
Enum: "created_at" "updated_at" "name"
direction
string
Default: "DESC"
Enum: "ASC" "DESC"

Direction should be ASC or DESC (case-insensitive). Default value is DESC.

page_size
integer <int64> >= 1
Default: 10

PageSize is the page size. Must greater than 0.

page
integer <int64> >= 1
Default: 1

Page is the page number, starting from 1.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Consumers

List Consumers

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

query Parameters
direction
string
Default: "DESC"
Enum: "ASC" "DESC"

Direction should be ASC or DESC (case-insensitive). Default value is DESC.

page_size
integer <int64> >= 1
Default: 10

PageSize is the page size. Must greater than 0.

page
integer <int64> >= 1
Default: 1

Page is the page number, starting from 1.

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

search is used to filter the result

labels
Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used to filter the result

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Create Consumer

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Request Body schema: application/json
non-empty
description
string <= 256 characters

Description for this consumer.

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

Name of the consumer, should be unique among all applications in the same cluster.

object or null

ConsumerCredentials contains a collect of policies can be configured on the consumer.

object

Policies contains a collect of polices like CORS, but exclude authentication policy

labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

Responses

Request samples

Content type
application/json
{
  • "description": "jack is the most important API consumer.",
  • "name": "jack",
  • "credentials": {
    },
  • "plugins": {
    },
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Get Consumer Details

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

consumer_id
required
string non-empty ^[1-9][0-9]*$

ConsumerId is the consumer id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Update Consumer

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

consumer_id
required
string non-empty ^[1-9][0-9]*$

ConsumerId is the consumer id

Request Body schema: application/json
non-empty
description
string <= 256 characters

Description for this consumer.

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

Name of the consumer, should be unique among all applications in the same cluster.

object or null

ConsumerCredentials contains a collect of policies can be configured on the consumer.

object

Policies contains a collect of polices like CORS, but exclude authentication policy

labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

Responses

Request samples

Content type
application/json
{
  • "description": "jack is the most important API consumer.",
  • "name": "jack",
  • "credentials": {
    },
  • "plugins": {
    },
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Patch Consumer

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

consumer_id
required
string non-empty ^[1-9][0-9]*$

ConsumerId is the consumer id

Request Body schema: application/json
non-empty
description
string <= 256 characters

Description for this consumer.

name
string [ 1 .. 100 ] characters ^[a-zA-Z0-9_]+$

Name of the consumer, should be unique among all applications in the same cluster.

object or null

ConsumerCredentials contains a collect of policies can be configured on the consumer.

object

Policies contains a collect of polices like CORS, but exclude authentication policy

labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

Responses

Request samples

Content type
application/json
{
  • "description": "jack is the most important API consumer.",
  • "name": "jack",
  • "credentials": {
    },
  • "plugins": {
    },
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Delete Consumer

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

consumer_id
required
string non-empty ^[1-9][0-9]*$

ConsumerId is the consumer id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Create an JSON Web Token

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

consumer_id
required
string non-empty ^[1-9][0-9]*$

ConsumerId is the consumer id

Request Body schema: application/json
ttl
integer <int64> >= 1
Default: 86400

TTL is the time to live of token.

custom_payload
object non-empty

CustomPayload contains some custom key-value fields. These fields will also be kept in the JSON Web Token.

Responses

Request samples

Content type
application/json
{
  • "ttl": 86400,
  • "custom_payload": { }
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    }
}

Certificates

List Certificates

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

query Parameters
direction
string
Default: "DESC"
Enum: "ASC" "DESC"

Direction should be ASC or DESC (case-insensitive). Default value is DESC.

page_size
integer <int64> >= 1
Default: 10

PageSize is the page size. Must greater than 0.

page
integer <int64> >= 1
Default: 1

Page is the page number, starting from 1.

order_by
string
Default: "updated_at"
Enum: "not_after" "created_at" "updated_at"
labels
Array of strings [ 0 .. 32 ] items [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used to filter the result

search
string

search is used to filter the result

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Create Certificate

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

Request Body schema: application/json
certificate
required
string [ 128 .. 65536 ] characters

The certificate in PEM format.

private_key
required
string [ 128 .. 65536 ] characters

The private key for the corresponding certificate in PEM format.

ca_certificate
string [ 128 .. 65536 ] characters

The client CA certificate in PEM format.

labels
Array of strings [ 0 .. 32 ] items unique [ items [ 1 .. 32 ] characters ^[0-9a-zA-Z-_]+$ ]

Labels are used for resources classification and indexing

type
string
Default: "Server"
Enum: "Server" "Client"

The certificate type.

Responses

Request samples

Content type
application/json
{
  • "certificate": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
  • "private_key": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
  • "ca_certificate": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringstringst",
  • "labels": [
    ],
  • "type": "Server"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "status": {
    },
  • "payload": {
    }
}

Get Certificate Details

Authorizations:
token
path Parameters
cluster_id
required
string non-empty ^[1-9][0-9]*$

ClusterID is the cluster id

certificate_id
required
string^[1-9][0-9]*$

CertificateId is the certificate id

Responses

Response samples