PowerFolder Server offers an API to make certain functions available to third-party applications, e.g. creating new folders, new user accounts, adding/removing users to/from a folder or modify existing objects.
Technical explanation of the API
The API is a RESTful web service responding on special URIs of PowerFolder Server, e.g. https://powerfolder.example.com/api/folders. A URI is called a service. The API accepts POST and GET HTTP requests. Parameters have to be URL encoded.
Each service accepts one or more parameters and returns its result in JSON format. Each service offers several methods or actions that can be executed. In case an error occurs, a HTTP status code different from 200 (OK) is sent back.
We want to create a new folder named MyFiles. To get this done, we call the service folders with the action create and supply the name of the folder as a parameter for the name variable.
URL to be called: https://powerfolder.example.com/api/folders?action=create&name=MyFiles
- Service: folders
- Action: create
- Parameter(s): name=MyFiles
Authorization / access to the API
Calls to the API always require an authorized caller. This is done by basic access authorization which must be added to each call. Depending on the service and action it's required to authenticate with a regular user or admin (always works).
Services available via API
PowerFolder Server offers several API services: