open-nomad/website/source/docs/http/agent-servers.html.md
2015-09-25 10:14:30 -07:00

1.5 KiB

layout page_title sidebar_current description
http HTTP API: /v1/agent/servers docs-http-agent-servers The '/v1/agent/servers' endpoint is used to query and update the servers list.

/v1/agent/servers

The servers endpoint is used to query an agent in client mode for its list of known servers. Client nodes register themselves with these server addresses so that they may dequeue work. The servers endpoint can be used to keep this configuration up to date if there are changes in the cluster.

GET

Description
Lists the known server nodes.
Method
GET
URL
`/v1/agent/servers`
Parameters
None
Returns
```javascript
[
  "server1.local:4647",
  "server2.local:4647"
]
```

PUT / POST

Description
Updates the list of known servers to the provided list. Replaces all previous server addresses with the new list.
Method
PUT or POST
URL
`/v1/agent/servers`
Parameters
  • address required The address of a server node in host:port format. This parameter may be specified multiple times to configure multiple servers on the client.
Returns
A 200 status code on success.