Organizations API
Actions supported by the Organizations API
Action: create
This action returns the ID and the name of the created organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be create | create |
name | Yes | Name of the new organization | Power |
Example
https://powerfolder.example.com/api/organizations?action=create&name=Power
{ "ID":"TVD8LaCbpvx3NJH8SCDx", "Name":"Blab" }
Action: getInfo
This action returns several informations about a organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be getInfo | getInfo |
OID | Yes | OID of the organization | DveE4UFBVRgmvmHrGC1w |
Example
https://powerfolder.example.com/api/organizations?action=getInfo&OID=DveE4UFBVRgmvmHrGC1w
{ "id":"DveE4UFBVRgmvmHrGC1w", "maxUsers":15, "nUsers": 13, "name":"I am the name of an organization", "storageSize":53687091200, "storageUsed":26843545600, "notes":"I am a note", "domains":["example.com", "example.org"], "jsonData":{"isBusiness":"true"} }
Action: getOrganizations
This action returns a list of organizations available on the server.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be getOrganizations | getOrganizations |
query | No | Beginning of the name of an organization to search for | Power |
adminAccountOID | No | List all organizations the account is administrator of. Since: 11.0 | TruJsi69ag6ar2fVC1SF |
adminAccountUsername | No | List all organizations the account is administrator of. Since: 11.0 | orgadmin@example.org |
Example
https://powerfolder.example.com/api/organizations?action=getOrganizations&query=Power
{ "ResultSet":{ "Result":[ { "ID":"Aey7sUi7N4R9r5CZ6vxS", "name":"PowerFolder", "maxUsers: 10, "nUsers": 8, "notes":"Created in 2007" }, { "ID":"Wni7DFkmdySELqBdsUs8", "name":"Power for Tomorrow", "maxUsers: 5, "nUsers": 2, "notes":"Sustainable Energy Solutions" } ] } }
Action: rename
This action renames an organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be rename. | rename |
OID | Yes | This is the ID of the organization to rename. | Wni7DFkmdySELqBdsUs8 |
name | Yes | The new name of the organization. | Power of Tomorrow |
Example
http://powerfolder.example.com/api/organizations?action=rename&OID=Wni7DFkmdySELqBdsUs8&name=Power%20of%20Tomorrow
Action: changeNotes
This action changes the notes of an organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be changeNotes. | changeNotes |
OID | Yes | This is the ID of the organiztation to change the note. | Wni7DFkmdySELqBdsUs8 |
notes | No | The notes to set for this organization. | Sustainable Energy |
Example
http://powerfolder.example.com/api/organizations?action=changeNotes&OID=Wni7DFkmdySELqBdsUs8¬es=Sustainable%20Energy
Action: changeSize
This action changes the storage size that can be distributed among the users.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be changeSize. | changeSize |
OID | Yes | This is the ID of the organization to change the storage size. | Wni7DFkmdySELqBdsUs8 |
storageSizeGB | No | The new storage size in giga byte. If it is not specified, the size is not limited. | 123 |
Example
http://powerfolder.example.com/api/organizations?action=changeSize&OID=Wni7DFkmdySELqBdsUs8&storageSizeGB=123
Action: changeValidFrom
This action changes the validity starting date of this organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be changeValidFrom. | changeValidFrom |
OID | Yes | This is the ID of the organization to change the validity starting date. | Wni7DFkmdySELqBdsUs8 |
OSValidFrom | No | The new validity starting date of the organization. If it is not specified, the date is removed. The format of the date is "dd MMM yyyy". | 10 DEC 2013 |
Example
http://powerfolder.example.com/api/organizations?action=changeValidFrom&OID=Wni7DFkmdySELqBdsUs8&OSValidTill=10%20DEC%202010
Action: changeValidTill
This action changes the validity ending date of this organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be changeValidTill. | changeValidTill |
OID | Yes | This is the ID of the organization to change the validity ending date. | Wni7DFkmdySELqBdsUs8 |
OSValidTill | No | The new validity ending date of the organization. If it is not specified, the date is removed. The format of the date is "dd MMM yyyy". | 10 DEC 2013 |
Example
http://powerfolder.example.com/api/organizations?action=changeValidTill&OID=Wni7DFkmdySELqBdsUs8&OSValidTill=10%20DEC%202010
Action: changeMaxUsers
This action changes the number of maximum users allowed on the organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be changeMaxUsers. | changeMaxUsers |
OID | Yes | This is the ID of the organization to change the maximum number of members allowed on the organization. | Wni7DFkmdySELqBdsUs8 |
maxUsers | Yes | The new number of maximum users allowed on the organization. | 293 |
Example
http://powerfolder.example.com/api/organizations?action=changeMaxUsers&OID=Wni7DFkmdySELqBdsUs8&maxUsers=103
Action: addAdmin
This call is available since PowerFolder Server version 11.0
This action allows an administrator or a user with OrganizationCreatePermission
and the specific OrganizationAdminPermission
of that Organization to add Administrators to the Organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be changeMaxUsers. | addAdmin |
OID | Yes | This is the ID of the organization to change the maximum number of members allowed on the organization. | Wni7DFkmdySELqBdsUs8 |
accountID | Yes | The ID of the account to grant the OrganizationAdminPermission | PME2myo2355sRegfgKk8m0YdA |
Example
http://powerfolder.example.com/api/organizations?action=addAdmin&OID=Wni7DFkmdySELqBdsUs8&accountID=PME2myo2355sRegfgKk8m0YdA
{ "message":"Granted permission OrganizationAdminPermission for account: john@example.org" }
Action: removeAdmin
This call is available since PowerFolder Server version 11.0
This action allows an administrator or a user with OrganizationCreatePermission
and the specific OrganizationAdminPermission
of that Organization to remove Administrators from the Organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be changeMaxUsers. | removeAdmin |
OID | Yes | This is the ID of the organization to change the maximum number of members allowed on the organization. | Wni7DFkmdySELqBdsUs8 |
accountID | Yes | The ID of the account to grant the OrganizationAdminPermission | PME2myo2355sRegfgKk8m0YdA |
Example
http://powerfolder.example.com/api/organizations?action=removeAdmin&OID=Wni7DFkmdySELqBdsUs8&accountID=PME2myo2355sRegfgKk8m0YdA
{ "message":"Revoked permission OrganizationAdminPermission for account: john@example.org" }
Action: addDomain
This call is available since PowerFolder Server version 11.3
This action allows a user with OrganizationCreatePermission
to add domains to an organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be addDomain | addDomain |
OID | Yes | The ID of the Organization | Wni7DFkmdySELqBdsUs8 |
domain | Yes | A domain to add to the specified organization. Can be used multiple times per call. | example.org |
Example
http://powerfolder.example.com/api/organizations?action=addDomain&OID=Wni7DFkmdySELqBdsUs8&domain=example.org&domain=sub.example.org
Action: removeDomain
This call is available since PowerFolder Server version 11.3
This action allows a user with OrganizationCreatePermission
to remove domains from an organization.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be addDomain | removeDomain |
OID | Yes | The ID of the Organization | Wni7DFkmdySELqBdsUs8 |
domain | Yes | A domain to add to the specified organization. Can be used multiple times per call. | example.org |
Example
http://powerfolder.example.com/api/organizations?action=removeDomain&OID=Wni7DFkmdySELqBdsUs8&domain=example.org&domain=sub.example.org
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 organization. To do so any HTTP parameter added to the call to this API endpoint except action and OID will be added to the custom data.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be setJSON. | setJSON |
OID | Yes | This is the ID of the organization. | Wni7DFkmdySELqBdsUs8 |
Example
http://powerfolder.example.com/api/organizations?action=setJSON&OID=Wni7DFkmdySELqBdsUs8&isBusiness=true&foo=bar
{ "information":{"isBusiness":"true", "foo":"bar"}, "OID":"Wni7DFkmdySELqBdsUs8", "message":"Added information to Organization" }
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 organization. To do so any HTTP parameter's key (name) added to the call to 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 organization. | Wni7DFkmdySELqBdsUs8 |
Example
http://powerfolder.example.com/api/organizations?action=removeJSON&OID=Wni7DFkmdySELqBdsUs8&isBusiness=
{ "information":{"foo":"bar"}, "OID":"Wni7DFkmdySELqBdsUs8", "message":"Removed information from Organization" }
Action: restrictToDomain
This call is available since PowerFolder Server version 11.3
This call allows you to restrict the members of an Organization to the defined set of domains.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be restrictToDomain | restrictToDomain |
OID | Yes | This is the ID of the organization. | Wni7DFkmdySELqBdsUs8 |
set | Yes | This contains the boolean value true or false | true |
Example
http://powerfolder.example.com/api/organizations?action=restrictToDomain&OID=Wni7DFkmdySELqBdsUs8&set=true
{ "message":"Set restrict to domain to true" }