API Documentation | Check Move

Use this API to request that a Check be moved from one Broker to another. You can also check the status of existing move requests and update or delete them.

Move requests will be acted on at the top of each minute.

For a Check move to be successful, both Brokers must be up and running when the move is attempted. If one or both Brokers isn't running, the move will be tried again in the next minute and so on.

If an error occurs during a move attempt, the request will be preserved, but it won't be acted on again until the error is fixed and the request is updated.

Fields

_cid string
The primary key
"/check_move/46883"
A string containing a check_move cid
_broker string
ID of Broker the check is currently in
"/broker/1"
A string containing a broker cid
_error string
Text of any error encountered while trying to move the check
"null"
A string containing freeform text
_status string
Status of the current move request
"Pending"
A string containing freeform text
check_id number
ID of the Check to be moved to a new Broker
46883
A number containing an integer, positive or negative
new_broker string
ID of Broker to move the check to
"/broker/245"
A string containing a broker cid

Example

Fetching Move Requests

Fetch details on a move request by performing a GET on the _cid of the request:

GET /check_move/46883
{"_error":"null","check_id":46883,"_status":"Pending","_cid":"/check_move/46883","new_broker":"/broker/245","_broker":"/broker/1"}

From this we can see:

If a Check is successfully moved to the new Broker, the move request will be automatically deleted. If an error occurs, the _status will indicate "Error" and the _error field will contain details about the error. You can delete the request or update it to fix the error.

Creating a new Move Request

You can request a Check be moved to a new Broker by creating a new move request:

POST /check_move
{"check_id":"46883","new_broker":"/broker/245"}

Modifying a Move Request

You can update an existing move request by PUTing a different target Broker to the cid. For example, to change the Broker you want to move the Check to:

PUT /check_move/46883
{"new_broker":"/broker/3"}

As is normal with Circonus the PUT method returns the full JSON of the updated move request in response.

Listing Move Requests

Fetch a list of all pending move requests by performing a GET on the check_move endpoint:

GET /check_move
[{"_error":null,"check_id":46883,"_status":"Pending","new_broker":"/broker/245","_cid":"/check_move/46883","_broker":"/broker/1"},{"check_id":46880,"_status":"Pending","_error":null,"_broker":"/broker/3","new_broker":"/broker/1","_cid":"/check_move/46880"}]

Deleting a Move Request

A move request can be deleted (up until it is successfully executed) by sending a DELETE on the request's _cid:

DELETE /check_move/46883