Apis
This method is used to list all the APIs configured in the cluster.
Responses
200
OK
application/json
400
Bad Request
application/json
500
Internal error
application/json
get
/apisGET /gbds/v2/apis HTTP/1.1
Host: <ip>:8085
Accept: */*
{
"data": [
{
"apiId": "text",
"hostname": "text",
"port": 1,
"type": "LEADER"
}
]
}This method is used to create or update an API instance within the cluster. If the API type is LEADER, but another LEADER is already set, the older one becomes a RUNNER type.
Body
Responses
201
Created
application/json
202
Updated
application/json
400
Bad Request
application/json
500
Internal error
application/json
post
/apisPOST /gbds/v2/apis HTTP/1.1
Host: <ip>:8085
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"data": {
"apiId": "text",
"hostname": "text",
"port": 1,
"type": "LEADER"
}
}{
"status": "CREATED",
"data": {
"apiId": "text",
"hostname": "text",
"port": 1,
"type": "LEADER"
}
}This method is used to remove an API instance from the cluster.
Path parameters
apiIdstringRequired
Unique ID of the desired API.
Responses
204
Deleted
application/json
Responseobject
404
API ID does not exist
application/json
500
Internal error
application/json
delete
/apis/{apiId}DELETE /gbds/v2/apis/{apiId} HTTP/1.1
Host: <ip>:8085
Accept: */*
{}Was this helpful?

