Accounts API
Actions supported by the Accounts API
Action: getInfo
This action returns basic information about an account. Existing accounts will be searched by ID first, then by username and then by email.
Parameter | Required | Description | Example |
---|---|---|---|
action | Yes | Must always be getInfo . | getInfo |
username, name | Yes* | The username / email of the user. | user@example.com |
ID | Yes* | The universal unique ID of the account. ID will be used to resolve/create the user account. Can be any external ID if unique. | PME2myo2355sRegfgKk8m0YdA |
Yes* | Any email address of the account. Can be a comma separated list to search by multiple emails | email@address.com |
* At least one identifier needs to be passed to the API call.
Example for v11:
https://powerfolder.example.com/api/accounts?action=getInfo&username=user@example.com
Example for v14:
https://powerfolder.example.com/api/accounts?action=getInfo&name=user@example.com
{ "ID":"TruJsi69ag6ar2fVC1SF", "username":"user@example.com", "lastLogin":null, "created":"2012-02-13 03:11:37.725", "validTill":"2013-10-30 10:11:33.725", "notes":"Example Note", "custom1":"Custom field 1", "custom2":"Custom field 2", "custom3":"Custom field 3", "nFolder":2, "nFolderOwner":1, "spaceAllowed":5368709120, "spaceUsed":514229, "devicesAllowed":8, "devicesUsed":2, "serverID":"6bzY8niQKaNEg7xGnog", "firstname":"David", "surname":"Stone", "telephone":"+492133111111", "ldapDN":"cn=David Stone,cn=Users,dc=example,dc=com", "shibbolethPersistentID":"https://idptest.idporganiztation.edu/idp/shibboleth!https://sptest.sporganization.edu/shibboleth/!EDWMDeuFECXwZbTMea0Guu3ntJ4=", "emails":["user@example.com","personal@example.org","no-reply@example.com"], "basePath":"/mnt/data_extra/username@example.com" }
Result Key | Description | Example |
---|---|---|
ID | Account ID | 3GYXgyusXuNoHd88qgWp |
username | Account username | user@example.com |
created | Date the account was created | 2011-02-13 03:11:37.725 |
lastLogin | The last login date Only visible after the user has been logged in already. | 2012-02-13 03:11:37.725 |
validTill | The date until this account is valid Only visible when a value got set. | 2013-10-30 10:11:33.725 |
notes | Custom text notes | This user is valueable. |
custom1 | Custom text field 1 Only visible when a value got set. | 1234567890 |
custom2 | Custom text field 2 Only visible when a value got set. | parent.user@example.com |
custom3 | Custom text field 3 Only visible when a value got set. | Another information from external system. |
nFolder | Number of folders the account is member of | 8 |
nFolderOwner | Number of folders the account is owner of | 2 |
spaceAllowed | The space allowed/quota for this account in bytes. | 5368709120 |
spaceUsed | The space/quota used by this account in bytes. | 514229 |
devicesAllowed | The number of devices this account can be used on. | 8 |
devicesUsed | The number of actual used devices by this account. | 2 |
serverID | The ID of the server which serves this account. | 6bzY8niQKaNEg7xGnog |
v9 or later also supports: | ||
firstname | The first name of the user Only visible when a value got set. | David |
surname | The surname of the user Only visible when a value got set. | Rock |
telephone | The mobile phone number of the user Only visible when a value got set. | +492133111111 |
ldapDN | LDAP/Active directory distinguished name Only visible for LDAP users | cn=David Stone,cn=Users,dc=example,dc=com |
shibbolethPersistentID | Shibboleth persistent-id Only visible for shibboleth users | https://idptest.idporganiztation.edu/idp/shibboleth!https://sptest.spo... |
emails | Array of eEmail address(es) of the user Only visible when a value got set. | [email@host.com, second@email.com] |
basePath | The path on the storage, where the folders of the user reside. Only visible after the user has been logged in already. | /mnt/data_extra/userx/ |
displayName | The Name that gets displayed in the accounts overview | David Rock |
language | The language that got set for the user account | en |
inFederation | Shows if this is a federated account | false |
hasToSAgreed | Shows if the user agreed to the most recent version of the terms of service. |
Action: getFolderPermissions
This action returns information about the folders and permissions of an account. Existing accounts will be search by ID
first and then username
.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be "getFolderPermissions" | getFolderPermissions |
username | Yes | The username / email of the user. | user@example.com |
ID | No | The universal unique ID of the account. ID will be used to resolve/create the user account. Can be any external ID if unique. | PME2myo2355sRegfgKk8m0YdA |
Example
https://powerfolder.example.com/api/accounts?action=getFolderPermissions&username=user@example.com
{ "ResultSet":{ "Result":[ { "folderID":"5LhiBzxp9Uz5698n339Y", "folderName":"Documents", "permission":"OWNER", "resourceURL":"https://powerfolder.example.com/files/NUxoaUJ6eHA5VXo1Njk4bjMzOVk=" }, { "folderID":"UhpBitrekB9Tk3z1gSVz", "folderName":"Project 987", "permission":"ADMIN", "resourceURL":"https://powerfolder.example.com/files/VWhwQml0cmVrQjlUazN6MWdTVno=" }, { "folderID":"HK6gWAX1BVKYFm4UN82i", "folderName":"Sales Material", "permission":"READ", "resourceURL":"https://powerfolder.example.com/files/SEs2Z1dBWDFCVktZRm00VU44Mmk=" } ] } }
Result key | Description | Example |
---|---|---|
folderID | Folder ID | UhpBitrekB9Tk3z1gSVz |
folderName | Name of the folder | Sales Material |
permission | The permission on that folder. Available permissions:
| ADMIN |
resourceURL | The URL the folder is available at. | https://powerfolder.example.com/files/VWhwQml0cmVrQjlUazN6MWdTVno= |
Action: store
This action is for creating or changing user account. If the user account doesn't exists it will be created. If an existing user account is found, it will be updated with the new values. Existing accounts will be searched by ID
first and then username
.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be "store" | store |
username | Yes if ID is empty | The username / email of the user. | user@example.com |
ID | Yes if username is empty | The universal unique ID of the account. Will use this ID to resolve/create the user account. Can be any external ID if unique. | PME2myo2355sRegfgKk8m0YdA |
password | No | The password to set. | §ac0mpl3x_p4ssw0rd! |
notes | No | The notes to set | This is a example note. |
custom1 | No | Custom text/id/external information 1 | 34656644 |
custom2 | No | Custom text/id/external information 2 | Random third-party information |
custom3 | No | Custom text/id/external information 3 | another.user@example.com |
spaceAllowed | No | The space/quota for this user in bytes. "9999" for unlimited | 5368709120 |
devicesAllowed | No | The maximum number of allowed devices to license. "999" for unlimited. | 1 |
validTill | No | The date to which the user account is valid. In ISO format DD-MMM-YYYY. | 21-DEC-2012 |
serverID | No | The ID of the server in cluster the user will always be served by statically. If omitted, a appropriate server is automatically chosen. | 6bzY8niQKaNEg7xGnog |
v9 or later also supports: | |||
firstname | No | The first name of the user | David |
surname | No | The surname of the user | Rock |
emails | No | The emails of the user account. Multiple emails can be separated by comma (,). Will try to resolve any existing accounts by this | mail@anorganization.org, secondmail@test.de |
telephone | No | The mobile phone number of the user | +492133111111 |
ldapDN | No | LDAP/Active directory distinguished name | cn=David Stone,cn=Users,dc=example,dc=com |
shibbolethPersistentID | No | Shibboleth persistent-id | https://idptest.idporganiztation.edu/idp/shibboleth!https://sptest.spo... |
v9.4 or later also supports: | |||
organizationID | No | The organizationID of the account | 0B5DA216628547228F23187C17AD5407 |
basePath | No | The path on the storage, where the data of this user should resides. Does not migrate existing files and folders when changed. | /mnt/data_extra/userx/ |
Example
https://powerfolder.example.com/api/accounts?action=store&username=user@example.com&password=newpassword&spaceBytes=5368709120&licenseDevices=5
{ "ID":"PME2myo2355sRegfgKk8m0YdA", "username":"user@example.com", "message":"Successfully stored user" }
Action: delete
This feature was added in version 9.3 SP 3 of PowerFolder Server
For deleting a single user account and its owned folder.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be "delete" | delete |
ID | Yes | The universal unique ID of the account. | PME2myo2355sRegfgKk8m0YdA |
Example
https://powerfolder.example.com/api/accounts?action=delete&ID=PME2myo2355sRegfgKk8m0YdA
{ "message": "Successfully deleted account", "username": "testuser", "ID": "PME2myo2355sRegfgKk8m0YdA" }
Action: grant
For granting extra user permissions when using Extended Security Control.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be "grant" | grant |
username | Yes, if "ID" is missing | The username / email of the user. | user@example.com |
ID | Yes, if "username" missing | The universal unique ID of the account. | PME2myo2355sRegfgKk8m0YdA |
permissionID | Yes | The permission to grant. Multiple values are allowed. Permissions available:
| FolderCreate |
Example
https://powerfolder.example.com/api/accounts?action=grant&username=user@example.com&permissionID=FolderCreate&permissionID=ChangePreferences
{ "ID":"PME2myo2355sRegfgKk8m0YdA", "username":"user@example.com", "message":"user@example.com granted FolderCreatePermission" }
Action: revoke
For revoking extra user permissions when using Extended Security Control.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be "revoke" | revoke |
username | Yes, if "ID" is missing | The username / email of the user. | user@example.com |
ID | Yes, if "username" missing | The universal unique ID of the account. | PME2myo2355sRegfgKk8m0YdA |
permissionID | Yes | The permission to revoke. Multiple values are allowed. Permissions available:
| FolderCreate |
Example
https://powerfolder.example.com/api/accounts?action=revoke&username=user@example.com&permissionID=FolderCreate&permissionID=ChangePreferences
{ "ID":"PME2myo2355sRegfgKk8m0YdA", "username":"user@example.com", "message":"user@example.com revoked FolderCreatePermission" }
Action: getLoginURL
Retrieves an auto-login URL for an user account e.g. for single sign-on from other web portals or pages.
Please read the documentation related to the Login Callback API.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be "getLoginURL" | getLoginURL |
username | Yes | The username / email of the user. | user@example.com |
ID | No | The universal unique ID of the account. Will use this ID to resolve/create the user account. Can be any external ID if unique. | PME2myo2355sRegfgKk8m0YdA |
password | Yes | The password/credentials of that user account. | 3 chicken ate my bag |
Example
https://powerfolder.example.com/api/accounts?action=getLoginURL&username=user@example.com&password=3%20chicken%20ate%20my%20bag
{ "ID":"PME2myo2355sRegfgKk8m0YdA", "username":"user@example.com", "loginURL":"https://powerfolder.example.com/login?Username=user@example.com&PasswordOBF=GAlIQUJIQE5DWAlKXQlGUglOTEw%3D" }
Action: getAccounts
Get a full list of all accounts.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be "getAccounts" | getAccounts |
pageSize | Yes | The number of entries per page | 25 |
pageNumber | Yes | The number of the page to retrieve | 4 |
sortProperty | No | Sorting is possible by Username name and Organization OID org | org |
sortOrder | No | Sorting order ascending asc or descending desc | desc |
filterByPermission | No | Retrieve accounts that have a certain permission Since: 11.0 Deprecated since 11.4 – use permission instead | AdminPermission |
permission | No | Filter accounts by permission. Passing this parameter multiple times is supported! Since: 11.4 | AdminPermission |
organizationID | No | Filtering accounts by membership of organization Since: 11.3 | TVD8LaCbpvx3NJH8SCDx |
restrictOrgOID | No | Filtering accounts by membership of organization Deprecated since: 11.3 – use organizationOID instead | TVD8LaCbpvx3NJH8SCDx |
Example
https://powerfolder.example.com/api/accounts?action=getAccounts
{ "ResultSet":{ "Result":[ { "ID":"TruJsi69ag6ar2fVC1SF", "username":"user1@example.com", "lastLogin":null, "created":"2012-02-13 03:11:37.725", "validTill":"2013-10-30 10:11:33.725", "notes":"Example Note", "custom1":"Custom field 1", "custom2":"Custom field 2", "custom3":"Custom field 3", "nFolder":2, "nFolderOwner":1, "spaceAllowed":5368709120, "spaceUsed":514229, "devicesAllowed":8, "devicesUsed":2, "serverID":"6bzY8niQKaNEg7xGnog", "firstname":"David", "surname":"Stone", "telephone":"+492133111111", "ldapDN":"cn=David Stone,cn=Users,dc=example,dc=com", "shibbolethPersistentID":"https://idptest.idporganiztation.edu/idp/shibboleth!https://sptest.sporganization.edu/shibboleth/!EDWMDeuFECXwZbTMea0Guu3ntJ4=" }, { "ID":"FJsdfj093jkf3j3ijf3l", "username":"user2@example.com", "lastLogin":null, "created":"2012-02-13 03:11:37.725", "validTill":"2013-10-30 10:11:33.725", "notes":"Example Note", "custom1":"Custom field 1", "custom2":"Custom field 2", "nFolder":2, "nFolderOwner":1, "spaceAllowed":5368709120, "spaceUsed":514229, "devicesAllowed":8, "devicesUsed":2, "serverID":"6bzY8niQKaNEg7xGnog" } ]} }
Action: merge
Using this API call you can merge one or more accounts into a single account.
This feature was added in version 11.2 SP 2 of PowerFolder Server
Parameter | Required | Description | Example |
---|---|---|---|
action | Yes | Must always be merge . | merge |
username | Yes* | The username of the user. | user@example.com |
ID | Yes* | The universal unique ID of the account. ID will be used to resolve/create the user account. Can be any external ID if unique. | PME2myo2355sRegfgKk8m0YdA |
mergeID | Yes† | The ID of an account to be merged into the account specified by ID or username. | 3GYXgyusXuNoHd88qgWp |
mergeUsername | Yes† | The username of an account to be merged into the account specified by ID or username. | merge@example.org |
* At least one identifier needs to be passed to the API call.
† At least one identifier needs to be passed to the API call. Both mergeID and mergeUsername can be mixed and specified multiple times in one call. You must NOT pass the mergeID AND the mergeUsername of the same account!
https://powerfolder.example.com/api/accounts?action=merge&ID=PME2myo2355sRegfgKk8m0YdA&mergeUsername=merge@example.com&mergeID=Wni7DFkmdySELqBdsUs8
{ "message": "Successfully merged accounts." "ID": "PME2myo2355sRegfgKk8m0YdA", }
Action: setJSON
This call is available since PowerFolder Server version 11.2
Using this action you can store custom data as key value pairs to a JSON field of the account. To do so any HTTP parameter added to the call of this API endpoint except action and ID will be added to the custom data.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be setJSON. | setJSON |
ID | Yes | This is the ID of the account | Wni7DFkmdySELqBdsUs8 |
Example
http://powerfolder.example.com/api/accounts?action=setJSON&ID=Wni7DFkmdySELqBdsUs8&isBusiness=true&foo=bar
{ "information":{"isBusiness":"true", "foo":"bar"}, "ID":"Wni7DFkmdySELqBdsUs8", "message":"Added information to Account" }
Action: removeJSON
This call is available since PowerFolder Server version 11.2
Using this action you can remove custom data from the JSON field of the account. To do so any HTTP parameter's key (name) added to the call of this API endpoint except action and OID will be removed from the custom data.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be removeJSON. | removeJSON |
OID | Yes | This is the ID of the account. | Wni7DFkmdySELqBdsUs8 |
Example
http://powerfolder.example.com/api/accounts?action=removeJSON&ID=Wni7DFkmdySELqBdsUs8&isBusiness=
{ "information":{"foo":"bar"}, "OID":"Wni7DFkmdySELqBdsUs8", "message":"Removed information from Organization" }
Action: setActivationDate
This call is available since PowerFolder Server version 11.6
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be setActivationDate. |
|
ID | Yes * | This is the ID of the account. | Wni7DFkmdySELqBdsUs8 |
date | No | The activation date to be set. If date is blank the today's date will be set. | dd.MM.yyyy |
When using the action "setActivationDateAll" is used no ID is required and the date gets set to the current or chosen date.
Example
http://powerfolder.example.com/api/accounts?action=setActivationDate&ID=Wni7DFkmdySELqBdsUs8&date=02.03.2018
OR
http://powerfolder.example.com/api/accounts?action=setActivationDate&ID=Wni7DFkmdySELqBdsUs8
{"message":"Successfully set activation date."}
Action: correctStoragePath
This call is available since PowerFolder Server version 11.4
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be correctStoragePath. | correctStoragePath |
ID | Yes | This is the ID of the account. | Wni7DFkmdySELqBdsUs8 |
username | Yes | This is the username of the account | TheUserName |
Example
http://powerfolder.example.com/api/accounts?action=correctStoragePath&ID=Wni7DFkmdySELqBdsUs8
OR
http://powerfolder.example.com/api/accounts?action=correctStoragePath&username=TheUserName
{"message":"Successfully corrected all storage paths."}
{"lastLogin":"2017-12-01 15:19:49.0","spaceAllowed":0,"notes":"","created":"2017-12-01 14:42:58.0","displayName":"test2","spaceUsed":0,"language":"en","serverID":"qapfdd05","nFolderOwner":0,"hasToSAgreed":true,"devicesUsed":0,"nFolder":0,"devicesAllowed":999,"basePath":"/home/adama/clusterstorage1/test2","ID":"DB7D433B46844035B0A7E3E23006ECBC","inFederation":false,"username":"test2"}
Action: findDuplicatesInFederation
The API call returns a list of mailaddresses that are used on the local service and are existing on other federated services too.
Caution: This API call might take a long time untill it finishes since every account has to get checked.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be findDuplicatesInFederation | findDuplicatesInFederation |
http://powerfolder.example.com/api/accounts?action=findDuplicatesInFederation