Creating a Service Endpoint
Function
This API is used to create a service endpoint.
Calling Method
For details, see Calling APIs.
URI
POST /v1/serviceconnection/endpoints
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
url |
No |
String |
Definition: URL. Constraints: N/A Value range: N/A Default value: N/A |
name |
No |
String |
Definition: Endpoint name. Constraints: N/A Value range: N/A Default value: N/A |
project_uuid |
No |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
region_name |
No |
String |
Definition: Region name. Constraints: N/A Value range: N/A Default value: N/A |
module_id |
No |
String |
Definition: Module ID. Constraints: N/A Value range: N/A Default value: N/A |
authorization |
No |
EndpointAuthorizationBody object |
Definition: Permission information. Constraints: N/A Value range: N/A Default value: N/A |
data |
No |
Object |
Definition: Endpoint data structure. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
ErrorInfo object |
Definition: Error message. Value range: N/A |
result |
Object |
Definition: Error result. Value range: N/A |
status |
String |
Definition: Status value. Value range: N/A |
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition: Error code. Value range: N/A |
message |
String |
Definition: Error message. Value range: N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Parameter description: Error message. Value range: N/A |
error_code |
String |
Parameter description: Error code. Value range: N/A |
Example Requests
{ "url" : "https://test.com", "name" : "test", "project_uuid" : "6cb920b7932948a3ade7ec1d712494eb", "region_name" : "regionName", "authorization" : { "parameters" : { "username" : "username", "state" : "redirectURI", "password" : "password" }, "scheme" : "endpoint-auth-scheme-basic" }, "data" : { "key1" : "value1", "key2" : "value2" }, "module_id" : "devcloud2018.codesource-authenticate-generic.oauth02" }
Example Responses
Status code: 200
OK
{ "status" : "success", "error" : null, "result" : { "uuid" : "c6bbed0feaea4c6aa24da7fd86b886e8", "url" : "https://test.com", "name" : "test", "projectUuid" : "6cb920b7932948a3ade7ec1d712494eb", "regionName" : "regionName", "authorization" : { "parameters" : { "username" : "username", "state" : "redirectURI", "password" : "password" }, "scheme" : "endpoint-auth-scheme-basic" }, "data" : { "key1" : "value1", "key2" : "value2" }, "moduleId" : "devcloud2018.codesource-authenticate-generic.oauth02", "created_by" : { "username" : "user_01", "user_id" : "user_id" } } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot