API Documentation

Workspaces /api/workspaces

The Workspaces API is available for you to create workspaces, invite others to (your) workspaces and

List workspaces

Returns all the workspaces available to you

GET /api/workspaces

Example output

[ {
    "owner" : {
       "user_since" : "2013-08-21T13:19:19Z",
       "email" : "info@organisedminds.com",
       "avatar" : {
          "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
          "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
       },
       "id" : "240587408",
       "name_or_email" : "Tester The Great",
       "last_name" : "The Great",
       "first_name" : "Tester"
    },
    "created_at" : "2013-08-21T13:19:19Z",
    "name" : "Personal workspace",
    "type" : "PersonalWorkspace",
    "id" : 3,
    "description" : null,
    "links" : [
      { "rel" : "inbox",
         "href" : "/api/workspaces/3/inbox"
      },
      { "rel" : "stacks",
        "href" : "/api/workspaces/3/stacks"
      },
      { "rel" : "outboxes",
        "href" : "/api/workspaces/3/outboxes"
      }
    ]
  },
  {
    "owner" : {
       "user_since" : "2013-08-21T13:19:19Z",
       "email" : "info@organisedminds.com",
       "avatar" : {
          "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
          "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
       },
       "id" : "a98542857",
       "name_or_email" : "Tester The Great",
       "last_name" : "The Great",
       "first_name" : "Tester"
    },
    "created_at" : "2013-09-09T10:02:02Z",
    "name" : "Workspace with others",
    "type" : "SharedWorkspace",
    "id" : 7,
    "description" : "roger that",
    "links" : [
      { "rel" : "inbox",
        "href" : "/api/workspaces/7/inbox"
      },
      { "rel" : "stacks",
        "href" : "/api/workspaces/7/stacks"
      },
      { "rel" : "outboxes",
        "href" : "/api/workspaces/7/outboxes"
      }
    ]
  } ]

Workspaces where you are invited

GET /api/workspaces/invited

Example output

[]

Get a single workspace

GET /api/workspaces/:id
  • example output*
{ "owner" : {
    "user_since" : "2013-08-21T13:19:19Z",
    "email" : "info@organisedminds.com",
    "avatar" : {
      "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
      "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
    },
    "id" : "a98542857",
    "name_or_email" : "Tester The Great",
    "last_name" : "The Great",
    "first_name" : "Tester"
  },
  "created_at" : "2013-09-09T10:02:02Z",
  "name" : "Workspace with others",
  "type" : "SharedWorkspace",
  "id" : 7,
  "description" : "roger that",
  "links" : [
    { "rel" : "inbox",
      "href" : "/api/workspaces/7/inbox"
    },
    { "rel" : "stacks",
      "href" : "/api/workspaces/7/stacks"
    },
    { "rel" : "outboxes",
      "href" : "/api/workspaces/7/outboxes"
    }
  ]
}

Create a workspace

POST /api/workspaces/:id

{ "name": "My API created workspace",
  "description": "Some workspace I created just for fun..."
  "setting" : {
    "allow_take_over_by_members": true,
    "can_change_background": false,
    "allow_invitations": true,
    "members_can_change_blocks": false,
  }
}

Creates a workspace, returns the created workspace.

The following settings are available:

  • allow_take_over_by_members : All nembers of the workspace can take over an activity from another user. Defaults to false
  • can_change_background : Members can have an own background. Defaults to true
  • allow_invitations: Members can invite other members. Defaults to true
  • members_can_change_blocks: Members can personalize the appearance of the activity window. Defaults to false

Example output

{ "owner" : {
    "user_since" : "2013-08-21T13:19:19Z",
    "email" : "info@organisedminds.com",
    "avatar" : {
      "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
      "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
    },
    "id" : "a98542857",
    "name_or_email" : "Tester The Great",
    "last_name" : "The Great",
    "first_name" : "Tester"
  },
  "created_at" : "2013-09-09T10:02:02Z",
  "name" : "My API created workspace",
  "description" : "Soem workspace I created just for fun...",
  "type" : "SharedWorkspace",
  "id" : 7,
  "links" : [
    { "rel" : "inbox",
      "href" : "/api/workspaces/7/inbox"
    },
    { "rel" : "stacks",
      "href" : "/api/workspaces/7/stacks"
    },
    { "rel" : "outboxes",
      "href" : "/api/workspaces/7/outboxes"
    }
  ]
}

Update a workspace

PUT /api/workspaces/:id

{ "setting" : {
    "allow_take_over_by_members": false,
  }
}

Updates a workspace. Returns the updated workspaces. See Create Workspace for example output.

Delete a workspace

DELETE /api/workspace/:id[?archive_items=true]

Deletes the requested workspace. If you supply ?archive_items=true the items in the workspace will be placed in your personal workspace archive.

Returns a Status: 204 if the resource has been deleted.

Create a workspace invitation

POST /api/workspaces/:id/invitation

{ "cc": true, "slug": [], "email": [ "jane@doe.example.org" ] }

Invite users to the given workspace.

If you supply anything in slug, the requested users will be sent an invitation. If any of the users do not exist, a Status: 404 is returned.

If you supply anything in email‘, the requested e-mail addresses are sent an invitation to the workspace, and if need be invited to OrganisedMinds.

If you supply cc, you will receive a Carbon-copy of the delivered e-mails

Get the workspace inbox

GET /api/workspaces/:id/inbox

Returns the inbox (and everything on it) of the workspace

Example output

{ "id" : 9,
  "rules" : [],
  "links" : [ {
     "rel" : "container",
     "href" : "/api/workspaces/3"
  } ],
  "items" : [ {
    "activity" : {
      "id" : 47,
      "name" : "console",
      "description" : null,
      "state" : "draft",
      "created_at" : "2013-10-10T08:44:32Z",
      "updated_at" : "2013-10-10T08:44:32Z",
      "priority" : {
        "created_at" : "2013-10-10T08:44:33Z",
        "options" : [
          "low",
          "normal",
          "high"
        ],
        "updated_at" : "2013-10-10T08:44:33Z",
        "value" : "normal",
        "name" : "priority",
        "id" : "525668f164fc7b9387000017"
      },
      "creator" : {
        "user_since" : "2013-08-21T13:19:19Z",
        "email" : "info@organisedminds.com",
        "avatar" : {
           "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
           "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
        },
        "id" : "a98542857",
        "name_or_email" : "Tester The Great",
        "last_name" : "The Great",
        "first_name" : "Tester"
      },
      "progress" : {
        "created_at" : "2013-10-10T08:44:34Z",
        "updated_at" : "2013-10-10T08:44:34Z",
        "value" : "0",
        "name" : "progress",
        "id" : "525668f264fc7b9387000019"
      },
      "target_date" : {
        "created_at" : "2013-10-10T08:44:33Z",
        "updated_at" : "2013-10-10T08:44:33Z",
        "time" : null,
        "name" : "deadline",
        "id" : "525668f164fc7b9387000012"
      },
      "size" : {
        "created_at" : "2013-10-10T08:44:33Z",
        "options" : [
          "small",
          "medium",
          "large"
        ],
        "updated_at" : "2013-10-10T08:44:33Z",
        "value" : "medium",
        "name" : "size",
        "id" : "525668f164fc7b9387000015"
      },
      "assignee" : {
         "user_since" : "2013-08-21T13:19:19Z",
         "email" : "info@organisedminds.com",
         "avatar" : {
            "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
        "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
         },
         "id" : "a98542857",
         "name_or_email" : "Tester The Great",
         "last_name" : "The Great",
         "first_name" : "Tester"
      },
      "alarm" : {
         "created_at" : "2013-10-10T08:44:33Z",
         "updated_at" : "2013-10-10T08:44:33Z",
         "time" : null,
         "name" : null,
         "id" : "525668f164fc7b9387000014"
      }
    }
  } ]
}

Add an item on the inbox

PUT /api/workspaces/:id/inbox

{ "type": "Activity", "id": 1000 }

Places the given item on the workspace’s inbox. Returns the updated inbox.

Get the workspace stacks

GET /api/workspaces/:id/stacks

Example output

[
  {
    "id" : 10,
    "name" : "Action",
    "description" : null,
    "links" : [
       {
          "rel" : "container",
          "href" : "/api/workspaces/3"
       }
    ],
    "items" : [
       { "activity" : {
           "id" : "2003",
           // ...
       }
    ],
  },
  {
    "name" : "Waiting",
    "id" : 11,
    "description" : null,
    "links" : [
      { "rel" : "container",
        "href" : "/api/workspaces/3"
      }
    ],
    "items" : []
  }
]

Get a single workspace stack

GET /api/workspace/:id/stacks/:id

Example output

{
  "name" : "Waiting",
  "id" : 11,
  "description" : null,
  "links" : [
    { "rel" : "container",
      "href" : "/api/workspaces/3"
    }
  ],
  "items" : [
    { "activity" : {
      "id": 47
       // ...
    } },
  ]
}

Create a workspace stack

POST /api/workspaces/:id/stacks

{ "name": "TODO", "description": "Our common todo list" }

Creates a new empty stack in the workspace. Returns the created stack.

Example output

{ "name" : "TODO",
  "id" : 228,
  "description" : "Our common todo list",
  "links" : [
    { "rel" : "container",
      "href" : "/api/workspaces/3"
    }
  ],
  "items" : []
}

Update a workspace stack

PUT /api/workspaces/:id/stacks/:id

{ "name": "DONE", "description": null }

Updates the stack, returns the updates stack.

Example output

{ "name" : "DONE",
  "id" : 228,
  "description" : null,
  "links" : [
    { "rel" : "container",
      "href" : "/api/workspaces/3"
    }
  ],
  "items" : []
}

Delete a workspace stack

DELETE /api/workspaces/:id/stacks/:id

Deletes the requested workspaces. Returns Status: 204 on success

Items on the stack will be moved to the workspace inbox.

List of workspace items

GET /api/workspace/items

Returns all the items in the workspace.

Example output

[
  { "activity" : {
    "id" : 12
    // ...
  },
  { "activity" : {
    "id" : 3408
    // ...
  }
  // ...
]

Create a workspace item

Put an existing item inside the workspace (same as PUT /api/workspaces/:id/inbox)

POST /api/workspaces/:id/items

{ "type": "Activity", "id": "2234" }

Create a new item inside the workspace (same as PUT /api/workspaces/:id/inbox)

POST /api/workspaces/:id/items

{ "type": "Activity", "name": "Created by API", "description": "I am new here" }

Returns the (created) item.

Example output

{
   "activity" : {
      "creator" : {
         "user_since" : "2013-08-21T13:19:19Z",
         "email" : "info@organisedminds.com",
         "avatar" : {
            "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
            "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
         },
         "id" : "a98542857",
         "name_or_email" : "Tester The Great",
         "last_name" : "The Great",
         "first_name" : "Tester"
      },
      "name" : "Created by API",
      "description" : "I am new here",
      "state" : "draft",
      "created_at" : "2013-12-09T15:04:49Z",
      "assignee" : {
         "user_since" : "2013-08-21T13:19:19Z",
         "email" : "info@organisedminds.com",
         "avatar" : {
            "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
            "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
         },
         "id" : "a98542857",
         "name_or_email" : "Tester The Great",
         "last_name" : "The Great",
         "first_name" : "Tester"
      },
      "updated_at" : "2013-12-09T15:04:49Z",
      "id" : 75
   },
   "links" : [
      {
         "rel" : "container",
         "href" : "/api/workspaces/3"
      },
      {
         "rel" : "inbox",
         "href" : "/api/workspaces/3/stacks/9"
      }
   ]
}
comments powered by Disqus