NAV Navbar

API Summary

Cloudike Enterprise REST API allows you to access and use resources and features of Cloudike Enterprise Storage platform, such as creating, removing and restoring users, generating tokens and public links, sharing and unsharing files and folders, creating events and notifications, enabling and disabling accounts, etc. The base URL for all requests in this version of API is https://api.server.com/api/1 The API uses HTTPS protocol to ensure your data privacy. Unencrypted HTTP is not supported. Requests to the API are authorized by HTTP Basic Authentication. Use your account username and password to compute HTTP Authorization header. Parameters in examples (requests and responses) are packed using JSON with UTF-8 encoding and passed as HTTP body with Content-type: application/json. For JSON standard description please refer to RFC 7159. Date and time values should be formatted according to ISO 8601 standard, in UTC timezone.

API methods can be divided into 10 functional groups:

USER MANAGEMENT

admin/accounts_disable/

Disable user

URL: https://api.server.com/api/1/admin/accounts_disable/

Versions:0, 1

Method: POST

Params:

Returns:User data

admin/accounts_enable/

Enable user

URL: https://api.server.com/api/1/admin/accounts_enable/

Versions:1

Method: POST

Params:

Returns:User data

admin/accounts_unlock/

Unlock the user who was locked by multiple wrong password attempts.

URL: https://api.server.com/api/1/admin/accounts_unlock/

Versions:1

Method: POST

Params:

Returns:User data

admin/accounts_set_password/

Change user password.

URL: https://api.server.com/api/1/admin/accounts_set_password/

Versions:1

Method: POST

Params:

Returns:User data

admin/accounts_generate_login_key/

Generate a temporary login key which can be transferred to /accounts/login for login.

URL: https://api.server.com/api/0/admin/accounts_generate_login_key/

Versions:0

Method: POST

Params:

Returns:User ID, login key.

Example:

[
    1,
    "efe59c86aa5d412b9acb039b11cc490ef10b0e4afc35410d383db5e326a7e49d"
]

admin/accounts_find_users/

Returns a list of users according to set parameters (company or system admin access rights needed).

URL: https://api.server.com/api/1/admin/accounts_find_users/

Versions:1

Method: POST

Params:

Returns:Records count, records number limit, list of users, offset in a records list.

Example:

{
    "count": 1,
    "limit": 20,
    "users": [
        {
            "lang": "ru",
            "is_deleted": false,
            "userid": 1,
            "registration_date": 1376391468605,
            "is_active": true,
            "storage_size": 558426514,
            "hard_quota_size": 0,
            "quota_size": 0,
            "overhead_size": 0,
            "last_login": 1380870848821,
            "timezone": "Europe/Moscow",
            "deleted_date": 0,
            "role": "admin",
            "name": "Admin"
        }
    ],
    "offset": 0
}

admin/set_effective_userid/

Set an effective user_ID for a token.

URL: https://api.server.com/api/0/admin/set_effective_userid/

Versions:0

Method: POST

Params:

Returns:User data

admin/assign_role/

Assign a role to a new user.

URL: https://api.server.com/api/0/admin/assign_role/

Versions:0

Method: POST

Params:

Returns:User data

admin/accounts_delete/

Delete an account.

URL: https://api.server.com/api/0/admin/accounts_delete/

Versions:0

Method: POST

Params:

Returns:User data

admin/accounts_restore/

Restore a user account if it was partially removed.

URL: https://api.server.com/api/0/admin/accounts_restore/

Versions:0

Method: POST

Params:

Returns:User data

admin/invite_user/

Invite a new user

URL: https://api.server.com/api/0/admin/invite_user/

Versions:0

Method: POST

Params:

Returns:User data

company/<company id>/invite_user/

Send an invitation email.

URL: https://api.server.com/api/1/company/<company_id>/invite_user/

Versions:1

Method: POST

Params:

Returns:User data

company/<company id>/status/

Change or check company status (active or inactive).

URL: https://api.server.com/api/1/company/<company_id>/status/

Versions:1

Method: POST, GET

Params:

Returns:Company current status

Errors:

403 User has no rights to change the company's settings.

404 Company with the given ID not found.

admin/edit_user/

Edit user data.

URL: https://api.server.com/api/1/admin/edit_user/

Versions:1

Method: POST

Params:

Returns:User data

Errors:

404 User with the given ID not found.

admin/find_companies/

Returns a list of companies.

URL: https://api.server.com/api/1/admin/find_companies/

Versions:1

Method: GET, POST

Params:

Returns:

Errors:

403 User has no rights to view a list of companies.

company/<company id>/delete_card_info/

Delete card info.

URL: https://api.server.com/api/1/company/<company_id>/delete_card_info/

Versions:1

Method: POST, GET

Params:

Returns:

None

Errors:

404 Company with given ID not found

company/<company id>/remove/

Remove company.

URL: https://api.server.com/api/1/company/<company_id>/remove/

Versions:1

Method: POST, GET

Params:

Returns:
None

Errors:
403 User has no rights to view companies list
404 Company with given ID not found
400 Company cannot be deleted

company/<company id>/set_expired/

Set the company to “expired”.

URL: https://api.server.com/api/1/company/<company_id>/set_expired

Versions:1

Method: POST, GET

Params:

Returns:
None

Errors:
403 User has no rights to view companies list.
404 Company with given ID not found.
400 Can't set company to “expired”

admin/blocked_logins/

Get a list of locked logins

URL: https://api.server.com/api/1/admin/blocked_logins/

Versions:1

Method: POST, GET

Params:
None
Returns:
A list for blocked logins
Errors:
None

csv_download/

Send information in CSV format about companies or users to a designated email address.

URL: https://api.server.com/api/1/csv_download/

Versions:1

Method: GET

Params:
None
Returns:

Errors

None

company//request_quota/

Send request to company admin for higher quota

URL https://api.server.com/api/1/company//request_quota/

Versions: 1

Method: POST

Params: - user_id - User ID - company_id - Company ID

Returns:

or

company//request_quota/

Mark the quota request as viewed

URL https://api.server.com/api/1/company//request_quota/

Versions: 1

Method: POST

Params:

Returns:

admin/company//edit_user/

Changes a Company quota.

URL https://api.server.com/api/1/admin/company//edit_user/

Versions:1

Method: POST

Params:

Returns: - OK code (200)

or

admin/company//approve/

Allows system admin to approve a company's registration

URL https://api.server.com/api/1/admin/company//approve/

Versions: 1

Method: GET

Params:

Returns:

or (Company is not approved)

admin/company//deny/

Allows system admin to deny a company's registration

URL https://api.server.com/api/1/admin/company//deny/

Versions: 1

Method: POST

Params:

Returns:

or (Company is not denied)

moderators/add/

URL https://api.server.com/api/1/moderators/add/

Versions: 1

Method: POST

Params:

Returns:

or

moderators/get/

Get list of Moderators

URL https://api.server.com/api/1/moderators/get/

Versions: 1

Method: GET

Params:

None

Returns: - List of moderators

moderators/remove/

Remove Moderator

URL https://api.server.com/api/1/moderators/remove/

Versions: 1

Method: POST

Params:

Returns:

or

request_token/

Returns session token for Authorization

URL https://api.server.com/api/1/request_token/

Versions: 1

Method: GET

Params:

None

Returns:

Errors:

ANALYTICS

analytics/get_data/

Returns metrics data.

URL: /https://api.server.com/api/0/analytics/get_data/

Versions:0

Method: GET

Params:

Returns:
Metrics value.

Errors:
404 Key not found

Notes:

Admin rights are required.

Example

[
  {
      "region": "all",
      "period": "day",
      "name": "total_storage_size",
      "value": "2066956777",
      "time": 1384113600
  },
  {
      "region": "all",
      "period": "day",
      "name": "total_storage_size",
      "value": "2066958782",
      "time": 1384200000
  },
  {
      "region": "all",
      "period": "day",
      "name": "total_storage_size",
      "value": "2066958782",
      "time": 1384286400
  },
]


analytics/get_multiple_data/

Returns metrics data by a given list of metrics.

URL: https://api.server.com/api/0/analytics/get_multiple_data/

Versions:0

Method: POST

Params:
- date_from - Mandatory. The time interval in timestamp
- date_to - Mandatory. The time interval in timestamp
- metrics - Mandatory. Metric name

Returns:
A list of metrics values grouped by a metric name

Notes:

Admin rights are required.

Example

{
    "total_storage_size":
    [
        {
            "value": "2066956777",
            "time": 1384113600
        },
        {
            "value": "2066958782",
            "time": 1384200000
        }
    ],
    "files_added_count":
    [
        {
            "value": "2066958782",
            "time": 1384286400
        }
    ]
}

analytics/get_metrics/

Returns metrics list.

URL: https://api.server.com/api/0/analytics/get_metrics/

Versions:0

Method: GET

Returns:
Metrics list with parameters.

Notes:

Admin rights are required.


Example

{
    "avg_storage_size_all": {
        "only_current": true,
        "name": "avg_storage_size_all",
        "periods": [
            "day"
        ]
    },
    "files_added_count": {
        "only_current": false,
        "name": "files_added_count",
        "periods": [
            "day"
        ]
    },
    "uniq_users_all": {
        "only_current": false,
        "name": "uniq_users_all",
        "periods": [
            "day"
        ]
    },
    "avg_storage_size": {
        "only_current": true,
        "name": "avg_storage_size",
        "periods": [
            "day"
        ]
    },
    "total_files_count": {
        "only_current": true,
        "name": "total_files_count",
        "periods": [
            "day"
        ]
    },
    "uniq_users": {
        "only_current": false,
        "name": "uniq_users",
        "periods": [
            "day",
            "week",
            "month"
        ]
    },    
}

BACKGROUND TASKS

task/<taskid>/

Gets the result of performing a background task by the taskid obtained while setting a task for execution.

URL: https://api.server.com/api/1/task/<taskid>/

Versions:1

Method: GET

Params:

Returns:
Any JSON dictionary. The task adds resulted data to the dictionary after the task has been completed.

Errors:
404 The task is not found.
400 An error occurred while a background task was performed.

COPYRIGHT

Creates a complaint about unlicensed content. The method does not require authorization.

URL: https://api.server.com/api/0/copyright/make_complaint/

Versions:0

Method: POST

Params:

Returns:
Complaint created in JSON format.

Example

{
    "status": "new",
    "city": "NN",
    "fax": "+79260121212",
    "description": "stolen movie",
    "created": "2014-03-12T19:41:34.733818",
    "url": [
        "http://web-dev.mountbit.com/public/xWKEMAg/",
        "http://p.mountbit.com/AclB9Ag/"
    ],
    "country": "Russia",
    "region": "NN",
    "phone": "+79260121212",
    "complaint_id": 1,
    "copyright_holder": "qwerty inc(c)",
    "postcode": 123456,
    "content_type": "Video",
    "address": "lenina str",
    "position": "manager",
    "email": "root@root.com",
    "name": "user"
}

Returns a list of complaints, the method requires administrator rights during authorization.

URL: https://api.server.com/api/0/copyright/get_complaints/

Versions:0

Method: POST

Params:

Returns:
A list of complaints

Example

{
    "complaints": [
        {
            "status": "new",
            "city": "NN",
            "fax": "+79260121212",
            "description": "stolen movie",
            "created": "2014-03-12T19:58:48.326000",
            "url": [
                "http://web-dev.mountbit.com/public/Xy15aAg/",
                "http://p.mountbit.com/0560bAg/"
            ],
            "country": "Russia",
            "region": "NN",
            "phone": "+79260121212",
            "complaint_id": 1,
            "copyright_holder": "qwerty inc(c)",
            "postcode": 123456,
            "content_type": "Video",
            "address": "lenina str",
            "position": "manager",
            "email": "root@root.com",
            "name": "user"
        },
        {
            "status": "new",
            "city": "NN",
            "fax": "+79260232323",
            "description": "stolen movie",
            "created": "2014-03-12T19:58:48.326000",
            "url": [
                "http://web-dev.mountbit.com/public/REdXwAg/"
            ],
            "country": "Russia",
            "region": "NN",
            "phone": "+79260232323",
            "complaint_id": 2,
            "copyright_holder": "zxcvbn inc(c)",
            "postcode": 123456,
            "content_type": "Audio",
            "address": "lenina str",
            "position": "manager",
            "email": "root1@root.com",
            "name": "user"
        }
    ],
    "count": 2,
    "limit": 2000,
    "offset": 0
}

Edit the status of complaints; the method requires administrator rights during authorization

URL: https://api.server.com/api/0/copyright/edit_complaint/

Versions:0

Method: POST

Params:

Errors:
404 Complaint not found

EVENTS

events/

Returns a list of user events sorted by time in descending order

URL: https://api.server.com/api/0/events/

Versions:0

Method: GET

Params:

Returns:

Event array

Values description:

Event types:

  1. Folder events:
  1. File events:

-file_created - File creation event.
- file_deleted - File delete event.
- file_undeleted - File recovery event.
- file_new_content - File new version creation event.
- file_version_restored - File restore event.
- file_renamed - File rename event.
- file_moved - The event of moving a file from one directory to another.

Example

[
    {
        "user_id": 1,
        "deleted": false,
        "timestamp": 1339568818575,
        "init_event_user_name": "Valentin",
        "content": {
            "created": 1339568817601,
            "modified": 1339568818567,
            "size": 5503
        },
        "version": 2,
        "path": "/src/web.c",
        "type": "file_created",
        "init_event_user_id": 1
    },
    {
        "user_id": 1,
        "deleted": true,
        "timestamp": 1339568818576,
        "init_event_user_name": "Valentin",
        "content": {
            "created": 1339568817605,
            "modified": 1339568818564,
            "size": 55
        },
        "version": 2,
        "path": "/src/file.ext",
        "type": "file_deleted",
        "init_event_user_id": 1
    },
    {
        "user_id": 1,
        "deleted": true,
        "timestamp": 1339568818576,
        "init_event_user_name": "Valentin",
        "content": {
            "created": 1339568817605,
            "modified": 1339568818564,
            "size": 55
        },
        "version": 2,
        "path": "/dst/file1.ext",
        "oldpath": "/src/file1.ext",
        "old": {
            "content": {
                "created": 1339568817605,
                "modified": 1339568818560,
                "size": 55
            },
            "version": 1
        },
        "type": "file_moved",
        "init_event_user_id": 1
    }
]

check_ws/

A Web socket URL functional test.

URL: https://api.server.com/api/0/check_ws/

Versions:0

Method: GET, POST

Params:None

Returns:Success or not

Errors:None

EXTRADATA

files/create_extra/

The method forcibly creates extra data for the specified file. Creation can occur either in real time or with delay through the queue and depends on the settings of the plugins that are responsible for creating extra data of a certain type.
Theoretically, if there are several types of extra data for one file, then they will all be created as a result of this API method. That is, you cannot select any particular plugins to create extra data.
At the same time, it is worth mentioning that this situation, when several extra data plugins correspond to one file, does not seem real yet. If extra data already exists for some file, then they will be recreated as a result of this method.

URL: https://api.server.com/api/0/files/create_extra/

Versions:0

Method: POST

Params:

Returns:

started: The value is True if extra data is queued for creation (depends on plugins) and False - if no task has been set.

Errors:
404 The file at the specified path was not found, or a nonexistent version was specified.

files/get_preview/

Get a preview file

URL: https://api.server.com/api/0/files/get_preview/

Versions:0

Method: GET

Params:

Returns:
Preview file.

Errors:
404 The file at the specified path was not found, or a nonexistent version was specified.

Get a preview file

URL: https://api.server.com/api/1/links/get_preview/

Versions:1

Method: GET

Params:

Returns:
Preview file.

Errors:

404 The file at the specified path was not found, or a nonexistent version was specified.

shares/get_preview/

Get a preview file

URL: https://api.server.com/api/1/shares/get_preview/

Versions:1

Method: GET

Params:

Returns:
Preview file.

Errors:

404 The file at the specified path was not found, or a nonexistent version was specified.

Forcibly creates extra data for the specified file. The method is similar to the API / files / create_extra, but only for public files.

URL: https://api.server.com/api/0/links/create_extra

Versions:0

Method: POST

Params:

Returns:

started: The value is Trueif extra data is queued for creation (depends on plugins), False - if no task has been set.

Errors:

404 Node not found. The possible reasons: path is incorrectly set, the node has ceased to be published, or has been deleted.

shares/create_extra/

Forcibly creates extra data for the specified file. Creation can occur either in real time or with delay through the queue and depends on the settings of the plugins that are responsible for creating extra data of a certain type.
Theoretically, if there are several types of extra data for one file, then they will all be created as a result of this API method. That is, you cannot select any particular plugins that will create extra data.
At the same time, it is worth mentioning that this situation, when several extra data plugins correspond to one file, does not seem real yet. If extra data already exists for some file, then as a result of this method they will be recreated.

URL: https://api.server.com/api/1/shares/create_extra/

Versions:1

Method: POST

Headers:MountbitAuth - user authorization token. If the shared folder is public, then this parameter is not Mandatory.

Params:

Returns:

started: The*Truevalue - if extra data is queued for creation (depends on plugins), **False* - if no task has been set.

Errors:
403 Insufficient rights to access a shared folder;
404 Folder or file not found.

GROUPS (GROUP MANAGEMENT)

groups/create/

Create a new group (company admin access rights are required).

URL: https://api.server.com/api/1/groups/create/

Versions:1

Method: POST

Params:

Returns:
200 A group created
403 A group already exists
404 Company not found

groups/delete/

Delete the group by name and company (company admin access rights are required).

URL: https://api.server.com/api/1/groups/delete/

Versions:1

Method: POST

Params:
- name - The name of a group

Returns:
200 group deleted
404 CompanyNotFound - company not found
404 GroupNotFound - group not found

groups/list/

Show a list of company groups.

URL: https://api.server.com/api/1/groups/list/

Versions:1

Method: POST, GET

Params:

Returns:
groups - companies groups list, each record is as follows:
- group_id - group's identifier
- name - The name of a group
- company_id - companies identifier
- members_count - count of group members
limit - list limit
offset - list offset
count - all groups count

Errors:
404 CompanyNotFound - company not found

Example

{
    "count": 10,
    "limit": 2,
    "offset": 0,
    "groups": [
        {
            "group_id": "1",
            "name": "blood group",
            "company_id": 2,
            "members_count": 3,
        },{
            "group_id": "2",
            "name": "my group",
            "company_id": 2,
            "members_count": 1,
        }
    ]
}

groups/<group_id>/change/

Change group settings (company admin access rights needed).

URL: https://api.server.com/api/1/groups/<group_id>/change/

Versions:1

Method: POST

Params:

Returns:

Errors:
403 User has no rights to change group settings.
403 GroupAlreadyExists - group already exists
404 GroupNotFound - Group with the given ID not found.

Example

{
    "group_id": "2",
    "name": "my group",
    "company_id": 2,
    "members_count": 11,
}

groups/<group_id>/add_user/

Add a user into a group.

URL: https://api.server.com/api/1/groups/<group_id>/add_user/

Versions:1

Method: POST

Params:

Returns:

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

Example

[
    {"userid": 1, "status": "added"},
    {"userid": 2, "status": "added"},
    {"userid": 3, "status": "error", "code": 403, "message": "User not found"}
]

groups/<group_id>/remove_user/

Remove a user from a group.

URL: https://api.server.com/api/1/groups/<group_id>/remove_user/

Versions:1

Method: POST

Params:

Returns:

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

groups/<group_id>/users/

Show a list of group members.

URL: https://api.server.com/api/1/groups/<group_id>/users/

Versions:1

Method: POST, GET

Params:

Returns:

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

groups/<group_id>/change_can_print

Change the group's option “can_print”.

URL: https://api.server.com/api/1/groups/<group_id>/change_can_print

Versions:1

Method: POST

Params:

Returns:
Group public information.

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

groups/<group_id>/change_can_download

Change the group's option “can_download”.

URL: https://api.server.com/api/1/groups/<group_id>/change_can_download

Versions:1

Method: POST

Params:

Returns:
Group public information

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

groups/<group_id>/change_pc_can_download

Change the group's option “pc_can_download”.

URL: https://api.server.com/api/1/groups/<group_id>/change_pc_can_download

Versions:1

Method: POST

Params:

Returns:
Group public information

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

groups/<group_id>/change_use_watermarks

Change the group's option “use_watermarks”.

URL: https://api.server.com/api/1/groups/<group_id>/change_use_watermarks

Versions:1

Method: POST

Params:

Returns:
Group public information

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

groups/<group_id>/change_mobile_restriction

Change the group's option “user_mobile_restriction”.

URL: https://api.server.com/api/1/groups/<group_id>/change_mobile_restriction

Versions:1

Method: POST

Params:

Returns:
Group public information.

Errors:
403 GroupForbidden - group in another company
404 GroupNotFound - group not found

KEY VALUE

keyvalue/<key_name>

Return/set a value of the specified key.

URL: https://api.server.com/api/0/keyvalue/<key_name>

Versions:0

Method: GET, POST

Params:

Returns:
The key value for the GET request.

Errors:
404 Key not found

GET result example:

{
    "key": "some_key",
    "value": [1, 2, "string"]
}

POST result example:

{
    "key": "some_key",
    "changed": true
}

KUKUDOCS

kukudocs/view/

Get preview file for user.

URL: https://api.server.com/api/1/kukudocs/view/

Versions:1

Method: POST

Params:

Returns:
url - preview URL for the file.

Errors:
404 UserNotFound, FileNotFound, CompanyNotFound
500 InternalError - kukudocs converting failed.

Get preview file for link.

URL: https://api.server.com/api/1/kukudocs/link/view/

Versions:1

Method: POST

Params:

Returns:
URL - preview URL for the file.

Errors:
404 UserNotFound, FileNotFound, CompanyNotFound
500 InternalError - kukudocs converting failed.

MSOFFICE

wopi/view/

Get MS preview URL.

URL: https://api.server.com/api/1/wopi/view/

Versions:1

Method: POST

Params:

Example

{
    "url": "https://example.com/something",
}

Get MS preview URL.

URL: https://api.server.com/api/1/wopi/link/view/

Versions:1

Method: POST

Params:

Example

{
    "url": "https://example.com/something",
}

wopi/edit/

Get MS edit URL.

URL: https://api.server.com/api/1/wopi/edit/

Versions:1

Method: POST

Params:

Example

{
    "url": "https://example.com/something",
}

wopi/files/<file_id>

Wopi files.

URL: https://api.server.com/api/1/wopi/files/(file_id)

Versions:1

Method: GET, POST

Params:

wopi/files/<file_id>/contents

Wopi files contents.

URL: https://api.server.com/api/1/wopi/files/(file_id)/contents

Versions:1

Method: GET, POST

Params:

NOTICES

notices/

Returns a list of notification events for the user, sorted by time in descending order.

URL: https://api.server.com/api/0/notices/

Versions:0

Method: GET

Params:

Returns:
An array of notifications.

Example

[
  {
    "status": "accepted",
    "hash": "a4d7e0dc51baf3c9d43417fc09059eae",
    "timestamp": 1339072903641,
    "init_notice_user_name": "maxim",
    "path": "/My Folder",
    "init_notice_user_id": 20,
    "user_id": 1,
    "modified": 1339075676379,
    "behavior": "interactive",
    "text": "My Folder",
    "action": "share_invitation_sent",
    "type": "personal"
  }
]

SOFT

soft/get_version/

Returns the current version of the client application for the specified platform.

URL: https://api.server.com/api/0/soft/get_version/

Versions:0

Method: GET

Params:

Returns:
An object that describes the current version of the application for a given platform.

Errors:
403 A version is requested for a non-existent platform.

Example

{
    "version": {
        "link": "http://qwe.ru/qe.exe",
        "platform": "windows",
        "version": "123",
        "critical": true,
        "description": "New version 123"
    }
}

soft/set_version/

Installs a new version or updates the current version of the client application for the specified platform. (Admin rights are required).

URL: https://api.server.com/api/0/soft/set_version/

Versions:0

Method: GET

Params:

Returns:
An object that describes the current version of the application for a given platform.

Example

{
    "link": "http://qwe.ru/qe.exe",
    "platform": "windows",
    "version": "123",
    "critical": true,
    "description": "New version 123",
    "competition": 0
}

soft/list_version/

Returns a list of versions for all platforms or for one specific platform.

URL: https://api.server.com/api/0/soft/list_version/

Versions:0

Method: GET

Params:

Returns:
A list of versions sorted in order from the most recent versions to the older ones (i.e., by the time they were added).

soft/get_update/

Returns currently available update.

URL: https://api.server.com/api/0/soft/get_update/

Versions:0

Method: GET

Params:

Returns:

Describes the currently available update for a given platform.

Format Object:

{ version number: download link }

Errors:
403 An update for a non-existent platform is requested.

Example

{
    "1.0": "http://updates.server.com/ver1.0.zip"
}

soft/set_update/

Installs a new update for the specified platform. (Admin rights are required).

URL: https://api.server.com/api/0/soft/set_update/

Versions:0

Method: GET

Params:

Returns:
An object that describes the current update version for a given platform.

Example

{
    'link_base': 'http://aaa.com/',
    'competition': 10,
    'version_exp': '2',
    'version_base': '1',
    'platform': 'windows',
    'link_exp': 'http://bbb.com/'
}

soft/list_updates/

Returns a list of updates for all platforms or for one specific platform (Admin rights are required).

URL: https://api.server.com/api/0/soft/list_updates/

Versions:0

Method: GET

Params:

Returns:
A list of updates

STORAGE MANAGEMENT

fileops/folder_create

Create a new folder.

URL: https://api.server.com/api/1/fileops/folder_create

Versions:1

Method: POST

Params:

Returns:
Metadata for the new folder. See / metadata.

Errors:
403 A folder at the specified path already exists.

fileops/folder_info/

Calculate folder size and the number of items.

URL: https://api.server.com/api/1/fileops/folder_info/

Versions:1

Method: GET

Params:

Returns:

Errors:
400 InvalidParameters. the value of 'path' is not the folder path.
404 NotFound. Folder not found.

fileops/precheck/

Pre-check the path whether the folders_or_files_move/copy or create_files is available or not, so the user can choose the overwrite options.

URL: https://api.server.com/api/1/fileops/precheck/

Versions:1

Method: GET

Params:

Returns:
- "exists": True / False - whether folder/file already exists in the to_path directory or not.
- "over_writable": True / False - if a portable folder or file already exists in the to_path directory, and from_path or to_path directory is related to a shared folder, it returns False. otherwise True.
- "copyable": True / False - if user's storage quota size is exceeded, it returns False, if not - True.

Errors:
405 The path to which the transfer takes place is not a directory.
409 Attempt to transfer to the same directory.
412 FileOrFolderMoveMountPointToAnother. Attempt initiated by the collaborator to transfer the root spherical folder to the share from another user or to the spread created by the collaborator for other users (namely the root spherical folder, because the root spherical folders represent a kind of mount point, the transfer of which is contrary to logic and common meaning)
424 An attempt to transfer a directory to a subdirectory below the tree. This portable directory is the parent of a relatively new directory where the transfer is performed. Cannot transfer parent node to descendant node

fileops/move/

Move a specific file or folder to a new directory. At the same time, file versions are not moved as relative versions, the operation looks like creating files in a new location and deleting the old ones.

URL: https://api.server.com/api/1/fileops/move/

Versions:1

Method: POST

Params:

Returns:

Data about the moved object (with the updated path).

Errors:
400 One of the required parameters is not specified.
403 If the overwrite parameter is set to False, and a portable folder or file already exists in the to_path directory.
404 Either the path to be moved was not found, or the directory to which to move was not found.
405 The path to which the transfer takes place is not a directory.
409 Attempt to transfer to the same directory.
412 FileOrFolderMoveMountPointToAnother. Attempt initiated by the collaborator to transfer the root spherical folder to the share from another user or to the spread created by the collaborator for other users (namely the root spherical folder, because the root spherical folders represent a kind of mount point, the transfer of which is contrary to logic and common meaning)
412 FileOrFolderOverwriteMountPointToAnother. Attempt to overwrite shared folder with folder or overwrite folder with shared folder.
424 An attempt to transfer a directory to a subdirectory below the tree. This portable directory is the parent of a relatively new directory where the transfer is performed. Cannot transfer parent node to descendant node
501 Unrealized functionality.

Notes:

It should be borne in mind that if the path "which is portable" can be both a file and a directory, then the path "where we can transfer" can only be a directory. There are a number of collisions that should be kept in mind when using this API method.

It should also be noted that 3 types of events are typical for the API-method of movement: 1. moved, 2. created (if the source folder is not available to the collaborator) and 3. deleted (if the destination folder is not available to the collaborator).

fileops/copy/

Copies a selected file or folder to a new or the same directory. In this case, the versions of the copied files are not copied.

URL: https://api.server.com/api/1/fileops/copy/

Versions:1

Method: POST

Params:

Returns:
Data about a new file or a folder

Errors:
400 One of the required parameters is not specified.
403 If the overwrite parameter is set to False, and a portable folder or file already exists in the to_path directory.
404 Either the path to be moved was not found, or the directory to which to move was not found.
405 The path to which the transfer takes place is not a directory.
424 An attempt to transfer a directory to a subdirectory below the tree. This portable directory is the parent of a relatively new directory where the transfer is performed. Cannot transfer parent node to descendant node

Notes:

If, when copying a file or directory (for example, / a / b / c / something), it is found that an object with a similar name (ie something) already exists in the "where to copy" directory, then the new object will be called something (1 ) and lie on the same level with the existing something object. It should be borne in mind that in the case of a similar situation on the desktop client, the operating system usually suggests combining or replacing files. Since something similar is quite problematic to implement in this API method, it is assumed that in case of such collisions the desktop client will call not this method, but other substitute methods, for example, / files / create (overwriting the file in a "new" place ). The operation generates only events such as "file creation" or "folder creation".

metadata/<path>

Return file or folder metadata.

URL: https://api.server.com/api/1/metadata/<path>

Versions:1

Method: GET

Params:

Returns:

Metadata for a file or a folder, depending on what the parameter path indicates. If it is a path to the folder and the list parameter is set to True, the metadata contains this folder listing as well as metadata for each object on the listing. Besides, the header ETag contains the object hash. This hash can be used for a cache on the client side when sending it to the server in the If-None-Match header. If the object on the server has not changed, the answer will contain an empty message with 304 code.

Description of returned values:

Errors:
304 The content of the folder has not changed since the last request (determined by the If-None-Match header).
404 File or Folder not found.

Example

.. code-block:: json

    {
        "size" : "123.4KB",
        "bytes" : 126362,
        "checksum": "0123456789ABCDEF0123456789ABCDEF",
        "version" : 1,
        "modified" : 1234567890,
        "path" : "/files/somefile.txt",
        "icon" : "text",
        "mime_type" : "text/plain",
        "thumbnail" : false,
        "folder" : false,
        "deleted" : false,
        "version": 2,
        "client_data": {
          "created": 1373663664,
          "modified": 1373663665
        }
    }

metadata_full_listing/

Creates a task and returns a URL to download the file system tree.

URL: https://api.server.com/api/1/metadata_full_listing/

Versions:1

Method: GET

Params:

Returns:

Errors:
404 Incorrect query ID. Or the query data are not ready yet. If the task has been started, the answer text will contain the info about its progress.

{ "progress": 56 }

Note:

After the task to create the file tree list is completed on the server, the client receives a notification about it. The notification type is metadata_full_listing and looks as follows.

.. code-block:: json { "owner_name": "dmitry2@dmitry.com", "deleted": false, "timestamp": 1386074918397, "path": "", "id": "529dd326eae19d648bd65771", "init_event_user_id": 11, "user_id": 11, "init_event_user_name": "dmitry2@dmitry.com", "request_id": "", "listing_request_id": "7d88cf5e", "type": "metadata_full_listing", "owner_id": 11 }

Important: The field listing_request_id should coincide with the previous identifier listing_request_id received from the API /metadata_full_listing/. After that, the client has to make a query to the API method /metadata_full_listing/ to receive the URL to the file tree listing.

Example

{
    "url" : "<direct URL to JSON with listing>",
}

files/download_as_archive/

Collects folders and files into an archive. The duration of the operation depends on the number of added files, therefore it is necessary to periodically interrogate API on the fact of the result.
Task readiness must be requested at <https://api.server.com/api/1/task/<taskid>/>

URL: https://api.server.com/api/1/files/download_as_archive/

Versions:0,1

Method: GET

Params:

Returns:
Task ID.

Errors:
403 Access to files is restricted.

Example

{
    "taskid": "c10ad5ba1573d24d473a520ad4d5dfececa466b6a78cbbb2c54ad5fd83aa43e7d97b5f3d3e6d989aa39a728e1d0f7347068c92f6d055fa54becd4d3cd71782de"
}

Response from https://api.server.com/api/0/task/<taskid>/ :

{ 'url': '' }

files/download_as_archive_stream/

Create private (current user) link folders and files for download.

URL: https://api.server.com/api/1/files/download_as_archive_stream/

Versions:0,1

Method: POST

Parameters:

Returns:

{ "url": "", "file_name":, "expired": ISOFORMAT datetime (UTC default), }

files/progress_download_streams/<private_hash>

Check progress of currently downloaded streams.

URL: https://api.server.com/api/1/files/progress_download_streams/<private_hash>

Versions:0,1

Method: GET

Returns:

{ 'private_hash': string, 'progress': <0.0-100.0>, # in percents 'status': <'created' | 'in_progress' | 'completed' | 'error'>, 'label': string with info about stream, 'modified': string ISOFORMAT of modified 'created': string ISOFORMAT of modified }

or list sorted by field 'created'

[ { 'private_hash': string, 'progress': <0.0-100.0>, # in percents 'status': <'created' | 'in_progress' | 'completed' | 'error'>, 'label': string with info about stream, 'modified': string ISOFORMAT of modified 'created': string ISOFORMAT of modified },.. ]

files/download_as_archive_stream/

Create a zip stream of archived folders and files.

URL: https://api.server.com/api/1/files/download_as_archive_stream/

Versions:0,1

Method: GET

Parameters:

Returns:
Stream Http Response for zip file. Attachment has name '<folder>_<datetime with tz>.zip'

Download the entire published folder in one archive, or individual items selected in it. The duration of the operation depends on the number of added files, therefore it is necessary to periodically interrogate API on the fact of the result.
Task readiness must be requested at https://api.server.com/api/0/task/<taskid>/

URL: https://api.server.com/api/1/links/download_as_archive/<hash>/

Versions:0,1

Method: GET

Params:

Returns:
Task ID

Errors:
403 Link blocked due to complaint about non-licensed content

Example

{
    "taskid":
    "c10ad5ba1573d24d473a520ad4d5dfececa466b6a78cbbb2c54ad5fd83aa43e7d97b5f3d3e6d989aa39a728e1d0f7347068c92f6d055fa54becd4d3cd71782de"
}

Example response from
[https://api.server.com/api/0/task/\<taskid\>/](https://api.server.com/api/0/task/%3Ctaskid%3E/%3E)
:

        {
            'url': 'some address'
        }

Download the whole shared folder or some selected items as an archive zip in a stream.

URL: https://api.server.com/api/1/links/download_as_archive_stream/<hash>/

Versions:0,1

Method: GET

Parameters:

Returns:
Zip Archive

Errors:
403 A link was blocked due to a copyright violation complaint.

Add a published folder or file to its storage. The duration of the operation depends on the number of added files, therefore it is necessary to periodically interrogate API on the fact of the result.
Task readiness must be requested at https://api.server.com/api/0/task/<taskid>/

URL: https://api.server.com/api/1/links/add_to_storage/<hash>/

Versions:0,1

Method: GET

Params:

Returns:
Task ID.

Errors:
402 There is not enough space to move the object.
403 Link blocked due to a complaint about a non-licensed content

Example

{
    "taskid":
    "c10ad5ba1573d24d473a520ad4d5dfececa466b6a78cbbb2c54ad5fd83aa43e7d97b5f3d3e6d989aa39a728e1d0f7347068c92f6d055fa54becd4d3cd71782de"
}

Example response from
https://api.server.com/api/0/task/\<taskid\>/


{
    "folder_name": "/пингвины",
    "files_count": 185,
    "size": 8014617 
}


files/create/

Returns the parameters necessary for uploading the file to the server.

URL: https://api.server.com/api/1/files/create/

Versions:1

Method: POST

Params:

Returns:

If deduplication works, the method returns the same as the / metadata / <path> method.

Errors:
201 The file was created as a result of deduplication, i.e. a file with the same size and checksum was already on the server. The response body will be the same as the / metadata / <path> method returns..
400 Invalid version of the file.
403 An attempt to write to a remote folder or the file version does not match when overwriting it.
404 An attempt was made to write to a missing folder if the create_dirs flag is False.
409 A file name conflict with an existing object if overwrite is False.

files/create_part/

Returns the parameters necessary for uploading file parts to the server when using multipart upload.

URL: https://api.server.com/api/1/files/create_part/

Versions:0,1

Method: POST

Params:

Returns:

Errors:
404 The specified temp_path does not exist, probably multipart upload was not initiated using the / files / create / method

files/confirm/<path>

Confirms a successful file upload to S3.

URL: https://api.server.com/api/1/files/confirm/<path>

Versions:1

Method: POST

Params:

Returns:
Metadata for the uploaded file. See / metadata.

Errors:
403 Invalid file version.
404 The specified file not found.
409 The object (a folder or a file) already exists at the requested path, but only if the overwrite parameter is set to False.

files/multi_confirm/

The asynchronous API method for confirmation of a successful upload of multiple files to storage.

URL: https://api.server.com/api/1/files/multi_confirm/

Versions:1

Method: POST

Parameters:

Returns:
Task identificator:

.. code-block:: js

{ "taskid": "c10ad5ba1573d24d473a520ad4d5dfececa466b6a78cbbb2c54ad5fd83aa43e7d97b5f3d3e6d989aa39a728e1d0f7347068c92f6d055fa54becd4d3cd71782de" }

files/get/<path>

Returns the parameters to get the contents of the file.

URL: https://api.server.com/api/1/files/get/<path>

Versions:1

Method: GET

Params:

Returns:
An object containing information about the downloaded file.

Errors:
404 File not found
403 Access to files is restricted

Example

{
    "url" : "direct URL file on S3",
    "path" : "/folder/filename.ext",
    "deleted" : false,
    "method" : "GET",
    "version": 2,
    "size": 100500,
    "checksum": "<md5 for contents of file or null>",
    "created": 1234534545,
    "modified": 1678903454,
    "client_data": {}
}

files/favorites/

Returns the files set as favorites by the user.

URL: https://api.server.com/api/1/files/favorites/

Versions:1

Method: GET

Returns:
Metadata of files marked as favorites. Returns as a list.

fileops/set_favorite/

Changes the file or folder’s favorite status

URL: https://api.server.com/api/1/fileops/set_favorite/

Versions:1

Method: POST

Params:

Returns:
Metadata of the changed object

fileops/purge/

Cleans up deleted files and file versions.

URL: https://api.server.com/api/1/fileops/purge/

Versions:1

Method: POST

Params:
no params

Returns:
200 If the operation to clean up deleted files and their versions has been queued.

fileops/purgestatus/

Returns the status of the task to clean user files.

URL: https://api.server.com/api/1/fileops/purgestatus/

Versions:0,1

Method: POST

Returns:
The status of the task to clean user files.

Example

{
    "status": "PROCESSING"
}

files/versions/<path>

Returns the file versions list. The versions are sorted recursively from the creation date, the first version is the current one.

URL: https://api.server.com/api/1/files/versions/<path>

Versions:1

Method: GET

Params:

Returns:
An array of objects describing the version of the file.

Errors:
404 The specified file was not found.

Example

[
    {
        "id": "4f763d57291f40102c0000ba"
        "content": {
            "size": 129024
        },
        "version": 1,
        "type": "from_diff",
        "timestamp": 1339663686.485451,

        "restored_timestamp": 1339663824.485451
    }
]

The parameter restored_timestamp # The Unix timestamp for the restored file version is the UTC (timestamp) of the file version that has been restored.

files/versions_to_update/

Returns a list of file versions sorted in ascending order to update the file on the client to the latest version.

URL: https://api.server.com/api/1/files/versions_to_update/

Versions:0,1

Method: GET

Params:

Returns:
An array of objects describing the version of the file.

Errors:
404 The specified file could not be found.

Example

[
    {
        "content": {
            "size": 129024
        },
        "diff": {
            "size": 67649
        },
        "version": 1,
        "type": "from_diff",
        "id": "4f763d57291f40102c0000ba"
    }
]

Each element of this array is a certain version of the file.

files/restore/

Restores the specified version of the file, a new file version appears.

URL: https://api.server.com/api/1/files/restore/

Versions:1

Method: POST

Params:

Returns:
The file metadata with the restored version file.

Errors:
404 The specified file or version was not found.

fileops/delete/

Delete a file or a folder.

URL: https://api.server.com/api/1/fileops/delete/

Versions:1

Method: POST

Params:

Returns:
Remote folder metadata. See / metadata.

Errors:
403 The user is not allowed to delete this folder or it is not empty if the only_empty parameter is true.
404 The specified folder was not found.

fileops/multi/delete/

Delete several files or folders.

URL: https://api.server.com/api/1/fileops/multi/delete/

Versions:1

Method: POST

Params:

Returns:
List of metadata of deleted folders or files. See / metadata.

Errors:
403 The user is not allowed to delete this folder or it is not empty if the only_empty parameter is true.
404 The specified folder was not found.

Example

{"success":10,
  "failed": 2,
  "nodes": [{
    "path" : "/files/somefile1.txt",
    "icon" : "text",
    ...
    "error_code": null
  },{
    "path" : "/files/somefile2.txt",
    "icon" : "text",
    ...
    "error_code": null
  },...,{
    "path" : "/files/somefile3.txt",
    "error_code": 404
  }]}

fileops/undelete/

Restore a deleted file or folder.

URL: https://api.server.com/api/1/fileops/undelete/

Versions:1

Method: POST

Params:

Returns:
Metadata of the restored folder. See / metadata.

Errors:
403 The user is forbidden to restore this file or folder (because it is not deleted, or is part of some deleted parent object, i.e. for example, you cannot restore a previously deleted file from a folder that was deleted later than this file).
404 The specified folder was not found.

fileops/multi/undelete/

Restore several deleted files or folders.

URL: https://api.server.com/api/1/fileops/multi/undelete/

Versions:1

Method: POST

Params:

Returns:
They are specified for each path in the field error_code in the answer text.

Errors:Are indicated in the field error_code for each file/folder in the answer text.
403: A user is not allowed to restore the file or the folder (the folder was not deleted or it is a part of some deleted parent object.) For example, it is impossible to restore a file deleted from a folder that was deleted later than this file.
404: The specified folder is not found.

Example

{
  "success":10,
  "failed": 2,
  "nodes": [{
    "path" : "/files/somefile1.txt",
    "icon" : "text",
    ...
    "error_code": null
  },{
    "path" : "/files/somefile2.txt",
    "icon" : "text",
    ...
    "error_code": null
  },...,{
    "path" : "/files/somefile3.txt",
    "error_code": 404
  }]
}

fileops/rename/

Rename a file or a folder.

URL: https://api.server.com/api/1/fileops/rename/

Versions:1

Method: POST

Params:

Returns:
Metadata of the renamed object. See / metadata.

Errors:
404 The specified file or folder was not found.

Note:

Renaming a file or folder occurs as follows: a folder (or file) with the former name is deleted, and a file or folder with a new name is created.

shares/add/

Sends an invitation to a shared folder to another user. If a collaborator with such member_email does not exist, the system creates a new inactive user with the given email and sends a message to this email notifying that some user shared a folder and a new user has to register to get access to this folder. The message contains a link with the invite hash. Using this invite hash (the method /accounts/create) a user can register without having to confirm the registration by email. When the user follows the link, the user automatically agrees to get access to the shared folder.

URL: https://api.server.com/api/1/shares/add/

Versions:1

Method: POST

Parameters:

Returns:

A unique token of an invitation to a shared folder.

Errors:
403 The folder cannot be shared.
404 The folder not found
409 The user is trying to share the folder to himself.
424 Attempting to share a folder that contains the root shared folder from another user among its descendants down the tree (you must prohibit sharing such folders, because there could be a vulnerability, for example, user A shared the folder to user B, and that in turn moved the corresponding root shared folder inside its file tree, and shared its own top-level folder to user C. Thus, without the knowledge of user A, user C can have access to the files and folders of user A.

Note:

If the folder has already been shared with the collaborator, 200 OK is returned with an empty response body.


Example

{
    "hash" : "ee977806d7286510da8b9a7492ba58e2484c0ecc"
}

shares/remove/

Remove a user from a shared folder.

URL: https://api.server.com/api/1/shares/remove/

Versions:1

Method: POST

Params:

Returns:
200 If the user has been deleted from the shared folder.

Errors:
403 If the user is not a collaborator of the folder.
404 If the folder is not found.

shares/accept/

Accepts an invitation to the shared folder. The user has a new folder in the root. If the collaborator already has a folder with that name, then a serial number will be added to the new folder. The maximum number is 10.
The collaborator can rename his folder and this does not affect the folder name of other collaborators.

URL: https://api.server.com/api/1/shares/accept/

Versions:1

Method: POST

Params:

Returns:
200 If the folder has been shared

Errors:
403 The hash does not indicate a folder shared with this user.

shares/decline/

Decline an invitation to a shared folder.

URL: https://api.server.com/api/1/shares/decline/

Versions:0,1

Method: POST

Params:

Returns:
200 If the invitation was declined successfully.

Errors:
403 The hash does not indicate a folder shared with this user.

shares/uninvite/

Takes back an invitation to share a folder from a collaborator or a group. If you specify the group,
the parameter member_login will be ignored.

URL: https://api.server.com/api/1/shares/uninvite/

Versions:1

Method: POST

Parameters:

Returns:
200 If the invitation was taken back successfully.

Errors:
403 If the invitation cannot be taken back (for example, it has already been accepted).

shares/unshare/

Cancels access to a folder and deletes all collaborators. The folder disappears in all collaborator's accounts.

URL: https://api.server.com/api/1/shares/unshare/

Versions:0,1

Method: POST

Params:

Returns:
200 If the cancellation is successful.

Errors:
404 The shared folder at the specified path was not found.

shares/collaborators/

Returns a collaborators list of a shared folder.

URL: https://api.server.com/api/1/shares/collaborators/

Versions:1

Method: GET

Params:

Returns:
An array of collaborators.

Errors:
404 If the folder was not found.

Example

{
    "owner": false,
    "writer": true,
    "status": "accepted",
    "userid": 11,
    "login": "userid:11",
    "name": "Валентин Родыгин",
    "is_indirect": false  
}

Notes:

is_indirect - indirect or direct Collaborator for the shared folder;

False is direct. This folder was shared with Collaborator;

True is indirect. The parent folder was shared with Collaborator;

shares/update_collaborator/

Updates collaborator access rights to a directory shared with him.

URL: https://api.server.com/api/1/shares/update_collaborator/

Versions:1

Method: POST

Parameters:

Returns:
200 If an update was successful.

Errors:
403 If the folder is not shared.
404 If the folder is not found.

shares/

Returns a list of shared folders.

URL: https://api.server.com/api/1/shares/

Versions:1

Method: GET

Parameters:

Returns:

A metadata list for each folder.

shares/sizelimit/

Sets the folder size limit.

URL: https://api.server.com/api/1/shares/sizelimit/

Versions:1

Parameters:

Errors:
400 Current folder size is bigger than limited value
401 unauthorize

shares/company/add/

Add folder to the company's public shares list of the current user. Method work is for the current user.

URL: https://api.server.com/api/1/shares/company/add/

Versions:1

Parameters:

Returns:

A Map of elements:

Errors:
403 Forbidden to share folder for users from another company

shares/company/hide/

Remove folder from the company's public shares list. The method works for the current user.

URL: https://api.server.com/api/1/shares/company/hide/

Versions:1

Parameters:

Any parameter of:

Returns: None
Errors:
404 Folder not found in company folders list

shares/company/get/

Returns shared folders list. The method works for the current user.

URL: https://api.server.com/api/1/shares/company/get/

Versions:1

Parameters:

Returns:

A list of maps:

shares/company/get/one/

Returns shared folders info by folder_hash. The method works for the current user.

URL: https://api.server.com/api/1/shares/company/get/(?P<folder_hash>[a-zA-Z0-9-_!]+)/

Versions:1

Parameters:

Returns:

A map of:

shares/company/shared/

Returns list of already shared folders and public links, for company admins only.

URL: https://api.server.com/api/1/shares/company/shared/

Versions:1

Parameters:

Returns:
List of maps. Each map element contains:

If set offset and limit, it will return result with twice of limit

Example

[{
    u'bytes': 0,
    u'creation_time': 1409902069540,
    u'modification_time': 1409902069855,
    u'owner_id': 4,
    u'owner_name': u'user3',
    u'shared_outside': True,
    u'src_path': u'/user3_folder1',
    u'type': u'share'
}]

shares/company/request/

Send an access request to the public folder owner.

URL: https://api.server.com/api/1/shares/company/request/

Versions:1

Parameters:

Return:
No return data

Errors:
403 Folder already shared or sharing not allowed for current user
404 Folder hash or user not found
409 Folder sharing conflict, a user can't share folder for himself

shares/company/accept/

Accept the folder sharing request.

URL: https://api.server.com/api/1/shares/company/accept/

Versions:1

Parameters:

Returns:
No return data

Errors:
403 Folder not shared or sharing not allowed for the current user
404 Folder hash or user not found

shares/company/requests/

Returns a list of company share access requests.

URL: https://api.server.com/api/1/shares/company/requests/

Versions:1

Parameters:

None

Returns:
List of share information

Errors:
403 Folder not shared or sharing not allowed for the current user
404 Folder hash or user not found

Example

{
    'owner_id': owner.userid,
    'owner_name': owner.name,
    'directory_name': path value,
    'writer': write access rights,
    'hash': hash value
}

shares/invites/

Returns a list of invitations available to a collaborator.

URL: https://api.server.com/api/1/shares/invites/

Versions:1

Method: GET

Params:

None

Returns:

A list of pending invitations.

Example

[
    {
        "hash": "NNqCj79BqU8mbr6Dn2mhBnPO7sDMSF0K",
        "writer": true,
        "directory_name": "test_share_folder",
        "owner_name": "test",
        "owner_id": 1},
        ...
]

Creates a public link.

URL: https://api.server.com/api/1/links/create/

Versions:1

Method: POST

Parameters:

Returns:
Folder or file metadata. See / metadata.

Errors:
400 Attempt to create a link to the folder to upload a file.
403 Attempt to create a link to a file that doesn’t exist anymore.
404: The file or the folder is not found.

Deletes a public link.

URL: https://api.server.com/api/1/links/delete/

Versions:1

Method: POST

Params:

Returns:
Metadata about a folder or file. See / metadata.

Errors:
404 Public link not found

Returns a list of public links created by the current user.

URL: https://api.server.com/api/1/links/

Versions:1

Method: GET

Parameters:

Returns:
An array of metadata files for which public links have been created.

Example

[
  {
    "created": 1337852927321,
    "deleted": false,
    "bytes": 271426,
    "modified": 1339454394537,
    "public_hash": "http://dl.server.com/1/71277d2297?public",
    "version": 0,
    "path": "/server_payments_1.jpg",
    "folder": false,
    "thumbnail": false,
    "mime_type": "image/jpeg",
    "icon": ""
  }
]    

Output information on the published file (including URL for downloading).

URL: https://api.server.com/api/1/links/get/<hash>/<path>

Versions:0,1

Method: GET

Params:

Returns:
An object containing information about the downloaded file.

Errors:
404 The node was not found. Possible reasons: path is incorrectly set, the node has ceased to be published, or has been deleted.
403 The link was blocked due to a complaint about non-licensed content.

Output information on the published node, regardless of whether it is published separately or within a published directory.

URL: https://api.server.com/api/1/links/metadata/<hash>/<path>

Versions:1

Method: GET

Params:

Returns:
Metadata for a file or directory. The result returned by the method is similar to the result of the metadata API method. The only difference is that all paths are set relative to the published folder, and if information about the root published folder is displayed in the JSON result, an additional parameter name is passed containing the name of the root published folder (because its name cannot be obtained from path since a path in the case of the root published folder is /).

Errors:
404 The node was not found. Possible reasons: path is incorrectly set, the node has ceased to be published, or has been deleted.
403 The link was blocked due to complaint about non-licensed content

fileops/handover/

Transfers the shared folder by the owner to one of the collaborators. When transferring, the following actions occur:
         - copying files to the collaborator storage;
         - unsharing a folder at the collaborator side;
         - transfer of all collaborators from the folder of the old owner to the new folder of the new owner.

In this case, the old owner has his copy of the files.

URL: https://api.server.com/api/1/fileops/handover/

Versions:0,1

Method: POST

Params:

Returns:
None

Errors:
400 One of the required parameters is not set.
404 The folder to be transferred to the collaborator was not found or the specified user does not exist.
403 The folder is not shared for the specified collaborator, or he has not yet accepted the invitation to it.

Notes:

The process of transferring a folder is carried out in the background. For this period, the _old suffix is added to the name of the shared folder of the collaborator and the files are copied from it to a new folder with the same name as the shared folder has.

trash/

Returns a list of files and folders located in the recycle bin.

URL: https://api.server.com/api/1/trash/

Versions:1

Method: GET

Params:

Returns:
Metadata listing of each item in the recycle bin.
In addition, the hash of the owner recycle bin is returned in the ETag header. This hash can be used for client-side caching by passing it to the server in the If-None-Match header, if the recycle bin on the server has not changed, then the code 304 and an empty body will be returned in response.

The response format is similar to that returned by the / metadata API method. Instead of the path field in the object information, the name field is returned, which is used when restoring the object as its identifier in the recycle bin. The restore_path field is also added - the path at which the object was located before it was removed.

Errors:
304 The contents of the recycle bin have not changed since the last request (determined by the If-None-Match header).
404 The recycle bin or object inside it was not found. For example, they were removed during the execution of the request.

trash/restore/<name>

Recover an object from the recycle bin.

URL: https://api.server.com/api/1/trash/restore/<name>

Versions:1

Method: POST

Params:

Notes:

The method is asynchronous

trash/clear/

Empty the trash or permanently delete files from the trash.

URL: https://api.server.com/api/1/trash/clear/

Versions:1

Method: POST

Params:

Notes:

The method is asynchronous

trash/from_shared/<path>

Returns a list with information about the files and folders located in the recycle bin. The files and folders were previously located in the shared folder.

URL: https://api.server.com/api/1/trash/from_shared/<path>

Versions:1

Method: GET

Params:

Returns:
Metadata listing of each object in the recycle bin previously belonging to the shared folder. In addition, the hash of the owner recycle bin of the shared folder is returned in the ETag header.
This hash can be used for client-side caching by passing it to the server in the If-None-Match header, if the recycle bin on the server has not changed, then the code 304 and an empty body will be returned in response.

The response format is similar to that returned by the / metadata API method. Instead of the path field in the object information, the name field is returned, which is used when restoring the object as its identifier in the recycle bin. The restore_path field is also added - the path at which the object was located before it was removed.

Errors:
304 The contents of the recycle bin have not changed since the last request (determined by the If-None-Match header).
400 The folder is not a shared folder of the user
404 The recycle bin or object inside it was not found. For example, they were removed during the execution of the request.

trash/restore/<name>/from_shared/<path>

Restoring an object located in the shared folder from the recycle bin

URL: https://api.server.com/api/1/trash/restore/<name>/from_shared/<path>

Versions:1

Method: POST

Params:

Notes:

The method is asynchronous

migration_contents/

Returns information about migration requests. The method works for the current user.

Parameters:

my - return owners folders only
others - returns folders migrated by other
no value - returns all migrated folders (users and others)

Returns:
A list of migration information

migration_contents/add/

Create a request for content migration from user to user.

URL: https://api.server.com/api/1/migration_contents/add/

Versions:1

Method: POST

Params:

Returns:

Example

{
    "status": "requested",
    "dst_path": "",
    "receiver_id": 3,
    "hash": "YrczzylqmvUUPScjAg",
    "src_path": "",
    "owner_id": 2
}

migration_contents/accept/

Accept a request for content migration.

URL: https://api.server.com/api/1/migration_contents/accept/

Versions:1

Method: POST

Params:

Returns:
Information about migration

Example

{
    "status": "accepted",
    "dst_path": "/user2/home",
    "receiver_id": 3,
    "hash": "",
    "src_path": "",
    "owner_id": 2
}

migration_contents/reject/

Reject a request for content migration.

URL: https://api.server.com/api/1/migration_contents/reject/

Versions:1

Method: POST

Params:

Returns:
None

migration_contents/remove/

Remove a request for content migration.

URL: https://api.server.com/api/1/migration_contents/remove/

Versions:1

Method: POST

Params:

Returns:
None

shares/collaborators/

Returns a list of collaborators for a shared folder.

URL: https://api.server.com/api/1/shares/collaborators/

Versions:1

Method: GET

Params:

Returns:
List of collaborators

Errors:
404 If folder not found

Example

[{
    "owner": false,
    "writer": true,
    "status": "accepted",
    "userid": 11,
    "login": "userid:11",
    "name": "Валентин Родыгин",
    "is_indirect": false
}]

Notes:

The is_indirect parameter- indirect or direct collaborator for the shared folder.
             false - direct - this folder has been shared with the collaborator
             True- indirect - the parent folder has been shared with the collaborator

shares/remove/

Deletes user from a shared folder.

URL: https://api.server.com/api/1/shares/remove/

Versions:1

Method: POST

Params:

Returns:
200 If the user has been removed from the shared folder.

Errors:
403 If the user is not a collaborator of the folder.
404 If the folder is not found.

shares/unshare/

Unshares folder and deletes all users from a shared folder. Folders are hidden from all collaborators.

URL: https://api.server.com/api/1/shares/unshare/

Versions:1

Method: POST

Params:

Returns:
200 If the cancellation is successful.

Errors:
404 The shared folder with the specified path was not found.

Returns parameters necessary to upload a file to the server.

URL: https://api.server.com/api/1/links/file_create/<hash>

Versions:1

Method: POST

Parameters:

Returns:

If deduplication was executed the method returns the same value as the method /metadata/<path>.

Errors:
201: The file was created as a result of deduplication, i.e. the file with the same size and checksum was already on the server. The answer text will have the same value as the method /metadata/<path> returns.
400: The query was built incorrectly.
402: Not enough space in the storage.
403: Not enough rights to upload the file. The used hash is available only for download, there are limitations for the files upload with this hash, etc.
404: Trying to upload a file to a non-existing folder.

Returns parameters necessary to upload a file to the server.

URL: https://api.server.com/api/1/links/file_create_part/<hash>

Versions:1

Method: POST

Parameters:

Returns:

Errors:
201 The file was created as a result of deduplication, i.e. the file with the same size and checksum was already on the server. The answer text will have the same value as the method /metadata/<path> returns.
404 Trying to upload a file to a non-existing folder.
403 Insufficient permissions to upload the file. The used hash is available only for downloading, restrictions are imposed on uploading files by used hash, etc.

File and directory searching in the filesystem by the query string.

URL: https://api.server.com/api/1/files/search/

Versions:1

Method: POST

Params:

**Returns:**

.. code-block:: js

{
    "content": [
        {
            "owner_name": "anonymous",
            "created": 1429533845437,
            "deleted": false,
            "checksum": "cc0127604afe4d1cec8cdca0450a83a3",
            "author": 1,
            "bytes": 17204,
            "modified": 1429533845437,
            "author_name": "anonymous",
            "public_hash": "",
            "version": 1429533845437,
            "extradata": {},
            "client_data": {},
            "owner": 1,
            "path": "/fs-vbfg/23-12.txt",
            "folder": false,
            "mime_type": "text/plain",
            "icon": "document_text"
        },
        {
            "owner_name": "anonymous",
            "created": 1429533846152,
            "deleted": false,
            "checksum": "cc0127604afe4d1cec8cdca0450a83a3",
            "author": 1,
            "bytes": 17204,
            "modified": 1429533846152,
            "author_name": "anonymous",
            "public_hash": "",
            "version": 1429533846152,
            "extradata": {},
            "client_data": {},
            "owner": 1,
            "path": "/321/123.txt",
            "folder": false,
            "mime_type": "text/plain",
            "icon": "document_text"
        }
    ],
    "is_last_page": false
}

dir_size_calculate/

Creates a task that updates directory size.

URL: https://api.server.com/api/1/dir_size_calculate/

Versions:1

Method: GET

Params:

Returns:

1.Calculate start message

Example

{
    "status": "start calculating",
    "time": 1530247417226
}

2.Status of current calculation with done message.

Example

{
    "status": "done",
    "time": "1530247417226"
}

-   **404**

1.Status of the current calculation

Example

{
    "status": "calculating",
    "time": "1530247417226"
}

2.Does not have any result info in Task DB

Example

{
    "status": null,
    "description": "no previous result found"
}

get//

Get shared file

URL https://api.server.com/api/1/get//

Versions: 1

Method: GET

Params:

Returns:

shares/invites/

Get shared files' metadata

URL https://api.server.com/api/1/shares/invites/

Versions: 1

Method: GET

Params:

Returns:

Get public link information

URL https://api.server.com/api/1/shares/invites/

Versions: 1

Method: GET

Params:

Returns:

ACCOUNT MANAGEMENT

accounts/login/

Returns auth token.

URL: https://api.server.com/api/1/accounts/login/

Versions:1

Method: POST

Params:

Returns:
Auth token info dictionary.

Example

{
    "token": "461ccb0663574a8d9836fbbdda64a46a",
    "userid": 94,
    "expires": 1334909019075,
    "created": 1332230619075,
    "offer_url": "http://some-offer.url"
}

accounts/logout/

Returns the token removal result.

URL: https://api.server.com/api/1/accounts/logout/

Versions:0,1

Method: POST

Params:
no parameters, authorization header is used to remove the token.

Returns:
200 Completed successfully
400 Cannot remove the token

accounts/approve/

Approves registration through a confirmation token, which is part of the registration confirmation URL sent to the user in an e-mail after registration.

URL: https://api.server.com/api/1/accounts/approve/

Versions:0,1

Method: GET

Params:

Returns:
User data.

Errors:
404 User with the appropriate token was not found.

Example

{
    "token": "461ccb0663574a8d9836fbbdda64a46a",
    "userid": 94,
    "expires": 1334909019075,
    "created": 1332230619075
}

accounts/get/

Returns user account information.

URL: https://api.server.com/api/1/accounts/get/

Versions:1

Method: GET

Params:

Returns:
User account information.

Example

{
    "registration_date": 1362569459012,
    "is_active": true,
    "storage_size": 23241258,
    "timezone": "Europe/Moscow",
    "deleted_date": 0,
    "name": "DIma1234567",
    "lang": "ru",
    "is_deleted": false,
    "userid": 29,
    "logins": ['email:root@root.com', 'msisdn:79201234567'],
    "last_login": 1369226007680,
    "role": "admin",
    "balance": "n/a",
    "overhead_size": 2297347,
    "storage_usage": {"image": 1700, "audio": 1400, "video": 1400, "other": 300},
    "need_password_change": False,
    "extra_info": {}
  }

accounts/check/

Checks if a user account exists.

URL: https://api.server.com/api/1/accounts/check/

Versions:1

Method: GET

Params:

Returns:
User status “{‘status’: ‘ok’}” if the user account is found, otherwise {‘status’: ‘not found’}

Errors:
404 The user with the corresponding login was not found.

accounts/remove_login/

Removes the specified login of the user.

URL: https://api.server.com/api/1/accounts/remove_login/

Versions:1

Method: POST

Headers:
Mountbit-Auth - authorization token

Params:

Returns:
200 Login was successfully removed
400 Cannot remove the last user login
404 Login not found

accounts/getinvited/

Returns the user's login by invitation token.

URL: https://api.server.com/api/1/accounts/getinvited/

Versions:1

Method: GET

Params:

Returns:
Returns the login of the user to whom the invitation was sent.

Errors:
404 A user with the appropriate invitation token was not found.

accounts/recover_lost_password/

Sends the message necessary for temporary access to the account tied to the specified login to a passed login

URL: https://api.server.com/api/1/accounts/recover_lost_password/

Versions:1

Method: POST

Params:

Returns:
No data are returned

Errors:
400 The user with the entered login was not found in the system.

accounts/resend_message_for_approve/

Resends the message to approve the registration if the user has not already done so.

URL: https://api.server.com/api/1/accounts/resend_message_for_approve/

Versions:1

Method: POST

Params:

Returns:
No data are returned

Errors:
403 User has already confirmed registration.

accounts/change_profile/

Changes user profile parameters (name, password, etc.)

URL: https://api.server.com/api/1/accounts/change_profile/

Versions:0,1

Method: POST

Params:

Returns:
no data are returned

Errors:
200 PasswordNotModified - Password was not changed
400 The user was not found in the system or one of the passed parameters did not pass validation. Also, despite the fact that all parameters are optional, at least one parameter must be set.

The list of tz database time zones: http://en.wikipedia.org/wiki/List_of_zoneinfo_timezones

accounts/permanent_tokens/

The method returns a list of permanent tokens for the logged-in user.

URL: https://api.server.com/api/1/accounts/permanent_tokens/

Versions:0,1

Method: GET

Params:
No params

Returns:
A list of all permanent user tokens

Example

[
    {
        "device_description": "Васин Айфон",
        "id": "51ee60f7a298e35b1688aacf",
        "created": 1387798553613
    },
    {
        "device_description": "Васин Айфон",
        "id": "51ee613ea298e35b1688aad1",
        "created": 1387798553614
    }
]

accounts/remove_permanent_token/

Allows you to remove one of the existing permanent tokens.

URL: https://api.server.com/api/1/accounts/remove_permanent_token/

Versions:0,1

Method: POST

Params:

Returns:
Code 200 - token was successfully removed

Code 404 - the transferred token was not found.

accounts/cancel_token_remote_wipe

Cancel the “remote_wipe” flag for auth_token.

URL: https://api.server.com/api/1/accounts/cancel_token_remote_wipe

Versions:1

Method: POST

Params:

Errors:
404 AuthToken not found.

accounts/token_wiped

Remove auth_token with remote_wipe flag.

URL: https://api.server.com/api/1/accounts/token_wiped

Versions:1

Method: POST

Errors:
404 AuthToken with the remote_wipe flag not found.

accounts/accept_offer/

Confirm that the offer is accepted by the user.

URL: https://api.server.com/api/1/accounts/accept_offer/

Versions:0,1

Method: POST

Params:
No params

Returns:
Code 200 - Confirmation accepted.

accounts/get_offer/

Request an offer text

URL: https://api.server.com/api/1/accounts/get_offer/

Versions:0,1

Method: GET

Params:
No params

Returns:
HTML - offer page

Note:

An offer text is stored in a key-value with an offer key, if there is no such key or the value is not filled, an empty response will be returned.

accounts/decline_offer/

Decline the offer confirmation. It is used for testing purposes.

URL: https://api.server.com/api/0/accounts/decline_offer/

Versions:0,1

Method: POST

Params:
No params

Returns:
code 200 - Confirmation accepted.

Errors:
405 The method was denied by settings

Note:

This method is available only if the dynamic setting can_decline_offer == True

accounts/feedback/

Send feedback on the experience of using the application.

URL: https://api.server.com/api/1/accounts/feedback/

Versions:0,1

Method: POST

Params:

Returns:
200 - feedback processed. The response contains JSON with the optional parameter "url_upload_logs" - the URL at which the application logs are uploaded (if required). The upload to URL is done using the POST method, the file itself is passed in the parameter with the "log" key.

Example

curl -F "log=@/home/strannik/Temp/MountBit-v10.pdf" --header "User-Agent:
desktop-client-win" --progress-bar --verbose
http://app-logs-dev.mountbit.com/logs-upload/1/1384205541.38_52814ce5eae19d424aa898aa

Example

{
    "url_upload_logs": "http://app-logs-dev.mountbit.com/logs-upload/1/5281420eeae19d3f166c820b"
}

accounts/feedback_list/

Get a list of feedbacks on the experience of using the applications (the method is available to the administrator only).

URL: https://api.server.com/api/1/accounts/feedback_list/

Versions:0,1

Method: GET

Params:

Returns:
List of feedbacks

Example

{
    "count": 5,
    "data": [
      {
        "text": "hgfhdsfhhsdfg",
        "userid": 10,
        "email": "erhgwher@ya.ru",
        "created": 1384184924902
      },
      {
        "text": "hgfhdsfhhsdfg",
        "userid": 10,
        "email": "erhgwher@ya.ru",
        "created": 1384185209530
      },
      {
        "text": "hgfhdsfhhsdfg12",
        "userid": 10,
        "email": "erhgwher@ya.ru",
        "created": 1384185300032
      },
      {
        "text": "sdbjsbdfjsdbf",
        "userid": 1,
        "email": "dmitry2@dmitry.com",
        "created": 1384202303520
      },
      {
        "text": "sdbjsbdfjsdbf",
        "userid": 1,
        "email": "dmitry2@dmitry.com",
        "created": 1384202766141
      }
    ]
}


accounts/set_value/

Save an arbitrary value defined by user for a given key.

URL: https://api.server.com/api/1/accounts/set_value/

Versions:1

Method: POST

Params:

Returns:
200 - if the value was successfully written or updated

accounts/get_value/

Get a value saved by user on the given key

URL: https://api.server.com/api/1/accounts/get_value/

Versions:1

Method: GET

Params:

Returns:
200 - returns a dictionary of the form {key: value} - if the key is found, or {key: null} - if the key is not found.

company/<company id>

Returns company information data.

URL: https://api.server.com/api/1/company/<company_id>

Versions:1

Method: GET

Params:

Returns:

For company user:

For company administrator API shows all user's data and:

Errors:
403 User has no rights to view company's data.
404 Company with the given ID not found.

company/domain/<domain>

Returns public information about the company by its domain name.

URL:https://api.server.com/api/1/company/domain/<domain>

Versions:1

Method: POST

Params:

Returns:

JSON dictionary with company information.

Errors:
404 Company with this domain not found

Example

{
    "status": "active",
    "domain": "domain_value",
    "name": "company_name",
    "company_id": 1,
    "logo": "http://domain.com/image.jpg",
    "auth_method": {
        "email": true
    }
}

company/<company_id>/logo_confirm/

Confirm logo upload as complete.

URL: https://api.server.com/api/1/company/<company_id>/logo_confirm/

Versions:1

Method: POST, GET

Params:

Returns:
- no response data

Errors:
404 Company with the given ID not found.

company/<company_id>/logo_clear/

Clear company logo.

URL: https://api.server.com/api/1/company/<company_id>/logo_clear/

Versions:1

Method: POST, GET

Params:

Returns:
No response data

Errors:
404 Company with the given ID not found.

company/<company_id>/logo_upload/

Creates a company logo picture.

URL: https://api.server.com/api/1/company/<company_id>/logo_upload/

Versions:1

Method: POST, GET

Params:

Returns:

Errors:
403 User has no rights to change company's settings.
404 Company with the given ID not found.

company/<company_id>/admin_change/

Change a company admin.

URL: https://api.server.com/api/1/company/<company_id>/admin_change/

Versions:1

Method: POST

Params:

Returns:
Public company info

Errors:
403 User has no rights to change company's settings.
404 Company with the given ID not found or target user not found.

company/<company id>/users_enable/

Enable user in the company.

URL: https://api.server.com/api/1/company/<company_id>/users_enable/

Versions:1

Method: POST

Params:

Returns:
User public information, like a /accounts/get

Errors:
404 Company/User with the given ID not found.

company/<company id>/users_disable/

Disable user in the company.

URL: https://api.server.com/api/1/company/<company_id>/users_disable/

Versions:1

Method: POST

Params:

Returns:
User public information, like a /accounts/get

Errors:
404 Company/User with the given ID not found.

company/<company id>/create_user/

Create a company user.

URL: https://api.server.com/api/1/company/<company_id>/create_user/

Versions:1

Method: POST, GET

Params:

Returns:
User public information, like a /accounts/get

Errors:
402 User quota exceeded.
403 User has no rights to change company's settings.
404 Company with the given ID not found.

accounts/company/<company id>/remove_user/

Remove user from a company.

URL: https://api.server.com/api/1/accounts/company/<company_id>/remove_user/

Versions:1

Method: POST, GET

Params:

Returns:
Users public information.

Errors:
403 User has no rights to change company's settings.
404 User with the given ID not found.

accounts/company/<company id>/confirm_user_removing/

Confirm removing of the user

URL: https://api.server.com/api/1/accounts/company/<company_id>/confirm_user_removing/

Versions:1

Method: POST, GET

Params:

Returns:
Users public information.

Errors:
403 User has no rights to change company's settings.
404 User not found with given ID.
412 User with this status can't be deleted

accounts/company/<company id>/cancel_user_removing/

Cancel user removing.

URL: https://api.server.com/api/1/accounts/company/<company_id>/cancel_user_removing/

Versions:1

Method: POST, GET

Params:

Returns:
Users public information.

Errors:
403 User has no rights to change company's settings.
404 User the given ID not found.
412 User with this status can't be deleted.

company/<company id>/users

Returns company employees list.

URL: https://api.server.com/api/1/company/<company_id>/users

Versions:1

Method: GET, POST

Params:

Returns:

Company's employees list, each record is as follows:

Errors:
403 User has no rights to view company's data.
404 Company with the given ID not found.

Example

{
  'content': ['userid':1, 'name': 'user name', 'position': 'manager'], [...], ...
}


company/user_permanent_tokens

Returns a permanent token list for a user. Used by companies admin.

URL: https://api.server.com/api/1/company/user_permanent_tokens

Versions:1

Method: GET, POST

Params:

Returns:
Permanent tokens list, each record is as follows:

Errors:
403 User has no rights to view company's data.
404 User not found.

Example

{"content":[
    {
        "device_description": "Васин Айфон",
        "id": "51ee60f7a298e35b1688aacf",
        "created": 1387798553613
    },
    {
        "device_description": "Васин Айфон",
        "id": "51ee613ea298e35b1688aad1",
        "created": 1387798553614
    }]
}

company/user_permanent_token/remove

Remove a permanent token for company user or mark a token for a remote wipe. Used by companies admin.

URL: https://api.server.com/api/1/company/user_permanent_token/remove

Versions:1

Method: POST

Params:

Returns:
No response data

Errors:
403 User has no rights to view company's data.
404 User or token not found.

company/user_permanent_token/cancel_remove

Cancel removing a permanent token.

URL: https://api.server.com/api/1/company/user_permanent_token/cancel_remove

Versions:1

Method: POST

Params:

Returns:
No response data

Errors:
403 User has no rights to view company's data.
404 User or token not found.

accounts/company/change_users_quota

Change quota_size and hard_quota_size for users.

URL: https://api.server.com/api/1/accounts/company/change_users_quota

Versions:1

Method: POST

Params:

Returns:
Users public information, with error info and info about success and failure.

Errors:
403 User has no rights to view company's data.
404 User or company not found.

Example

{
    'success': 2,
    'failed': 1,
    'nodes': [
        {
            'userid': 12,
            'error_code': None,
            ...
        },
        {
            'userid': 12,
            'error_code': None,
            ...
        }
        {
            'error_code': 402,
            'error_info': 'Company quota need increase.'
        }
    ]
}

accounts/company/change_user_can_print

Change the user's option “can_print”.

URL: https://api.server.com/api/1/accounts/company/change_user_can_print

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to change company's data.
404 User not found.

accounts/company/change_user_can_download

Change the user's option “can_download”.

URL: https://api.server.com/api/1/accounts/company/change_user_can_download

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to view company's data.
404 User not found.

accounts/company/change_user_can_upload

Change the user's option “can_upload”.

URL: https://api.server.com/api/1/accounts/company/change_user_can_upload

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to view company's data.
404 User not found.

accounts/company/change_user_pc_can_download

Change the user's option “pc_can_download”.

URL: https://api.server.com/api/1/accounts/company/change_user_pc_can_download

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to view company's data.
404 User not found.

accounts/company/change_user_can_print

Change the user's option “can_print”.

URL: https://api.server.com/api/1/accounts/company/change_user_can_print

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to change company's data.
404 User not found.

accounts/company/change_mobile_restriction

Change the user's option “user_mobile_restriction”.

URL: https://api.server.com/api/1/accounts/company/change_mobile_restriction

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to change company's data.
404 User not found

accounts/company/change_user_ip_restriction

Change the user's option “use_watermarks”.

URL: https://api.server.com/api/1/accounts/company/change_user_ip_restriction

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to change company's data.
404 User not found.

accounts/change_admin_rights

Give a user admin rights.

URL: https://api.server.com/api/1/accounts/change_admin_rights

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
403 User has no rights to change company's data.
404 User/Company not found.

accounts/company/company_id/custom_user_agreement

Change custom user agreement

URL: https://api.server.com/api/1/accounts/company/company_id/custom_user_agreement

Versions:1

Method: POST

Params:

Returns:

Company public information

Errors:
403 User has no rights to change company's data.
404 Company not found.

accounts/company/change_user_expired

Change an expire date set as a period

URL: https://api.server.com/api/1/accounts/company/change_user_expired

Versions:1

Method: POST

Params:

Returns:

User public information, like a /accounts/get

Errors:
400 Request doesn't have expired value
403 User has no rights to change company's data
404 User or company not found

accounts/company/company_id/update_reference/

Update reference email on company.

URL: https://api.server.com/api/1/accounts/company/company_id/update_reference/

Versions:1

Method: POST

Params:

Returns:

200 OK

Errors:
400 Email form is invalid
403 User has no rights to change company's data
404 Company not found

accounts/create/

Registers a new user.

URL: https://api.server.com/api/0/accounts/create/

Versions:0

Method: POST

Params:

Returns:

User data

Errors:

404 User with such an email is already registered.

Example

{
    "name": "Иван Иванов",
    "email": "ivan@asdco.ru",
    "storage_size": 11235122,
    "balance": 123.45,
    "is_active": true
}


info/

Return payment methods information

URL https://api.server.com/api/1/info/

Versions: 1

Method: GET/POST

Params:

None

Returns:

choose/

Chooses the payment method

URL https://api.server.com/api/1/choose/

Versions: 1

Method: POST

Params:

Returns:

WORKFLOW

workflow/comment/<path>

Create a new file comment by path

URL: https://api.server.com/api/1/workflow/comment/<path>

Versions:1

Method: POST

Params:

Returns:

A comment object

Example

.. code-block:: json

{
    'id': '5ab970c1e1382347c353e85a',
    'created_time': 1522100559404,
    'text': 'Owner comment',
    'taggedText': '',
    'type': 'text',
    'owner_id': 1
}

workflow/comment/edit

Edit a file comment by path

URL: https://api.server.com/api/1/workflow/comment/edit

Versions:1

Method: POST

Params:

Returns:

A comment object

Example

.. code-block:: json

{
    'id': '5ab970c1e1382347c353e85a',
    'created_time': 1522100559404,
    'text': 'Owner comment',
    'taggedText': '',
    'type': 'text',
    'owner_id': 1
}

workflow/comment/delete

Delete a comment for a file by path

URL: https://api.server.com/api/1/workflow/comment/delete

Versions:1

Method: POST

Params:

Returns:

Empty.

workflow/comments/<path>

Returns a list of comments by path.

URL: https://api.server.com/api/1/workflow/comments/<path>

Versions:1

Method: GET

Params:

Returns:

A list of comments by path.

Example

.. code-block:: json

[{
    'id': '5ab970c1e1382347c353e85a',
    'created_time': 1522100559404,
    'text': 'Owner comment',
    'taggedText': '',
    'type': 'text', 'owner_id': 1
},]

workflow/comment/update_task_status

Update a comment task status

URL: https://api.server.com/api/1/workflow/comment/update_task_status

Versions:1

Method: POST

Params:

Returns:

A comment object.

Example

.. code-block:: json

{
    'id': '5ab970c1e1382347c353e85a',
    'created_time': 1522100559404,
    'text': 'Owner comment',
    'taggedText': '',
    'type': 'task',
    'owner_id': 1,
    'due_date': 0,
    'assignees': [
        {
          'id': '5ab970c1e1382347c353e85a',
          'user_id': 2,
          'status': 'decline',
          'created_time': 1522100559404
          }
    ]
}