Skip to content

ServicesSchema

API Metadata and Schema Management - Manage OpenAPI metadata and JSON Schema definitions with synchronization capabilities


Query all tags of the service

GET
/api/v1/services/{serviceId}/schema/tag

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace tag of the service

PUT
/api/v1/services/{serviceId}/schema/tag

Note: The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
{
"name": "User",
"description": "User Rest API",
"externalDocs": {
"description": "Find more info here",
"url": "https://example.com",
"extensions": {
"additionalProperties": {
}
}
},
"extensions": {
"additionalProperties": {
}
}
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Delete tags of the service

DELETE
/api/v1/services/{serviceId}/schema/tag

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

names*

Report names

类型array
必填
uniqueItemstrue

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace all tags of the service

PUT
/api/v1/services/{serviceId}/schema/tag/all

Note: The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
[
{
"name": "User",
"description": "User Rest API",
"externalDocs": {
"description": "Find more info here",
"url": "https://example.com",
"extensions": {
"additionalProperties": {
}
}
},
"extensions": {
"additionalProperties": {
}
}
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Query all server configurations of the service

GET
/api/v1/services/{serviceId}/schema/server

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace server configuration of the service

PUT
/api/v1/services/{serviceId}/schema/server

A declaration of which servers can be used across the API. For more details on the server, please see: OpenAPI Specification#Server Object

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
{
"url": "https://{env}-api.xcan.cloud:{port}/{basePath}",
"description": "The production API server",
"variables": {
"extensions": {
"additionalProperties": {
}
},
"empty": true,
"additionalProperties": {
}
},
"extensions": {
"additionalProperties": {
}
},
"emptyContent": true,
"notEmptyContent": true
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Delete servers of the service

DELETE
/api/v1/services/{serviceId}/schema/server

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

ids*

Server ids

类型array
必填
uniqueItemstrue

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Synchronous server configuration to the service apis

PUT
/api/v1/services/{serviceId}/schema/server/{serverId}/apis/sync

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"
serverId*

Server id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace all server configurations of the service

PUT
/api/v1/services/{serviceId}/schema/server/all

A declaration of which servers can be used across the APINote: The local server will be deleted when it does not exist in the requestFor more details on the server, please see: OpenAPI Specification#Server Object

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
[
{
"url": "https://{env}-api.xcan.cloud:{port}/{basePath}",
"description": "The production API server",
"variables": {
"extensions": {
"additionalProperties": {
}
},
"empty": true,
"additionalProperties": {
}
},
"extensions": {
"additionalProperties": {
}
},
"emptyContent": true,
"notEmptyContent": true
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Query all security requirements of the service

GET
/api/v1/services/{serviceId}/schema/securityRequirement

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace security requirements of the services

PUT
/api/v1/services/{serviceId}/schema/securityRequirement

A declaration of which security mechanisms can be used across the API. For more details on the security requirements, please see: OpenAPI Specification#Security Requirement Object

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
{
"empty": true,
"additionalProperties": [
]
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Delete security requirements of the service

DELETE
/api/v1/services/{serviceId}/schema/securityRequirement

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

names*

Security schema names

类型array
必填
uniqueItemstrue

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace all security requirements of the service

PUT
/api/v1/services/{serviceId}/schema/securityRequirement/all

A declaration of which security mechanisms can be used across the API. For more details on the security requirements, please see: OpenAPI Specification#Security Requirement Object

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
[
{
"empty": true,
"additionalProperties": [
]
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Query the schema info of service

GET
/api/v1/services/{serviceId}/schema/info

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace the services schema info

PUT
/api/v1/services/{serviceId}/schema/info

Provides metadata about the API. Note: Metadata is required for an OpenAPI document, so it cannot be deleted after adding it

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
{
"title": "string",
"description": "string",
"termsOfService": "string",
"contact": {
"name": "API Support",
"url": "https://www.xcan.cloud/support",
"email": "api_support@example.com",
"extensions": {
"additionalProperties": {
}
}
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0",
"identifier": "Apache-2.0",
"extensions": {
"additionalProperties": {
}
}
},
"version": "string",
"extensions": {
"additionalProperties": {
}
},
"summary": "string"
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Query the additional external documentation of service

GET
/api/v1/services/{serviceId}/schema/externalDoc

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace the service referencing for external documentation

PUT
/api/v1/services/{serviceId}/schema/externalDoc

Allows referencing an external resource for extended documentation for OpenAPI document

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
{
"description": "Find more info here",
"url": "https://example.com",
"extensions": {
"additionalProperties": {
}
}
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Query all schema extensions of the service

GET
/api/v1/services/{serviceId}/schema/extensions

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace all schema extensions of the service

PUT
/api/v1/services/{serviceId}/schema/extensions

For more information, please see: Specification Extensions

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
{
"additionalProperties": {
}
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Query the OpenAPI document of service

GET
/api/v1/services/{serviceId}/openapi

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

format

OpenAPI document format. Available values yaml or json, the default value is yaml

类型string
枚举
"yaml""json""yaml, json"
示例"yaml"
gzipCompression

Whether to turn on Gzip compression. It is recommended to enable gzip compression. After enabling it, the data size can be reduced by more than 20 times. By default, gzip compression is enabled

类型boolean
示例true
apiIds

Apis ids included. Specify the apis to include, include all when not specified

类型array
uniqueItemstrue
onlyApisComponents

Only return apis associated components, if true, return all components, default false

类型boolean
示例false

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace the OpenAPI document of service

PUT
/api/v1/services/{serviceId}/openapi

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

forced*

Forced modification

类型boolean
必填
gzipCompression*

Whether to turn on Gzip compression

类型boolean
必填

请求体

application/json
JSON
"string"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

OpenAP specification text translation

PATCH
/api/v1/services/{id}/translate

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Service id

类型integer
必填
format"int64"

查询参数

sourceLanguage*

Source language

类型string
必填
枚举
"en""zh_CN"
targetLanguage*

Target language

类型string
必填
枚举
"en""zh_CN"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the schema detail of service

GET
/api/v1/services/{serviceId}/schema

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query detail configurations of the server

GET
/api/v1/services/{serviceId}/schema/server/{serverId}

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"
serverId*

Server id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query all server configurations of the project

GET
/api/v1/services/schema/server

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

projectId*

Project id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Released under the GPL-3.0 License.