Tuyu Developers

Developers

Customize the URLs on this site with your Tuyu URL:

https:// .
Method Documentation > Users and Workspaces

Workspace Add POST

Description

Create a site workspace.

URL

All responses are in JSON format by default, to specify an XML response add “.xml” to the end of the method name (in this case “workspace_add”)

https://<your subdomain>.<your domain>/api/workspace_add

Restrictions

The calling user must have:

  • Admin privileges for the site.

Parameters

Bold indicates required.

Parameter Description
api_key Your API Key.
name The name of the workspace being created. 40 characters maximum. You can add multiple workspaces by using a comma-separated list, each individual workspace must still be 40 characters or less. All other settings (workspace users, override settings) will apply to all workspaces.
root_access Default is “1”. “1” allows non-admins to view and perform actions on files in the root of the workspace, “0” forces non-admins to go into a folder before viewing and performing actions on files.
workspace_users A comma-separated list of users IDs that will be joined to the newly-created workspace.
workspace_override_permissions Default is “0”. “1” signifies you want to set file/folder permissions for all users, superceding each user's base-level permissions, while browsing this workspace (this can be overriden by settings custom permissions on an individual for this workspace via the web-based app). If “1” is entered at least one permission listed below needs to be set to “1”.
workspace_override_notifications Default is “0”. “1” signifies you want to set upload/download notification settings for all users, superceding each user's base-level permissions, for any uploads/downloads that occur in this workspace (this can be overriden by settings custom notifications on an individual for this workspace via the web-based app).
workspace_override_batch_upload_files Default is “0”. “1” allows the user to upload and expand ZIP archives in this workspace. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_upload_files Default is “0”. “1” allows the user to upload files in this workspace. Users with “workspace_override_batch_upload_files” set to “1” will automatically have this parameter set to “1”. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_batch_download_files Default is “0”. “1” allows the user to download multiple files in this workspace. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_download_files Default is “0”. “1” allows the user to download files in this workspace. Users with “workspace_override_batch_download_files” set to “1” will automatically have this parameter set to “1”. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_batch_delete_files Default is “0”. “1” allows the user to delete multiple files at once in this workspace. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_delete_files Default is “0”. “1” allows the user to delete files in this workspace. Users with “workspace_override_batch_delete_files” set to “1” will automatically have this parameter set to “1”. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_send_files_non_user Default is “0”. “1” allows the user to send files to e-mail addresses without an account on the site in this workspace. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_send_files Default is “0”. “1” allows the user to send files in this workspace. Users with “workspace_override_send_files_non_user” set to “1” will automatically have this parameter set to “1”. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_batch_move_copy_files Default is “0”. “1” allows the user to move or copy multiple files at once in this workspace. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_move_copy_files Default is “0”. “1” allows the user to move or copy files in this workspace. Users with “workspace_override_batch_move_copy_files” set to “1” will automatically have this parameter set to “1”. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_create_folders Default is “0”. “1” allows the user to create folders in this workspace. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_rename_files Default is “0”. “1” allows the user to rename files in this workspace. NOTE: This parameter does nothing if “workspace_override_permissions” is not set to “1”.
workspace_override_upload_notifications Default is “0”. “1” allows the user to automatically receive a notification when an upload occurs in this workspace. NOTE: This parameter does nothing if “workspace_override_notifications” is not set to “1”.
workspace_override_download_notifications Default is “0”. “1” allows the user to automatically receive a notification when an download occurs in this workspace. NOTE: This parameter does nothing if “workspace_override_notifications” is not set to “1”.
timestamp The current time in Unix timestamp format.
signature Please see “User Authentication” for more information.

Sample Response

Successful response In JSON for adding a single workspace:

{"workspaceAdd":{"workspaceId":1}}

Successful response In JSON for adding multiple workspaces returns workspace IDs for all newly created workspaces, in order of names entered:

{"workspaceAdd":{"workspaceId":
    [
        1,
        2
    ]
}}

Successful response in XML:

<workspaceAdd>
    <workspaceId>1</workspaceId>
</workspaceAdd>

Error response In JSON:

{"error":{
    "title":"'Workspace Add Failed",
    "message":"You must be an administrator to call this method"}
}

Error response In XML:

<error>
    <title>'Workspace Add Failed</title>
    <message>You must be an administrator to call this method</message>
</error>