Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

rebalance request: http POST https://localhost/configurationsoperations/rebalance

response:  202 Accepted, Locationlocation: /configurationsoperations/rebalance12336

subsequent rebalance request would get the same result: (if a rebalance is already going on, the request is simply accepted, but ignored)and returns the running rebalance's operation status link)

if the previous rebalance request is already finished, a new rebalance will be triggered, and a new operation status link will be sent back to the user


status request: http : GET https://localhost/configurationsoperations/rebalance12336

response if of running rebalance is still running: 200 Ok, <response> <status>PENDING</status> <start-time>timestamp</start-time> <link rel="cancel" method="delete" href="/configurations/rebalance" /> </response>response if no rebalance is done: 200 Ok, <response> <status>done</status> <start-time>2 mins.</start-time><end-time>timestamp</end-time></response>  200 OK response: 


{
  "operationType": "rebalance",
  "startTime": "1287364876",
  "status": "RUNNING",
  "cancelMethod": "delete",
  "cancelLink" : "/operations/12356"
}


response of a finished rebalance : 200 Ok, 

{ "operationType": "rebalance", "startTime": "1287364876", "endTime" : "232353232", "status": "successful" }


cancel request: http DELETE https://localhost/operations/12336

response:  200 Ok. { "operationType": "rebalance", "startTime": "1287364876", "endTime" : "232353232", "status": "cancelled" }

if it's already finished, the response should be: { "operationType": "rebalance", "startTime": "1287364876", "endTime" : "232353232", "status": "successful" }


How to purge the operations/????


some refer:

1 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md

...