Skip to content
Delord Kévin edited this page Jan 26, 2014 · 1 revision

Users list

Description: method to get the list of all users

Method type: GET

URL: /admin/users

Body parameters: none

Call:

   curl -k -b cookies -c cookies -XGET {BASE_URL}/admin/users
   {
          "success": true,
          "users": [
                 /* User's description 1 */,
                 /* User's description 2 */,
                 /* User's description n */,
                 ...
          ] 
   } 

Delete user

Description: method to delete an user and all its files.

Method type: DELETE

URL: /admin/users/{user id}

Body parameters: none

Call:

   curl -k -b cookies -c cookies -XDELETE {BASE_URL}/admin/users/642 -d "" 
   {
          "success": true
   }

Update user space

Description: method to update the available user's space.

Method type: POST

URL: /admin/users/{user id}/update_space/{new space in bytes}

Body parameters: none

Call:

   curl -k -b cookies -c cookies -XPOST {BASE_URL}/admin/users/76/update_space/8765434367 
   {
          "success": true
   }

Files list

Description: method to get the description list of all files or just of only one file.

Method type: GET

URL: /admin/files(/{file id})

Body parameters: none

Without file id:

Call:

   curl -k -b cookies -c cookies -XGET {BASE_URL}/admin/files
   {
          "success": true,
          "files": [
                 /* File's description 1 */,
                 /* File's description 2 */,
                 /* File's description n */,
                 ...
          ] 
   } 

With a file id:

Call:

   curl -k -b cookies -c cookies -XGET {BASE_URL}/admin/files/563
   {
          "success": true,
          "files": {
                 /* File's description */
          }
   }

Delete file

match 'admin/files/:id' => 'admin#delete_file', via: :delete

Description: method to delete a file or a folder and all its files and children.

Method type: DELETE

URL: /admin/files/{file id}

Body parameters: none

Call:

   curl -k -b cookies -c cookies -XDELETE {BASE_URL}/admin/files/64 -d "" 
   {
          "success": true
   }

Clone this wiki locally