创建API端点信息。
接口说明
用于创建 API 端点信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
ApiDestinationName | string | 是 | API 名称,最大长度 127 个字符。最小长度 2 个字符。 | api-destination-name |
ConnectionName | string | 是 | 连接配置名称。最大长度 127 个字符。最小长度 2 个字符。 注意 需要先调用 Connection 接口创建连接配置,ConnectionName 填写已存在的连接名称。 | connection-name |
Description | string | 否 | API 描述,不超过 255 个字符。 | 连接配置描述信息 |
HttpApiParameters | object | 是 | API 端点的配置信息。 | |
Endpoint | string | 是 | API 端点的接入点地址。最大长度 127 个字符。 | http://127.0.0.1:8001/api |
Method | string | 是 | HTTP 请求方法。
| POST |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "5DAF96FB-A4B6-548C-B999-0BFDCB22****",
"Message": "success",
"Code": "Success",
"Date": {
"ApiDestinationName": "ApiDestinationName"
}
}
错误码
HTTP status code | 错误码 | 错误信息 |
---|---|---|
409 | RequestParameterException | Request parameter exception |
409 | RequestParameterInvalid | The ApiDestination name is invalid! Only letters a~z or A~Z, numbers 0~9, underscore (_) and dash (-) are supported. |
409 | RequestParameterInvalid | The connection name length cannot exceed 127. |
409 | ApiDestinationAlreadyExist | The api-destination already existed! |
409 | ConnectionNotExist | The Connection not existed! |
409 | HttpApiParametersIsNull | HttpApiParameters is null! |
409 | EndpointIsBlank | Endpoint is blank! |
409 | Method | Method is blank! |
409 | EndpointLengthExceed | Endpoint length cannot exceed 127! |
409 | ApiDestinationAlreadyExist | The api-destination already existed! |
409 | ApiDestinationCountExceedLimit | The current count of api-destination is [{0}], which will exceed the limit quota. |
500 | InternalError | InternalError |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-09-13 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||
| ||||||||||
2023-04-12 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||
| ||||||||||
2023-04-06 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 看变更集 | ||||||||
|