Skip to content

Services

Api Service Registry - Unified lifecycle management for API services


Replace the name of service

PUT
/api/v1/services/{id}/name

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Service id

类型integer
必填
format"int64"

查询参数

name*

New service name

类型string
必填

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the list of service

GET
/api/v1/services

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

查询参数

id
类型integer
format"int64"
projectId*

Project id

类型integer
必填
format"int64"
name

Services name

类型string
admin

Required when app administrators query all projects

类型boolean
hasPermission

Required when the user query has the one permission project

类型string
枚举
"ADD""VIEW""MODIFY""DELETE""TEST""GRANT""SHARE""RELEASE""EXPORT"
queryHasApis
类型boolean
queryHasMockService
类型boolean
createdBy
类型integer
format"int64"
createdDate
类型string
format"date-time"
pageNo

Page data size, default 1, maximum 100000

类型integer
format"int32"
maximum100000
minimum1
pageSize

Page data size, default 10, maximum 2000

类型integer
format"int32"
maximum2000
minimum1
orderBy

Sort field

类型string
orderSort

Sorting method

类型string
枚举
"ASC""DESC"
filters[0].key

Filter field name

类型string
filters[0].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[0].value

Filter value

filters[1].key

Filter field name

类型string
filters[1].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[1].value

Filter value

filters[2].key

Filter field name

类型string
filters[2].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[2].value

Filter value

infoScope

Query information scope

类型string
枚举
"BASIC""DETAIL"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Add service

POST
/api/v1/services

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"projectId": 0,
"name": "UserService",
"auth": true
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Clone service

POST
/api/v1/services/{id}/clone

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Service id

类型integer
必填
format"int64"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Import the apis to service

POST
/api/v1/services/import

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

multipart/form-data
object

Project ID, required when creating a service

格式"int64"

Import services id. Importing existing projects is required, create new services if serviceId is empty

格式"int64"

Import services name. The name is required when importing a new services

Import data source type

有效值"OPENAPI""POSTMAN""ANGUS"

Strategy for handling duplicate apis. The COVER value overrides the local api, and the IGNORE value ignores the synchronization current api

有效值"COVER""IGNORE"

The delete flag when not existed. Whether to delete a local api when it does not exist in the current synchronized data

Apis specification content. API definition string content in json or yaml format, multiple files import is not supported

Apis specification file. API definition file in json or yaml format, multiple files need to be compressed into a zip file before uploading

格式"binary"
string[]

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Export the apis from service

POST
/api/v1/services/export

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"exportScope": "string",
"apiIds": [
0
],
"serviceIds": [
0
],
"format": "string",
"onlyApisComponents": false
}

响应

OK

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

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Import the service example

POST
/api/v1/services/example/import

授权

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

Modify services status

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

If modifying a services, all services and apis status under the services will be synchronously modified

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Service id

类型integer
必填
format"int64"

查询参数

status*

Service status

类型string
必填
枚举
"UNKNOWN""IN_DESIGN""IN_DEV""DEV_COMPLETED""RELEASED"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the detail of service

GET
/api/v1/services/{id}

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Service id

类型integer
必填
format"int64"

查询参数

joinSchema

Whether to associate services schema information flag

类型boolean

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Delete service

DELETE
/api/v1/services/{id}

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Service id

类型integer
必填
format"int64"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the mock service information associated with the service

GET
/api/v1/services/{id}/association/mock/service

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Fulltext search the service

GET
/api/v1/services/search
UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

查询参数

id
类型integer
format"int64"
projectId*

Project id

类型integer
必填
format"int64"
name

Services name

类型string
admin

Required when app administrators query all projects

类型boolean
hasPermission

Required when the user query has the one permission project

类型string
枚举
"ADD""VIEW""MODIFY""DELETE""TEST""GRANT""SHARE""RELEASE""EXPORT"
queryHasApis
类型boolean
queryHasMockService
类型boolean
createdBy
类型integer
format"int64"
createdDate
类型string
format"date-time"
pageNo

Page data size, default 1, maximum 100000

类型integer
format"int32"
maximum100000
minimum1
pageSize

Page data size, default 10, maximum 2000

类型integer
format"int32"
maximum2000
minimum1
orderBy

Sort field

类型string
orderSort

Sorting method

类型string
枚举
"ASC""DESC"
filters[0].key

Filter field name

类型string
filters[0].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[0].value

Filter value

filters[1].key

Filter field name

类型string
filters[1].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[1].value

Filter value

filters[2].key

Filter field name

类型string
filters[2].op

Filter condition (EQUAL, NOT_EQUAL, GREATER_THAN, etc.)

类型string
枚举
"GREATER_THAN""LESS_THAN""GREATER_THAN_EQUAL""LESS_THAN_EQUAL""EQUAL""NOT_EQUAL""MATCH""MATCH_END""NOT_MATCH""NOT_MATCH_END""IN""NOT_IN""IS_NULL""IS_NOT_NULL"
filters[2].value

Filter value

infoScope

Query information scope

类型string
枚举
"BASIC""DETAIL"

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}
授权
变量
cURL
JavaScript
PHP
Python