Versions Compared

Key

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

...

Code Block
POST https://localhost/operations/rebalance

HTTP/1.1 202 Accepted
Location: https://localhost/operations/12356

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

...

Code Block
GET https://localhost/operations/12356

HTTP/1.1 200 OK

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

...

Code Block
GET https://localhost/operations/12356

HTTP/1.1 200 OK

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


To cancel a request: http DELETE https

Code Block
DELETE https://localhost/

...

operations/12356

HTTP/1.1 200 OK

{ 
  "operationType": "rebalance",
  "startTime":

...

 1287364876

...

,
  "endTime":

...

 232353232

...

,
  "status": "cancelled"
}


If the operation is already finished, the response status should be:  "status": "successful" 


To view all current operations:

Code Block
DELETE httpsGET https://localhost/operations/12356

HTTP/1.1 200 OK

{
  operations: [
    {
      "operationType": "rebalance",
      "startTime": 1287364876,
      "endTimestatus": 232353232"running",
      "statuscancelLink" : "cancelled/operations/12356"
}

If the operation is already finished, the response status should be:  "status": "successful" 

How to purge the operations/????

    },
    {
      "operationType": "gii",
      "startTime": 123455555,
      ...
    }
  ]
}


Referencessome refer:

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

...