Skillhive Developers

Swarm Checklists

Get checklists through the Skillhive API

List Swarm Checklists

Endpoint: /api/swarm/:swarm_id/checklist/

Fetch checklists in a swarm

Method Action Parameters
GET Get swarm checklists
  • Offset: int fetch checklists starting from (optional, default: 0)
  • Limit: int how many checklists to get (optional, default: 20, limit 0-50)

An example of a return response:

{
  "limit":20,
  "offset":0,
  "previous":null,
  "next":"/api/swarm/67521/checklist/?offset=20&limit=20",
  "total_count":3,
  "collection": [
    {
      "id":8989,
      "uri":"/api/swarm/67521/checklist/8989/"
      "title":"My ToDos",
      "user":{                 // The user who created the Checklist
        "id":765,
        "uri":"/api/user/765/",
        "name":"User Name",
        "icon_url":"https://company.skillhive.com/user/765/icon"
      },
      "assigned_to":{          // This is an optional value. It can be
        "id":765,              // null or point to an existing user.
        "uri":"/api/user/765/",
        "name":"User Name",
        "icon_url":"https://company.skillhive.com/user/765/icon"
      },
      "resources": {
        "items": "/api/swarm/67521/checklist/8989/item/"
      }
      "created_at":
      "updated_at":
    },
    {
      "id":8998,
      "uri":"/api/swarm/67521/checklist/8998/"
      "title":"Check these out",
      "user":{                 // The user who created the Checklist
        "id":168,
        "uri":"/api/user/168/",
        "name":"User Name",
        "icon_url":"https://company.skillhive.com/user/168/icon"
      },
      "assigned_to":null,      // This is an optional value. Null if not set.
      "resources": {
        "items": "/api/swarm/67521/checklist/8989/item/"
      },
      "created_at":
      "updated_at":
    },
    ...
  ]
}

Create a Checklist

Endpoint: /api/swarm/:swarm_id/checklist/

Create a new checklist in swarm.

Method Action Parameters
POST Create a new Checklist
  • title: string The title of the Checklist (required)
  • assigned_to: int | hash The user id, or a hash including user id for the user this checklist is assigned to (optional)
  • copy_from: int Checklist id for copying the items (optional)

If the checklist is succesfully created, the created checklist will be returned. For instance:

{
  "id":8989,
  "uri":"/api/swarm/67521/checklist/8989/"
  "title":"My ToDos",
  "user":{                 // The user who created the Checklist
    "id":765,
    "uri":"/api/user/765/",
    "name":"User Name",
    "icon_url":"https://company.skillhive.com/user/765/icon"
  },
  "assigned_to":{          // This is an optional value. It can be
    "id":765,              // null or point to an existing user.
    "uri":"/api/user/765/",
    "name":"User Name",
    "icon_url":"https://company.skillhive.com/user/765/icon"
  },
  "resources": {
    "items": "/api/swarm/67521/checklist/8989/item/"
  }
  "created_at":
  "updated_at":
}

Get a single Checklist

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id

Get a single checklist identified by checklist_id.

Method Action Parameters
GET Get a Checklist N/A

Return the checklist, for instance:

{
  "id":8989,
  "uri":"/api/swarm/67521/checklist/8989/"
  "title":"My ToDos",
  "user":{                 // The user who created the Checklist
    "id":765,
    "uri":"/api/user/765/",
    "name":"User Name",
    "icon_url":"https://company.skillhive.com/user/765/icon"
  },
  "assigned_to":{          // This is an optional value. It can be
    "id":765,              // null or point to an existing user.
    "uri":"/api/user/765/",
    "name":"User Name",
    "icon_url":"https://company.skillhive.com/user/765/icon"
  },
  "resources": {
    "items": "/api/swarm/67521/checklist/8989/item/"
  }
  "created_at":
  "updated_at":
}

Update a Checklist

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id

Update an existing checklist identified by checklist_id.

Method Action Parameters
PUT Update a Checklist
  • title: string The title of the Checklist (required)
  • assigned_to: int | hash The user id, or a hash including user id for the user this checklist is assigned to (optional)

If the checklist is succesfully updated, the updated checklist will be returned. For instance:

{
  "id":8989,
  "uri":"/api/swarm/67521/checklist/8989/"
  "title":"My ToDos",
  "user":{                 // The user who created the Checklist
    "id":765,
    "uri":"/api/user/765/",
    "name":"User Name",
    "icon_url":"https://company.skillhive.com/user/765/icon"
  },
  "assigned_to":{          // This is an optional value. It can be
    "id":765,              // null or point to an existing user.
    "uri":"/api/user/765/",
    "name":"User Name",
    "icon_url":"https://company.skillhive.com/user/765/icon"
  },
  "resources": {
    "items": "/api/swarm/67521/checklist/8989/item/"
  }
  "created_at":
  "updated_at":
}

Delete a Checklist

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id

Delete an existing checklist identified by checklist_id. This will delete all items in this checklist as well.

Method Action Parameters
DELETE Delete a Checklist N/A

If the checklist is succesfully deleted, the server will return a HTTP Response with status code 200.

List Checklist Items

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id/item/

Fetch items in a checklist.

Method Action Parameters
GET Get items in a checklist
  • Offset: int fetch checklists starting from (optional, default: 0)
  • Limit: int how many checklists to get (optional, default: 20, limit 0-50)

An example of a return response:

{
  "limit":20,
  "offset":0,
  "previous":null,
  "next":"/api/swarm/67521/checklist/24/item/?offset=20&limit=20",
  "total_count":26,
  "collection": [
    {
      "id": 22,
      "title": "First task",
      "uri": "/api/swarm/14548/checklist/24/item/22",
      "user": {                        // The user who created the item
        "id": "123",
        "name": "Jaakko Naakka",
        "uri": "/api/user/123",
        "icon_url": "https://company.skillhive.com//user/123/icon/"
      },
      "checklist": {   // The checklist this item belongs to
        "id": "24",
        "uri": "/api/swarm/14548/checklist/24"
      },
      "completed_by": {   // Either null or user who marked this item completed
        "id": "123",
        "name": "Jaakko Naakka",
        "uri": "/api/user/123",
        "icon_url": "https://company.skillhive.com//user/123/icon/"
      },
      "completed_at": {   // Either null or timestamp when the item was completed
        "date": "Thu, 3 Mar 2014 10:45:29 +0200",
        "friendly_time": "yesterday",
        "date_local": "2014-3-3"
      },
      "created_at": {
        "date": "Wed, 30 Jan 2014 12:37:47 +0200",
        "friendly_time": "33 days ago",
        "date_local": "2014-1-30"
      },
      "updated_at": {
        "date": "Thu, 3 Mar 2014 10:45:29 +0200",
        "friendly_time": "yesterday",
        "date_local": "2014-3-3"
      },
    ...
  ]
}

Create a new Checklist Item

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id/item/

Fetch items in a checklist.

Method Action Parameters
POST Create a new checklist item
  • title: string The title of the checklist item (required)

If the checklist item is succesfully created, the created item will be returned. For instance:

{
  "id": 22,
  "title": "First task",
  "uri": "/api/swarm/14548/checklist/24/item/22",
  "user": {                        // The user who created the item
    "id": "123",
    "name": "Jaakko Naakka",
    "uri": "/api/user/123",
    "icon_url": "https://company.skillhive.com//user/123/icon/"
  },
  "checklist": {   // The checklist this item belongs to
    "id": "24",
    "uri": "/api/swarm/14548/checklist/24"
  },
  "completed_by":null,
  "completed_at":null,
  "created_at": {
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
  },
  "updated_at": {
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
}

Get a single Checklist Item

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id/item/:item_id

Get a single checklist item identified by item_id.

Method Action Parameters
GET Get a single checklist item N/A

Get a single checklist item, for instance:

{
  "id": 22,
  "title": "First task",
  "uri": "/api/swarm/14548/checklist/24/item/22",
  "user": {                        // The user who created the item
    "id": "123",
    "name": "Jaakko Naakka",
    "uri": "/api/user/123",
    "icon_url": "https://company.skillhive.com//user/123/icon/"
  },
  "checklist": {   // The checklist this item belongs to
    "id": "24",
    "uri": "/api/swarm/14548/checklist/24"
  },
  "completed_by": {   // Either null or user who marked this item completed
    "id": "123",
    "name": "Jaakko Naakka",
    "uri": "/api/user/123",
    "icon_url": "https://company.skillhive.com//user/123/icon/"
  },
  "completed_at": {   // Current server time
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
  },
  "created_at": {
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
  },
  "updated_at": {
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
}

Update a Checklist Item

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id/item/:item_id

Update a checklist item identified by item_id.

Method Action Parameters
PUT Update a checklist item
  • title: string The title of the checklist item (required)
  • completed_at: string This can be a boolean or a timestamp or a date string. The completed_at timestamp will always be saved as the current time of the server (optional).

If the checklist item is succesfully update, the updated item will be returned. The user who set the item completed is always the currently loggedin user. An example of the returned item:

{
  "id": 22,
  "title": "First task",
  "uri": "/api/swarm/14548/checklist/24/item/22",
  "user": {                        // The user who created the item
    "id": "123",
    "name": "Jaakko Naakka",
    "uri": "/api/user/123",
    "icon_url": "https://company.skillhive.com//user/123/icon/"
  },
  "checklist": {   // The checklist this item belongs to
    "id": "24",
    "uri": "/api/swarm/14548/checklist/24"
  },
  "completed_by": {   // Either null or user who marked this item completed
    "id": "123",
    "name": "Jaakko Naakka",
    "uri": "/api/user/123",
    "icon_url": "https://company.skillhive.com//user/123/icon/"
  },
  "completed_at": {   // Current server time
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
  },
  "created_at": {
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
  },
  "updated_at": {
    "date": "Fri, 30 Jan 2014 12:37:47 +0200",
    "friendly_time": "just now",
    "date_local": "2014-1-30"
}

Delete a Checklist Item

Endpoint: /api/swarm/:swarm_id/checklist/:checklist_id/item/:item_id

Delete a checklist item identified by item_id.

Method Action Parameters
DELETE Delete a Checklist Item N/A

If the item is succesfully deleted, the server will return a HTTP Response with status code 200.