Stormz

Developer


Cards

Cards are one of the base ressource of Stormz.

List all cards

List the current stack of cards for the workshop.

GET /v1/workshops/:workshop_id/cards

Parameters

Name Type Description
type string filter by the type of the card (idea or cluster)
parent string filter by the parent field
aside boolean filter by the aside field

Response

200 OK
[
  {
    "id": "5007d396eb7abf319a000047",
    "short_id": "2",
    "type": "idea",
    "title": "A card title",
    "content": "A card content",
    "aside": true,
    "summary": {
      "score": 0,
      "comments": 0,
      "sections": {
      },
      "attachments": 0
    },
    "user_id": "5007d396eb7abf319a000049",
    "position": 8000
  }
]

Import cards in a workshop

Import a csv file into the workshop. It will replace all previously cards in the workshop.

PUT /v1/workshops/:workshop_id/cards

Parameters

With Content-type as multipart/form-data

Name Type Description
file file csv file

Response

204 No Content

Create a card

POST /v1/workshops/:workshop_id/cards

Parameters

Name Type Description
type string the type of the card (idea or cluster). Default to idea.
title string Required the title of the card
content string the content of the card
color string the color (only for clusters): blue, green, red, orange, purple, yellow, turquoise, rose, gray, brown, beige
aside boolean aside if true
parent string the parent card id. Required if type is idea.
position integer the position of the card in the stack

Example

{
  "title": "A card title",
  "content": "A card content",
  "aside": true
}

Response

201 Created
{
  "id": "5007d396eb7abf319a000047",
  "short_id": "2",
  "type": "idea",
  "title": "A card title",
  "content": "A card content",
  "aside": true,
  "summary": {
    "score": 0,
    "comments": 0,
    "sections": {
    },
    "attachments": 0
  },
  "user_id": "5007d396eb7abf319a000049",
  "position": 8000
}

Get a card

GET /v1/workshops/:workshop_id/cards/:id

Parameters

Name Type Description
attributes string Comma-separated values of relations to include (sections, criteria).

Response

200 OK
{
  "id": "5007d396eb7abf319a000047",
  "short_id": "2",
  "type": "idea",
  "title": "A card title",
  "content": "A card content",
  "aside": true,
  "summary": {
    "score": 0,
    "comments": 0,
    "sections": {
    },
    "attachments": 0
  },
  "user_id": "5007d396eb7abf319a000049",
  "position": 8000
}

Update a card

PUT /v1/workshops/:workshop_id/cards/:id

Parameters

Name Type Description
title string the title of the card
content string the content of the card
color string the color (only for clusters): blue, green, red, orange, purple, yellow, turquoise, rose, gray, brown, beige
aside boolean aside if true
parent string the parent card id.
position integer the position of the card in the stack

Example

{
  "title": "A new title"
}

Response

204 No Content

Delete a card

DELETE /v1/workshops/:workshop_id/cards/:id

Response

204 No Content