創(chuàng)建API端點(diǎn)信息。
接口說(shuō)明
用于創(chuàng)建 API 端點(diǎn)信息。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。
授權(quán)信息
當(dāng)前API暫無(wú)授權(quán)信息透出。
請(qǐng)求參數(shù)
名稱 | 類(lèi)型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
ApiDestinationName | string | 是 | API 名稱,最大長(zhǎng)度 127 個(gè)字符。最小長(zhǎng)度 2 個(gè)字符。 | api-destination-name |
ConnectionName | string | 是 | 連接配置名稱。最大長(zhǎng)度 127 個(gè)字符。最小長(zhǎng)度 2 個(gè)字符。 注意 需要先調(diào)用 Connection 接口創(chuàng)建連接配置,ConnectionName 填寫(xiě)已存在的連接名稱。 | connection-name |
Description | string | 否 | API 描述,不超過(guò) 255 個(gè)字符。 | 連接配置描述信息 |
HttpApiParameters | object | 是 | API 端點(diǎn)的配置信息。 | |
Endpoint | string | 是 | API 端點(diǎn)的接入點(diǎn)地址。最大長(zhǎng)度 127 個(gè)字符。 | http://127.0.0.1:8001/api |
Method | string | 是 | HTTP 請(qǐng)求方法。
| POST |
返回參數(shù)
示例
正常返回示例
JSON
格式
{
"RequestId": "5DAF96FB-A4B6-548C-B999-0BFDCB22****",
"Message": "success",
"Code": "Success",
"Date": {
"ApiDestinationName": "ApiDestinationName"
}
}
錯(cuò)誤碼
HTTP status code | 錯(cuò)誤碼 | 錯(cuò)誤信息 |
---|---|---|
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 |
訪問(wèn)錯(cuò)誤中心查看更多錯(cuò)誤碼。
變更歷史
變更時(shí)間 | 變更內(nèi)容概要 | 操作 |
---|---|---|
2023-09-13 | OpenAPI 錯(cuò)誤碼發(fā)生變更 | 查看變更詳情 |
2023-04-12 | OpenAPI 錯(cuò)誤碼發(fā)生變更 | 查看變更詳情 |
2023-04-06 | OpenAPI 錯(cuò)誤碼發(fā)生變更、OpenAPI 入?yún)l(fā)生變更 | 查看變更詳情 |