4

There is a move operation in v1 API.

But is there any equivalent for v2 Rest API? There is copy function in V2, I tried to replace it as move but no love, with operation not permitted error or something like that:

curl https://api.box.com/2.0/files/FILE_ID/move \
  -H "Authorization: BoxAuth api_key=API_KEY&auth_token=AUTH_TOKEN" \
  -d '{"parent": {"id" : FOLDER_ID}}' \
  -X MOVE
Rostyslav Dzinko
  • 39,424
  • 5
  • 49
  • 62
metric
  • 193
  • 1
  • 2
  • 9

1 Answers1

5

You can do this by updating the parent of the item via a PUT request i.e.

curl https://api.box.com/2.0/files/FILE_ID \
    -H "Authorization: BoxAuth api_key=API_KEY&auth_token=AUTH_TOKEN" \
    -d '{"parent": {"id": "THE_NEW_PARENT_ID"}}' \
    -X PUT
metric
  • 193
  • 1
  • 2
  • 9
seanrose
  • 8,185
  • 3
  • 20
  • 21
  • It is there under 'Update a File's Informstion', although it's not hugely pronounced http://developers.box.com/docs/#files-update-a-files-information – seanrose Aug 22 '12 at 14:11