Shares AMI move file

Discussion in 'LiquidFiles General' started by Tony Pires, Jul 3, 2018.

  1. Tony Pires

    Tony Pires New Member

    Joined:
    Nov 2, 2016
    Messages:
    4
    Likes Received:
    1
    I noticed a discrepancy in the API docs when it comes to moving files.

    https://man.liquidfiles.com/api/shares/move_file.html

    It says in the parameter request it should be “new_parent_folder_id” but in the curl example it says “new_folder_id”. Which is correct? Neither works. Here’s an example of the errors from a curl command:

    Code:
    curl -X PUT -H "Content-Type: application/json" --user 8VI86N9OxAGJGbnO1R7ijY:x -d '{"new_parent_folder_I'd":"previous"}' https://lqbeta.myserver.com/shares/portal-test/folders/root/files/img_1861-jpg
    
    {"error":{"path_not_found":"/shares/portal-test/folders/root/files/img_1861-jpg"}}
    Code:
    curl -X PUT -H "Content-Type: application/json" --user 8VI86N9OxAGJGbnO1R7ijY:x -d '{"new_folder_id":"previous"}' https://lqbeta.myserver.com/shares/portal-test/folders/root/files/img_1861-jpg
    
    {"error":{"path_not_found":"/shares/portal-test/folders/root/files/img_1861-jpg"}}
    When doing a GET on the same file it works just fine so I think I ruled out an authentication issue or syntax issue.

    Code:
    curl -X GET -H "Content-Type: application/json" --user 8VI86N9OxAGJGbnO1R7ijY:x  https://lqbeta.myserver.com/shares/portal-test/folders/root/files/img_1861-jpg
     
  2. Johan

    Johan Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    41
    Likes Received:
    1
    There was a couple of errors with the API and the documentation. Please make sure you're running the latest version 3.2.9 and follow the current guide.
     

Share This Page