API Documentation

The Workshare API is a RESTful HTTP JSON.

Registering your App

To start using the API simply register your app and get a registration key. The registration key is a client specific token that will authenticate your app's calls to our platform.

Click Register below and log in to our platform using your enterprise account credentials. Go to Settings and select the Apps tab. Click Develop a new app in the left panel and request a registration key.

If you don't have a Workshare account, contact sales to discuss an evaluatation at sales@workshare.com

Once you register you will have access to the list of resources below:

  • Files: Will allow you to upload, download and manipulate files.
  • Folders: Will allow you to create, manipulate and delete folders.
  • Members: Will allow you to invite people to folders, remove them and allocate a admin users.
  • Permissions: Will allow you to control which actions will be allowed to members of folders.

Files

Get files' metadata

Description

Get all the files' metadata. If a folder_id is provided, only the files that belong to it will be returned.

Url

/api/open-v1.0/files.json

Method

GET

Version

1

Response

A list of files' metadata

Parameters

        page (Pagination) Page to show
        optional
        limit (Pagination) Max results per page
        optional
        file [folder_id]Folder ID
        optional 
      

Sample request

curl -X GET 'http://www.example.com/api/open-v1.0/files.json'

Sample JSON response

      {
        "pagination": {
          "current_page": 1,
          "total_pages": 1,
          "total_entries": 2
        },
        "files": [
          {
            "id": 2,
            "name": "I'm deck number 2",
            "extension": "ppt",
            "version": 1,
            "size": 1601,
            "created_at": "2013-05-02T10:15:00Z",
            "updated_at": "2013-05-02T10:15:00Z",
            "creator": {
              "id": 1,
              "name": "User 1",
              "email": "email_1@skyslides.com",
              "uuid": "387a3ddb-eb1f-4988-bb5b-029f1e8af784"
            },
            "url": "http://www.example.com/decks/2",
            "access_token": "-TVAdhTAVW1iuLFx",
            "first_page_url": "http://www.test.com/images/icons/medium/ppt.png",
            "folder_id": 14
          },
          {
            "id": 1,
            "name": "I'm deck number 1",
            "extension": "ppt",
            "version": 1,
            "size": 1601,
            "created_at": "2013-05-02T10:14:58Z",
            "updated_at": "2013-05-02T10:14:59Z",
            "creator": {
              "id": 1,
              "name": "User 1",
              "email": "email_1@skyslides.com",
              "uuid": "387a3ddb-eb1f-4988-bb5b-029f1e8af784"
            },
            "url": "http://www.example.com/decks/1",
            "access_token": "SreDn0tVyLo64pNG",
            "first_page_url": "http://www.test.com/images/icons/medium/ppt.png",
            "folder_id": 13
          }
        ]
      }
      

Errors

401:You are not authorized to access to this resource.

Get a file's metadata

Url

/api/open-v1.0/files/1.json

Description

Get a file's metadata by ID

Method

GET

Version

1

Response

The file's metadata

Parameters

none

Sample JSON response

      {
        "id": 1,
        "name": "I'm deck number 5",
        "extension": "ppt",
        "version": 1,
        "size": 1601,
        "created_at": "2013-05-02T10:15:08Z",
        "updated_at": "2013-05-02T10:15:09Z",
        "creator": {
          "id": 1,
          "name": "User 13",
          "email": "email_13@skyslides.com",
          "uuid": "bd40b138-4cf0-40fe-b93b-9525af8821fa"
        },
        "url": "http://www.example.com/decks/1",
        "access_token": "OID1LyMepru62xxi",
        "first_page_url": "http://www.test.com/images/icons/medium/ppt.png",
        "folder_id": 13
      }
      

Errors

403:You dont have permissions to access the file.

404:Does not exist any file with the specified ID.

Upload a file

Url

/api/open-v1.0/files.json

Description

Upload a file. If no folder_id is provided, the file will be uploaded in the user's root folder.

Version

1

Method

POST

Response

The created file's metadata

Parameters

        Filedata Binary content of the file
        mandatory
        file[name] File name
        mandatory
        file[folder_id] Folder ID
        optional
      

Sample request

curl -X POST http://www.example.com/api/open-v1.0/files.json -F 'Filedata=@path_to_local_file/presentation.pptx>' -F 'file[apply_changes]=true file[name]=Test file file[updated_by]=# file[updated_with]=web'

Sample JSON response

        {
          "id": 3,
          "name": "Test file",
          "extension": "pptx",
          "version": 1,
          "size": 27963,
          "created_at": "2013-05-02T10:15:21Z",
          "updated_at": "2013-05-02T10:15:21Z",
          "creator": {
            "id": 1,
            "name": "User 25",
            "email": "email_25@skyslides.com",
            "uuid": "1e26c5d3-cd23-432a-a902-5e19619d9693"
          },
          "url": "http://www.example.com/decks/3",
          "access_token": "qZ4roWo2Z7B5IDuK",
          "first_page_url": "http://www.test.com/images/icons/medium/ppt.png",
          "folder_id": 1
        }
      

Errors

422:error creating the File

Update a file's metadata

Url

/api/open-v1.0/files/1.json

Description

Update a file's metadata

Versions

1

Method

PUT

Response

The modified file's metadata

Parameters

        file[name] Updated file name
        optional
        file[folder_id] Updated folder ID
        optional
      

Sample request

curl -X PUT http://www.example.com/api/open-v1.0/files/1.json -F 'file[name]=Test file rename'

Sample JSON response

        {
          "id": 1,
          "name": "Test file rename",
          "extension": "ppt",
          "version": 1,
          "size": 1601,
          "created_at": "2013-05-02T10:15:22Z",
          "updated_at": "2013-05-02T10:15:26Z",
          "creator": {
            "id": 1,
            "name": "User 31",
            "email": "email_31@skyslides.com",
            "uuid": "679ffd6a-6909-419b-96c0-0de8005adcaf"
          },
          "url": "http://www.example.com/decks/1",
          "access_token": "0iYp1YKp0xJx26bl",
          "first_page_url": "http://www.test.com/images/icons/medium/ppt.png",
          "folder_id": 13
        }
      

Errors

403:not allowed to modify a file without appropriate permission (can_manipulate)

Delete a file

Url

/api/open-v1.0/files/1.json

Description

Delete the file by ID

Versions

1

Method

DELETE

Response

An empty hash

Sample request

curl -X DELETE http://www.example.com/api/open-v1.0/files/1.json

Sample JSON response

 
          {
      }
      

Errors

403:not allowed to delete a file you do not own

Download a file

Url

/api/open-v1.0/files/1/download

Description

Download the file by ID

Versions

1

Method

GET

Response

The binary content of the file

Sample request

curl -X GET 'http://www.example.com/api/open-v1.0/files/1/download'

Errors

403:not allowed to download a file you do not own

Folders

Get all the Folder objects

Description

Get the list of all the folders that the user can access.

Url

/api/open-v1.0/folders.json

Method

GET

Version

1

Response

The list of the folders and the pagination info. Each folder contains the users creator, owner and the folder's permissions (see the sample Json).

Parameters

        page (Pagination) Page to show
        optional
        limit (Pagination) Max results per page
        optional
        updated_at_gt Updated after this date
        optional
      

Sample request

curl -X GET 'http://www.example.com/api/open-v1.0/folders.json'

Sample JSON response

        {
          "pagination": {
            "current_page": 1,
            "total_pages": 1,
            "total_entries": 4
          },
          "folders": [
            {
              "id": 1,
              "name": "My Files",
              "parent_id": null,
              "url": "http://www.example.com/f/2zeZ7YzdLDgAmody/my-files",
              "access_token": "2zeZ7YzdLDgAmody",
              "created_at": "2013-05-02T10:15:36Z",
              "updated_at": "2013-05-02T10:15:38Z",
              "creator": {
                "name": "User 49",
                "email": "email_49@skyslides.com",
                "uuid": "efbb8415-7547-441a-bbca-cda923bd8cd6"
              },
              "owner": {
                "name": "User 49",
                "email": "email_49@skyslides.com",
                "uuid": "efbb8415-7547-441a-bbca-cda923bd8cd6"
              },
              "permissions": {
                "can_download_original": true,
                "can_upload_changes": true,
                "can_view_tracking": true,
                "can_manipulate": false,
                "can_comment": true,
                "can_invite_with_link": false,
                "can_access_anonymously": false,
                "can_download_pdf": false,
                "can_delete": false,
                "inherits_from_parent": false
              },
              "description": ""
            },
            {
              "id": 2,
              "name": "Inbox",
              "parent_id": 1,
              "url": "http://www.example.com/f/3CLjsqtERPV-LIlL/inbox",
              "access_token": "3CLjsqtERPV-LIlL",
              "created_at": "2013-05-02T10:15:36Z",
              "updated_at": "2013-05-02T10:15:36Z",
              "creator": {
                "name": "User 49",
                "email": "email_49@skyslides.com",
                "uuid": "efbb8415-7547-441a-bbca-cda923bd8cd6"
              },
              "owner": {
                "name": "User 49",
                "email": "email_49@skyslides.com",
                "uuid": "efbb8415-7547-441a-bbca-cda923bd8cd6"
              },
              "permissions": {
                "can_download_original": true,
                "can_upload_changes": true,
                "can_view_tracking": true,
                "can_manipulate": false,
                "can_comment": true,
                "can_invite_with_link": false,
                "can_access_anonymously": false,
                "can_download_pdf": false,
                "can_delete": false,
                "inherits_from_parent": false
              },
              "description": ""
            },
            {
              "id": 3,
              "name": "Sent Files",
              "parent_id": 1,
              "url": "http://www.example.com/f/mEP87N8x_pU1FXMl/sent-files",
              "access_token": "mEP87N8x_pU1FXMl",
              "created_at": "2013-05-02T10:15:36Z",
              "updated_at": "2013-05-02T10:15:36Z",
              "creator": {
                "name": "User 49",
                "email": "email_49@skyslides.com",
                "uuid": "efbb8415-7547-441a-bbca-cda923bd8cd6"
              },
              "owner": {
                "name": "User 49",
                "email": "email_49@skyslides.com",
                "uuid": "efbb8415-7547-441a-bbca-cda923bd8cd6"
              },
              "permissions": {
                "can_download_original": true,
                "can_upload_changes": true,
                "can_view_tracking": true,
                "can_manipulate": false,
                "can_comment": true,
                "can_invite_with_link": false,
                "can_access_anonymously": false,
                "can_download_pdf": false,
                "can_delete": false,
                "inherits_from_parent": false
              },
              "description": ""
            },
            {
              "id": 13,
              "name": "Folder 17",
              "parent_id": 10,
              "url": "http://www.example.com/f/_R_4wQX08KpXJJDF/folder-17",
              "access_token": "_R_4wQX08KpXJJDF",
              "created_at": "2013-05-02T10:15:38Z",
              "updated_at": "2013-05-02T10:15:38Z",
              "creator": {
                "name": "User 52",
                "email": "email_52@skyslides.com",
                "uuid": "14ab9b5b-d26a-4179-8658-9375f2b98fbd"
              },
              "owner": {
                "name": "User 52",
                "email": "email_52@skyslides.com",
                "uuid": "14ab9b5b-d26a-4179-8658-9375f2b98fbd"
              },
              "permissions": {
                "can_download_original": true,
                "can_upload_changes": true,
                "can_view_tracking": true,
                "can_manipulate": true,
                "can_comment": true,
                "can_invite_with_link": true,
                "can_access_anonymously": false,
                "can_download_pdf": false,
                "can_delete": true,
                "inherits_from_parent": false
              },
              "description": ""
            }
          ]
        }
      

Errors

401:You are not authorized to access to this resource.

Get a Folder object

Url

/api/open-v1.0/folders/{folder_id}.json

Description

Get the folder object by ID

Method

GET

Version

1

Response

The Folder object.

Sample JSON response

      {
        "id": 13,
        "name": "Folder 18",
        "parent_id": 10,
        "url": "http://www.example.com/f/kCbn3jnDrbEgefSa/folder-18",
        "access_token": "kCbn3jnDrbEgefSa",
        "created_at": "2013-05-02T10:15:40Z",
        "updated_at": "2013-05-02T10:15:41Z",
        "creator": {
          "name": "User 56",
          "email": "email_56@skyslides.com",
          "uuid": "ea3aa380-ead3-43e9-80dc-f9d4ef0daea4"
        },
        "owner": {
          "name": "User 56",
          "email": "email_56@skyslides.com",
          "uuid": "ea3aa380-ead3-43e9-80dc-f9d4ef0daea4"
        },
        "permissions": {
          "can_download_original": true,
          "can_upload_changes": true,
          "can_view_tracking": true,
          "can_manipulate": true,
          "can_comment": true,
          "can_invite_with_link": true,
          "can_access_anonymously": false,
          "can_download_pdf": false,
          "can_delete": true,
          "inherits_from_parent": false
        },
        "description": ""
      }
      

Errors

403:You dont have permissions to access the folder.

404:Does not exist any folder with the specified ID.

Create a new Folder

Url

/folders.json

Description

Create a new empty Folder with a certain name.

Version

1

Method

POST

Parameters

        folder[name] Folder name
        mandatory
        folder[description] Folder description
        optional
        folder[parent_id] Parent folder ID
        optional
      

Sample request

curl -X POST http://www.example.com/api/open-v1.0/folders.json -F 'folder[name]=Test folder'

Response

The Folder object created.

Sample JSON response

        {
          "id": 4,
          "name": "Test folder",
          "parent_id": 1,
          "url": "http://www.example.com/f/IJcgIsYNVl-ofvnb/test-folder",
          "access_token": "IJcgIsYNVl-ofvnb",
          "created_at": "2013-05-02T10:15:44Z",
          "updated_at": "2013-05-02T10:15:44Z",
          "creator": {
            "name": "User 61",
            "email": "email_61@skyslides.com",
            "uuid": "6e27d166-dbcb-4146-b767-4a0c0d3d3e49"
          },
          "owner": {
            "name": "User 61",
            "email": "email_61@skyslides.com",
            "uuid": "6e27d166-dbcb-4146-b767-4a0c0d3d3e49"
          },
          "permissions": {
            "can_download_original": true,
            "can_upload_changes": true,
            "can_view_tracking": true,
            "can_manipulate": true,
            "can_comment": true,
            "can_invite_with_link": true,
            "can_access_anonymously": false,
            "can_download_pdf": false,
            "can_delete": true,
            "inherits_from_parent": false
          },
          "description": ""
        }
      

Errors

422:error creating the Folder.

Update a Folder

Url

/folders/{folder_id}.json

Description

Update a folder

Versions

1

Method

PUT

Parameters

        folder[name] Updated folder name
        optional
        folder[description] Updated folder description
        optional
        folder[parent_id] Updated parent folder ID
        optional
      

Sample request

curl -X PUT http://www.example.com/api/open-v1.0/folders/4.json -F 'folder[description]=Test description rename folder[name]=Test folder rename folder[updated_by]=# folder[updated_with]=web'

Response

The modified Folder.

Sample JSON response

        {
          "id": 4,
          "name": "Test folder rename",
          "parent_id": 1,
          "url": "http://www.example.com/f/x3QG_JsfQAN-KYSC/test-folder-rename",
          "access_token": "x3QG_JsfQAN-KYSC",
          "created_at": "2013-05-02T10:15:44Z",
          "updated_at": "2013-05-02T10:15:44Z",
          "creator": {
            "name": "User 62",
            "email": "email_62@skyslides.com",
            "uuid": "6f3663cf-5b75-4561-a179-1f406a51d88c"
          },
          "owner": {
            "name": "User 62",
            "email": "email_62@skyslides.com",
            "uuid": "6f3663cf-5b75-4561-a179-1f406a51d88c"
          },
          "permissions": {
            "can_download_original": true,
            "can_upload_changes": true,
            "can_view_tracking": true,
            "can_manipulate": true,
            "can_comment": true,
            "can_invite_with_link": true,
            "can_access_anonymously": false,
            "can_download_pdf": false,
            "can_delete": true,
            "inherits_from_parent": false
          },
          "description": "Test description rename"
        }
      

Errors

403:not allowed to modify a folder without appropriate permission (can_manipulate)

403 (2):not allowed to move special folders (inbox, outbox, ...)

Delete a Folder

Url

/folders/{folder_id}.json

Description

Delete the Folder having a certain ID

Versions

1

Method

DELETE

Sample request

curl -X DELETE http://www.example.com/api/open-v1.0/folders/13.json

Response

Empty Hash

Sample JSON response

      {
      }
      

Errors

403:not allowed to delete a folder you do not own

403 (2):not allowed to delete special folders (inbox, outbox, ...)

Members

List members

Url

/api/open-v1.0/folders/13/members.json

Description

This call will return the list of active (i.e. not deleted) members for a given folder identified by ID.

Version

1

Method

GET

Parameters

          page (Pagination) Page to show
          optional
          limit (Pagination) Max results per page
          optional   
      

Sample request

curl -X GET 'http://www.example.com/api/open-v1.0/folders/13/members.json'

Response

All the active members for the given folder.

Sample JSON response

      {
        "pagination": {
          "current_page": 1,
          "total_pages": 1,
          "total_entries": 1
        },
        "members": [
          {
            "user": {
              "name": "User 72",
              "email": "email_71@skyslides.com",
              "uuid": "e0863ae9-8b8d-4eb6-95d6-3ee992f79ad4"
            },
            "admin": false,
            "folder_id": 13,
            "deleted": false,
            "created_at": "2013-05-02T10:15:50Z",
            "updated_at": "2013-05-02T10:15:50Z"
          }
        ]
      }
      

Errors

403:Forbidden

List members (with ancestry)

Url

/api/open-v1.0/folders/13/members/ancestry.json

Description

This call will return the list of active (i.e. not deleted) members for a given folder identified by ID including ancestry.

Version

1

Method

GET

Parameters

          page (Pagination) Page to show
          optional
          limit (Pagination) Max results per page
          optional
      

Sample request

curl -X GET 'http://www.example.com/api/open-v1.0/folders/13/members/ancestry.json'

Response

All the active members for the given folder including ancestry.

Sample JSON response

      {
        "pagination": {
          "current_page": 1,
          "total_pages": 1,
          "total_entries": 2
        },
        "members": [
          {
            "user": {
              "name": "User 73",
              "email": "email_72@skyslides.com",
              "uuid": "4ff79b6e-d6b6-4d8f-87d9-eb1381dc0cca"
            },
            "admin": true,
            "folder_id": 1,
            "deleted": false,
            "created_at": "2013-05-02T10:15:50Z",
            "updated_at": "2013-05-02T10:15:50Z"
          },
          {
            "user": {
              "name": "User 78",
              "email": "email_76@skyslides.com",
              "uuid": "4f20b857-e6e2-41fa-a702-f597d1d8bf0e"
            },
            "admin": false,
            "folder_id": 13,
            "deleted": false,
            "created_at": "2013-05-02T10:15:53Z",
            "updated_at": "2013-05-02T10:15:53Z"
          }
        ]
      }
      

Errors

403:Forbidden

Create members

Url

/api/open-v1.0/folders/13/members.json

Description

This call will create a new member in the given folder ID providing one of the following: user email, uuid or id.

Version

1

Method

POST

Parameters

        member[user_email] User email
        optional
        member[user_uuid] User UUID
        optional
        member[user_id] User ID
        optional
        member[admin] User is admin (boolean, defaults to false)
        optional
      

Sample request

curl -X POST http://www.example.com/api/open-v1.0/folders/13/members.json -F 'member[user_uuid]=5ee5ad0b-2b9c-448f-871a-4444d544ecbe'

Response

The member just created.

Sample JSON response

        {
          "user": {
            "name": "User 83",
            "email": "test@test.com",
            "uuid": "5ee5ad0b-2b9c-448f-871a-4444d544ecbe"
          },
          "admin": false,
          "folder_id": 13,
          "deleted": false,
          "created_at": "2013-05-02T10:15:56Z",
          "updated_at": "2013-05-02T10:15:56Z"
        }
      

Errors

400:Unknown parameters or user not found for the provided parametersM

403:Forbidden

422:Unprocessable Entity

Delete members by UUID

Url

/api/open-v1.0/folders/13/uuids/fe86d17c-450f-48a4-b2fc-7e93da70d665.json

Description

This call will remove a member in the given folder ID by user uuid.

Version

1

Method

DELETE

Sample request

curl -X DELETE http://www.example.com/api/open-v1.0/folders/13/uuids/fe86d17c-450f-48a4-b2fc-7e93da70d665.json

Response

Empty Hash

Sample JSON response

        {
        }
      

Errors

400:Unknown parameters or user not found for the provided parameters

403:Forbidden

422:Unprocessable Entity

Delete members by ID

Url

/api/open-v1.0/folders/13/users/6.json

Description

This call will remove a member in the given folder ID by user id.

Version

1

Method

DELETE

Sample request

curl -X DELETE http://www.example.com/api/open-v1.0/folders/13/users/6.json

Response

Empty Hash

Sample JSON response

        {
        }
      

Errors

400:Unknown parameters or user not found for the provided parameters

403:Forbidden

422:Unprocessable Entity

Update members by UUID

Url

/api/open-v1.0/folders/13/uuids/51964a90-53c6-45e4-9b7f-916f47b18f48.json

Description

This call will update a member in the given folder ID by user uuid. Currently the only thing that can be updated is the 'admin' flag, so this parameter is mandatory when calling this endpoint.

Version

1

Method

PUT

Parameters

        member[admin] User is admin (boolean, defaults to false)
        mandatory
      

Sample request

curl -X PUT http://www.example.com/api/open-v1.0/folders/13/uuids/51964a90-53c6-45e4-9b7f-916f47b18f48.json -F 'member[admin]=true member[updated_by]=# member[updated_with]=Workshare-iPhone'

Response

The member just updated.

Sample JSON response

        {
          "user": {
            "name": "User 102",
            "email": "email_96@skyslides.com",
            "uuid": "51964a90-53c6-45e4-9b7f-916f47b18f48"
          },
          "admin": true,
          "folder_id": 13,
          "deleted": false,
          "created_at": "2013-05-02T10:16:06Z",
          "updated_at": "2013-05-02T10:16:06Z"
        }
      

Errors

400:Unknown parameters or user not found for the provided parameters

403:Forbidden

422:Unprocessable Entity

Update members by ID

Url

/api/open-v1.0/folders/13/users/6.json

Description

This call will update a member in the given folder ID by user id. Currently the only thing that can be updated is the 'admin' flag, so this parameter is mandatory when calling this endpoint.

Version

1

Method

PUT

Parameters

        member[admin]User is admin (boolean, defaults to false)
        mandatory
      

Sample request

curl -X PUT http://www.example.com/api/open-v1.0/folders/13/users/6.json -F 'member[admin]=true member[updated_by]=# member[updated_with]=Workshare-iPhone'

Response

The member just updated.

Sample JSON response

        {
          "user": {
            "name": "User 108",
            "email": "email_101@skyslides.com",
            "uuid": "4023718e-938e-4ffd-b0de-4a8348a1df57"
          },
          "admin": true,
          "folder_id": 13,
          "deleted": false,
          "created_at": "2013-05-02T10:16:09Z",
          "updated_at": "2013-05-02T10:16:09Z"
        }
      

Errors

400:Unknown parameters or user not found for the provided parameters

403:Forbidden

422:Unprocessable Entity

Permissions

Modify folder permissions

Url

/api/open-v1.0/folders/10/permission.json

Description

This call will change the folder permissions. One or more permissions can be updated in the same request. Valid values can be 'true' or 'false' (boolean)

Version

1

Method

PUT

Parameters

        permission[can_upload_changes] Can add versions to files in this folder
        optional
        permission[can_download_original] Can download files
        optional
        permission[can_manipulate] Can add or remove files, create subfolders and delete this folder
        optional
        permission[can_invite_with_link] Members may invite others to this folder
        optional
        permission[can_access_anonymously] Users do not need to login to access this folder
        optional
        permission[inherits_from_parent] Permissions for this folder will be inherited from the immediate parent folder
        optional
      

Sample request

curl -X PUT http://www.example.com/api/open-v1.0/folders/10/permission.json -F 'permission[can_download_original]=false permission[can_download_pdf]=true permission[can_manipulate]=false'

Response

All the permissions settings, including (if turned on) the inherits_from_parent_id attribute when the permissions are being inherited from another folder ID.

Sample JSON response

        {
          "can_download_original": false,
          "can_upload_changes": true,
          "can_view_tracking": true,
          "can_manipulate": false,
          "can_comment": true,
          "can_invite_with_link": true,
          "can_access_anonymously": false,
          "can_download_pdf": true,
          "can_delete": false,
          "inherits_from_parent": false
        }
      

Errors

403:Forbidden

422:Unprocessable Entity

UserSession

Generate a new device token and log-in the user

Url

/api/open-v1.0/user_sessions.json

Description

Given the user's email and password, and the application API key (app_uid), the server will log the user in by writing the device token into the cookie. Additionally, the device token is provided in the response.

Version

1

Method

POST

Parameters

          user_session[email] User email
          mandatory
          user_session[password] User password
          mandatory
          device[app_uid] Application API key
          mandatory in public API >= 1.0   
      

Sample request

curl -X POST http://www.example.com/api/open-v1.0/user_sessions.json -F 'user_session[email]=email_106@skyslides.com user_session[password]=password' -F 'device[app_uid]=Workshare-iPhone'

Response

A device auth token that can be used from now on to authenticate and identify the user.

Sample JSON response

        {
          "device_auth_token": "KZ1eYHfsq1oNlRhwK4kyLQ"
        }
      

Sample cookie

{"device_credentials"=>"KZ1eYHfsq1oNlRhwK4kyLQ", "_session_id"=>"5170204e2d0902a0cc3a24d664ede5a7"}

Errors

422:wrong email/password or invalid/disabled application key.

Remove the user session (log-out the user)

Url

/api/open-v1.0/logout.json

Description

This will logout the user, removing the token from the cookie.

Version

1

Method

GET

Sample request

curl -X GET 'http://www.example.com/api/open-v1.0/logout.json'

Response

Empty Hash

Sample JSON response

	      {
	      }
	      

Sample cookie

{"_session_id"=>"cc4d9fd0434a7e1161dd2b661d7030c3", "user_credentials"=>nil, "device_credentials"=>nil}