SEWebAPI icon indicating copy to clipboard operation
SEWebAPI copied to clipboard

Move contents between containers

Open mccorkle opened this issue 8 years ago • 0 comments

Allow a PUT to a block that attempts to move X amount of object from another specified block to this one. The put is on the "receiving" block.

** This will be used to move ore, components, and ingots around within blocks in the MVP **

For rest, make sure we use the http response codes:

  • 200 on successful move
  • 206 on "success, but couldn't move all of X",
  • 401 on "you don't have permissions to this block"
  • 404 on "no block found"
  • 501 on "block is damaged, internal error" :-)
PUT http://server.dom/MagicGridID/blocks

Content-Type:application/json
{
  "data":
  [
    {
      "sourceID": 120295775471435265,
      "Item": "Iron Ore",
      "value": "2000",
      "action": "move",
      "targetID": 123456789012345667
    }
  ]
}

mccorkle avatar Aug 12 '16 15:08 mccorkle