Pydio REST API (v2)

Access to Pydio documents and provision admin data (users, groups, roles...) via a RESTful API.

How-to use this API

Pydio API v2 is following the standards and providing various endpoints to manage both your files & folders and all the Pydio administrative data. It exposes the internal data of Pydio using the various HTTP methods for CRUD operations: GET, POST, PATCH, DELETE.

API v2 is accessible on your pydio installation under the /api/v2/ URI. That is, if pydio installed on https://yourdomain.tld/pydio, the endpoints exposed here are available under https://yourdomain.tld/pydio/api/v2.

Please note that some actions are not (yet) available through this API, and you may have to use API V1 (wich is available by default as well on your installation).

Authentication & Format

Basic Authentication

Authentication against the API is done via HTTP Basic-Authentication. The standard users credentials (admin / password) can be used to login.
You can also use users Tokens instead as generated in the "My Api Keys" panel of My Account.

Request & Parameters

Depending on the request, most parameters are passed as GET or POST key values. Provisioning API now introduce many queries that will take JSON objects as input, see the docs below for the format.

Getting JSON responses

Historically, Pydio has been using XML extensively for requests responses format. Since Pydio 7, this API v2 will mostly support both JSON and XML format as a response format. Just pass an additional format=json to the parameters of the query.

Managing Files and Folders

The File API's allow you to list, create, update or delete files inside any workspace. It is split into two main endpoints:

  • /fs : is used to list, create files and folders, rename them, etc.. via the various HTTP methods.
  • /io : is used to manage actual files data, i.e. upload or download data via GET / PUT methods.

These endpoints generally require a {path} parameter that MUST BE composed of the target workspace identifier and the actual path of the file inside the workspace. The workspace is either its "slug" (the part you see in the url when you are browsing pydio, without the ws- prefix) or its real ID which is a 32 characters long string. Only default "Common Files" and "My Files" have an id of respectively "0" and "1".

For example, if you want to list folder /my-folder inside your personal folder, you can use : https://yourserver.tld/pydio/api/v2/fs/my-files/my-folder?children=dfz

Concretely you can run this command, the second part replaces ',' with end of line for your convenience.

curl -s -u demo:demo "http://demo.pyd.io/api/v2/fs/my-files/?children=dfz&format=json" | sed 's/,/,\'$'\n/g'
-- Sample output --
{"pagination":{"count":1,
"current":1,
"total":1,
"dirs":1,
"remoteSort":{"remote_order":"true",
"currentOrderCol":null,
"currentOrderDir":null}},
"data":{"node":{"repo_has_recycle":"\/recycle_bin",
"mimestring_id":8,
"icon":"folder.png",
"fonticon":"folder",
"openicon":"folder_open.png",
"ajxp_mime":"ajxp_folder",
"file_group":true,
"file_owner":true,
"ajxp_readonly":"false",
"file_perms":"0755",
"ajxp_modiftime":1477481836,
"bytesize":0,
"ajxp_relativetime":"Modified today at 11:37",
"ajxp_description":"Modified today at 11:37",
"path":"\/",
"type":"collection"},
"children":{"\/recycle_bin":{"icon":"trashcan.png",
"fonticon":"delete",
"mimestring_id":122,
"ajxp_mime":"ajxp_recycle",
"file_group":true,
"file_owner":true,
"ajxp_readonly":"false",
"file_perms":"0755",
"ajxp_modiftime":1477481836,
"bytesize":0,
"ajxp_relativetime":"Modified today at 11:37",
"ajxp_description":"Modified today at 11:37",
"path":"\/recycle_bin",
"type":"collection",
"label":"Recycle Bin"}}}}
Browsing current user configuration

The User Account and Workspaces API allows the listing of the configuration of the currently logged user. This means, that it will for example list the workspace accessible to the user with wich you have logged to the API.
It is not the right API to browse users information when logged in as admin.

Admin Provisioning

The Provisioning API provides a full rewrite of the previous administration API in a much clearer and standard-aware approach. All endpoints start with /api/v2/admin/

  • /admin/people : manage users and groups
  • /admin/workspaces: manage workspaces and there "meta-features"
  • /admin/roles : manage roles (either admin roles or "users" roles or "groups" roles).

See section below for more details.

API Endpoints

This documentation is generated automatically using the Open API JSON description file used by pydio internally.