Apis

listAPIs

get

This method is used to list all the APIs configured in the cluster.

Responses
200

OK

application/json
get
/apis
GET /gbds/v2/apis HTTP/1.1
Host: <ip>:8085
Accept: */*
{
  "data": [
    {
      "apiId": "text",
      "hostname": "text",
      "port": 1,
      "type": "LEADER"
    }
  ]
}

createAPI

post

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
post
/apis
POST /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"
  }
}

deleteAPI

delete

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
delete
/apis/{apiId}
DELETE /gbds/v2/apis/{apiId} HTTP/1.1
Host: <ip>:8085
Accept: */*
{}

Was this helpful?