Framebench REST API

Contents

API

All URLs start with https://lite.framebench.com/api.
SSL only please.


Files

Add a file

POST /file will upload the file to Framebench and generates a signed URL for the user to access.

Parameters

apiKey: Used to identify the referring app
email: User’s email
fileLink: Download URL of the file to be reviewed
firstName: (Optional) First Name of the user
lastName: (Optional) Last Name of the user
fileId: (Optional) Unique string used to identify the file
workspaceId: (Optional) Unique string used to identify the project
workspaceName: (Optional) Name of the project

Example
{
    apiKey: '<YOUR API KEY>',
    firstName: 'John', 
    lastName: 'Smith',
    email: 'john@smith.com',
    workspaceName: 'Project 1',
    workspaceId: 'zfrMBk6DC76mlttKhbje',
    fileLink: 'http://www.frbn.ch/fl.jpg', 
    fileId: 'ZOGbbIOZJfzQGKFDWNsi' 
}
Response

Response contains a json object containing the signed URL to be sent to the user for accessing the file

{
    "workspaceName": "Project Alpha",
    "workspaceId": "john@framebench.com",
    "fileId": "a04e6ff6b5af29dea306247d8e89c653dfadd5eb",
    "link": "signed link for the file"
}

Get file metadata

POST /file/metadata will fetch the metadata for a previously uploaded file.

Parameters

apiKey: Used to identify the referring app
fileId: Unique string used to identify the file

Example
{
    apiKey: '<YOUR API KEY>',
    fileId: 'ZOGbbIOZJfzQGKFDWNsi' 
}
Response

Response contains a json containing the file metadata

{
    height: 550,
    width: 400,
  thumbnail: ‘https://lite.framebench.com/files/ZOGbbIOZJfzQGKFDWNsi.jpg’ 
}

Get file comments

POST /file/comments will fetch the discussions for a previously uploaded file.

Parameters

apiKey: Used to identify the referring app
fileId: Unique string used to identify the file

Example
{
    apiKey: '<YOUR API KEY>',
    fileId: 'ZOGbbIOZJfzQGKFDWNsi' 
}
Response

Response contains an array json containing the discussions

[
    {
        "comment": "Example comment",
        "created_by": "john@framebench.com",
        "creation_time": "2014-11-04T08:56:51.000Z",
        "replies": []
    },
    {
        "comment": "Another comment",
        "created_by": "nina@framebench.com",
        "creation_time": "2014-11-04T08:57:00.000Z",
        "replies": [
            {
                "reply": "Text reply",
                "created_by": "john@framebench.com",
                "creation_time": "2014-11-04T09:20:12.000Z"
            },
            {
                "reply": "Another reply",
                "created_by": "andy@framebench.com",
                "creation_time": "2014-11-04T09:20:20.000Z"
            }
        ]
    }
]

Get all files

GET /files will fetch a list of files inside a workspace or that have been uploaded from the given email address.

Headers

Authorization : Your API Key

Query Parameters

Give ONLY one of the 2 parameter fields in the request.

email: Email address of the user whose files are to be fetched
or workspaceId: Workspace ID for which files are to be fetched

Response

Response contains an array json containing all the files.

[
    {
        "fileId": "56c3ea3",
        "fileName": "File 1.pdf",
    },
    {
        "fileId": "56c3ea4",
        "fileName": "File 2.jpg",
    }
]

Users

Create a user

POST /users will create a user in Framebench or update an already existing one.

Parameters

apiKey: Used to identify the referring app
email: User’s email
firstName: (Optional) First Name of the user
lastName: (Optional) Last Name of the user
userImage: (Optional) Link for the user image

Example
{
    apiKey: '<YOUR API KEY>',
    firstName: 'John', 
    lastName: 'Smith',
    email: 'john@smith.com',
    userImage: ‘https://lite.framebench.com/users/john.jpg’
}
Response

Response confirms the creation/updation of the user

Participants

Create a participant

POST /participant will create a participant in an existing workspace.

Parameters

apiKey: Used to identify the referring app
email : Participant’s email id
workspaceId: Workspace id to add the participant in
firstName: (Optional) First Name of the participant
lastName: (Optional) Last Name of the participant
userName: (Optional) User Name of the participant

Example
{
    apiKey: '<YOUR API KEY>',
    workspaceId : ‘<id of the workspace>’
    firstName: 'John', 
    lastName: 'Smith',
    email: 'john@smith.com',
    userName: ‘john.smith’
}
Response

Response contains a JSON of the structure :

{
    "participantId": "participantid",
    "email": "john@framebench.com",
    "userName": "john.smith"
}

Workspaces

Create a workspace

POST /workspace will create a workspace on Framebench.

Parameters

apiKey: Used to identify the referring app
email : Participant’s email id
workspaceId: Workspace id to add the participant in
workspaceName : Name of the workspace to be created.

Example
{
    apiKey: '<YOUR API KEY>',
    workspaceId : ‘<id of the workspace>’,
    workpaceName : ‘My workspace’,
email: 'john@smith.com'
}
Response

Response contains a JSON of the structure :

{
    "worspaceId": "workspaceid",
    "email": "john@framebench.com",
    "workspaceName": "My workspace"
}

Get all workspaces for a user

GET /workspace/ will return all the workspaces of the given email address.

Headers

Authorization : Your API Key

Query Parameters

email : User’s email id

Response

Response contains an array of workspace objects which the user is a part of. It also specifies whether the user is the ‘owner’ or a ‘participant’

[
    {
        "worspaceId": "workspaceid",
        "status": "owner/participant",
        "workspaceName": "My workspace"
    }
]

GET /workspace/<id> will return the link to the workspace on Framebench.

id: The workspace id to be fetched

Headers

Authorization : Your API Key

Query Parameters

email : Participant’s email id

Response

Response contains a JSON of the structure :

{
    "workspaceLink": "https://lite.framebench.com/wname"
}