API Documentation

Activities /api/activities

With the Activities API you can take full control of OrganisedMinds from within your own applications.

Available Actions The actions (start, pause, finish, etc.) that are available on an activity are always presented within the resource’s links under the appropriate rel

Get a list of activities

GET /api/activities

Example output

[
   {
      "priority" : {
         "created_at" : "2013-08-22T08:05:20Z",
         "options" : [
            "low",
            "normal",
            "high"
         ],
         "updated_at" : "2013-08-22T08:05:20Z",
         "value" : "normal",
         "name" : "priority",
         "id" : "5215c64064fc7b3d6f00000a"
      },
      "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-08-22T08:05:20Z",
         "updated_at" : "2013-08-22T08:05:20Z",
         "value" : "0",
         "name" : "progress",
         "id" : "5215c64064fc7b3d6f00000b"
      },
      "target_date" : {
         "created_at" : "2013-08-22T08:05:20Z",
         "updated_at" : "2013-08-22T08:05:20Z",
         "time" : null,
         "name" : "deadline",
         "id" : "5215c64064fc7b3d6f000007"
      },
      "name" : "Pay hh",
      "description" : "This foo has been approved and can be payed.",
      "size" : {
         "created_at" : "2013-08-22T08:05:20Z",
         "options" : [
            "small",
            "medium",
            "large"
         ],
         "updated_at" : "2013-08-22T08:05:20Z",
         "value" : "medium",
         "name" : "size",
         "id" : "5215c64064fc7b3d6f000009"
      },
      "state" : "finished",
      "created_at" : "2013-08-22T08:05:19Z",
      "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-08-22T09:11:34Z",
      "alarm" : {
         "created_at" : "2013-08-22T08:05:20Z",
         "updated_at" : "2013-08-22T08:05:20Z",
         "time" : null,
         "name" : null,
         "id" : "5215c64064fc7b3d6f000008"
      },
      "id" : 1,
      "result" : {
         "id" : "5215d5c664fc7bf682000004",
         "user_id" : 3,
         "result" : null
      }
   },
   {
      "priority" : {
         "created_at" : "2013-08-22T08:05:22Z",
         "options" : [
            "low",
            "normal",
            "high"
         ],
         "updated_at" : "2013-08-22T08:05:22Z",
         "value" : "normal",
         "name" : "priority",
         "id" : "5215c64264fc7ba4e6000012"
      },
      "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-08-22T08:05:22Z",
         "updated_at" : "2013-08-22T08:05:22Z",
         "value" : "0",
         "name" : "progress",
         "id" : "5215c64264fc7ba4e6000013"
      },
      "target_date" : {
         "created_at" : "2013-08-22T08:05:21Z",
         "updated_at" : "2013-08-22T08:05:21Z",
         "time" : "2013-08-27T08:05:17+00:00",
         "name" : "deadline",
         "id" : "5215c64164fc7ba4e600000e"
      },
      "name" : "Invoice 873870001 from Acme Toy Company",
      "description" : "Please pay before 27/08",
      "size" : {
         "created_at" : "2013-08-22T08:05:21Z",
         "options" : [
            "small",
            "medium",
            "large"
         ],
         "updated_at" : "2013-08-22T08:05:21Z",
         "value" : "medium",
         "name" : "size",
         "id" : "5215c64264fc7ba4e6000011"
      },
      "state" : "delegated",
      "created_at" : "2013-08-22T08:05:19Z",
      "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-08-22T08:05:22Z",
      "alarm" : {
         "created_at" : "2013-08-22T08:05:21Z",
         "updated_at" : "2013-08-22T08:05:21Z",
         "time" : null,
         "name" : null,
         "id" : "5215c64164fc7ba4e600000f"
      },
      "id" : 2
   }
]

Get a single activity

GET /api/activities/:id

Example output

{
   "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"
   },
   "name" : "console",
   "description" : null,
   "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"
   },
   "state" : "draft",
   "created_at" : "2013-10-10T08:44:32Z",
   "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-10-10T08:44:32Z",
   "alarm" : {
      "created_at" : "2013-10-10T08:44:33Z",
      "updated_at" : "2013-10-10T08:44:33Z",
      "time" : null,
      "name" : null,
      "id" : "525668f164fc7b9387000014"
   },
   "id" : 47,
   "links" : [
      {
         "rel" : "self",
         "href" : "https://app.organisedminds.com/api/activities/47"
      },
      {
         "rel" : "container",
         "href" : "/api/workspaces/3"
      },
      {
         "rel" : "play",
         "href" : "/api/v1/activities/47/play"
      },
      {
         "rel" : "delete",
         "href" : "/api/v1/activities/47/delete"
      },
      {
         "rel" : "move",
         "href" : "/api/v1/activities/47/move"
      }
   ]
}

Update an activity

PUT /api/activities/:id

{ "name":"Say my name","description":"<p>html enabled description</p>" }

Returns the updated activity

Update an activities extended attributes

Activities have extended attributes (the ones shown on the right side of the activity window in the app). These attributes, otherwise known as Blox, should be updated seperatly.

At the time of writing, the following Blox are available:

  • Target date
  • Alarm
  • Size
  • Priority
  • Progess
  • Result

Assume we want to update the Priority. Within the activity it is presented as follows: (also see above)

{
   "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"
   },
   // ...
}

To update this attribute we should call the API with a new value.

Example call

PUT /api/activities/47/blox/525668f164fc7b9387000017

{ "value":"high" }

Example output

{
   "created_at" : "2013-10-10T08:44:33Z",
   "options" : [
      "low",
      "normal",
      "high"
   ],
   "updated_at" : "2013-12-10T09:30:44Z",
   "value" : "high",
   "name" : "priority",
   "id" : "525668f164fc7b9387000017"
}

Avaible attributes

You can only update these attributes:

  • name
  • value
  • time

If the Blox supplies an options list, the value must be within the list.

Delete an activity

DELETE /api/activities/:id

Returns Status: 204 on success.

Create an activity

POST /api/activities

{ "name": "A new activity", "description": "<h3>Do it right</h3><p>ok?</p>",
  "target_date":"2013-10-10T08:00:00Z", "alarm":"2013-10-03T08:00:00Z" }

Returns the created activity

You can supply target_date and alarm directly on create as a bonus.

Start an activity

PUT /api/activities/:id/play

Bring an activity in to play. The state of the activity should be paused, finished or draft to allow this action

Returns the updated activity

Pause an activity

PUT /api/activities/:id/pause

Returns the updated activity

Finish an activity

PUT /api/activities/:id/finish

Returns the updated activity

Sign off on an activity

Approve the results of an activity you have previously delegated with sign-off

Returns the updated activity

Reject to sign off on an activity

Reject the results of an activity you have previously delegated with sign-off

PUT /api/activities/:id/reject

Returns the updated activity

Accept an activity delegation

Accept the delegated activity.

PUT /api/activities/:id/accept

Returns the updated activity

Decline an activity

Decline the delegated activity

PUT /api/activities/:id/decline

Returns the updated activity

Delegate an activity

(Re)delegate an activity to another user.

PUT /api/activities/:id/delegate

Returns the updated activity

Take back an activity

Take back an activity where you where the previous assignee

PUT /api/activities/:id/take_back

Returns the updated activity

Take over an activity

Take over an activity from another user.

PUT /api/activities/:id/take_over

Returns the updated activity

Move an activity

Move an activity to another workspace.

PUT /api/activities/:id/delegate

Returns the updated activity

comments powered by Disqus