Services/NodeAssignment: Difference between revisions

Line 17: Line 17:
===Internal===
===Internal===
An internal API for node management - addition of nodes, adjustment of weighting factors, downing and backing off nodes
An internal API for node management - addition of nodes, adjustment of weighting factors, downing and backing off nodes
There is no authentication attached to the internal API. It is assumed that it will only be accessible locally, and with any protections provided by the server.
All API responses return json.
====GET====
/{product} - returns a list of all clusters in the product
/{product}/{cluster} - returns a hash keyed by nodes in the cluster. Values are hashes of the data for each node.
/{product}/{cluster}/{node} - Returns the hash of the data for a single node node.
====PUT====
/{product}/{cluster}/{node}/{key}
/{product}/{cluster}/{key}
/{product}/{key}
Sets the {key} field to the value specified in the PUT body. The scope of this change depends on whether {cluster} (and {node}) are specified in the URL.
Valid keys are: weight, current_in_period, down, backoff. Attempts to set any other keys will get a 400 error. Those should be set using a script or directly into the DB.


===External===
===External===
canmove, Confirmed users
1,173

edits