API Documentation

Stacks /api/stacks

The Stacks API enables you to control a single stack.

Get a single stack

GET /api/stacks/:id

Returns the stack and all the items on it

Example output

{ "id" : 19,
  "name" : "Backlog",
  "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"
      }
    }
  } ]
}

Update a stack

PUT /api/stacks/:id

{ "name": "New name for a stack" }

Updates the stack. Returns the updated stack.

Example output

{ "id" : 19,
  "name" : "New name for a stack",
  "links" : [ {
     "rel" : "container",
     "href" : "/api/workspaces/3"
  } ],
  "items" : [ {
    "activity" : {
      "id" : 47,
      // ...
    }
  } ]
}

Delete a stack

Deletes the given stack. All items are moved to the inbox.

Returns Status: 204 on success.

List of items on a stack

GET /api/stacks/:id/items

Returns the items on a stack.

Example output

[
   {
      "activity" : {
         "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
      }
   }
]

Create an item on a stack

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

POST /api/stacks/:id/items

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

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

POST /api/stacks/:id/items

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

Returns the (created) item.

{
   "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