CardBoard API Documentation (Beta)

Welcome to the CardBoard API documentation! Here you can find information on how to interact with the API.

Before you start, talk to you CardBoard community admin about enabling the API. The admin can do this by going to “Manage Your Community”, then select API. Select the checkbox that says “Enable the API for your community”.

You will also need to record the Bearer token. The Bearer token is used to authenticate your calls to the API.

Cards

Create a new card

Endpoint

POST api/maps/:map_id/cards/

Parameters

Name Description
map_id The id of the map which you would like to view the cards of
x required The x coordinate that you would like the card to have
y required The y coordinate that you would like the card to have
name The text you would like to view on the card
color_name The color of the card, must be one of the following: "purple", "orange", "yellow", "warning", "green", "blue", "pink", "white", "red"
description A longer description of the card, viewed when you click on it
annotation Integer enum for the annotation types (none: 0, question: 1, discuss: 2, lame: 3, blocked: 4, remove: 5)

Request

Route

POST api/maps/9447/cards/

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTpmMzNlY2QzYWM1MzgzODdjN2M1ZGM1YmUwZTVkMDE5Zg
Content-Type: application/json
Host: example.org
Cookie: 

Body

{
  "x": 2,
  "y": 3,
  "name": "Design a flawless API",
  "color_name": "green",
  "description": "In order to allow customers to connect any of their own automated services to Cardboard, we should create an API that allows customers to scrape data whenever they want.",
  "annotation": 2
}

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"929be6dc824338ebd7ba3878096217f9"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=ZllxQm9GeThncytpa0Q5UllBdUVueUF6a2EzMzVLU25Ta2tnZWZ3U0hYdWxHYWxRcTZFWFJSUGxoQXYxRlBCRDQrQVFWUnlRNFJpcXd0eEVjNUtmWTc4Z3VwUzFOZ1BRTkJhaDJmVzRwcW89LS1Cc3FtcTZOZDBsTjB0ZjJLS0VRaG5nPT0%3D--6453567ada74983ef5247d03ba34c3704b9b4ff3; path=/; HttpOnly
X-Request-Id: 897ebac7-4d26-4a48-a2a8-b05abac495f0
X-Runtime: 0.022616
Content-Length: 443

Body

{
  "id": 5766,
  "name": "Design a flawless API",
  "version": 5,
  "uuid": "b91f9cf0-b866-0136-9686-34f64ba2347e",
  "x": 2,
  "y": 3,
  "color_name": "green",
  "description": "In order to allow customers to connect any of their own automated services to Cardboard, we should create an API that allows customers to scrape data whenever they want.",
  "annotation": "discuss",
  "created_at": "2018-10-22T20:26:47.442Z",
  "updated_at": "2018-10-22T20:26:47.442Z",
  "has_comments": false
}

Destroying cards

Endpoint

DELETE /api/maps/{map_id}/cards/{id}

Request

Route

DELETE /api/maps/9449/cards/5768

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTpkYjRmNmM4MGFkYWE5OGUyMDc1YjBhYzBhZGNhN2RiYg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/html
Cache-Control: no-cache
Set-Cookie: _cardmap_session=UzQxMzdTR1IrT0Q0WnMxaVUwU1pNOXRTRHd6Vi9ZeElNZUwwRDBTTnNFZWZpTFhMNERUUFB0MzIzOVZXcUdpZitURWZCYTlrRzFDQi9OWnRMeS85TitoREM3SStIbmdBOEovbHpwT3F0b0U9LS14NWdvZm1ucThHYk5JQVhzL05wMTR3PT0%3D--ab18c96b06ee7f1c7c5bacd5eb84063e2b8ee572; path=/; HttpOnly
X-Request-Id: 26637212-55c5-4aa5-967e-2f1a2e929e27
X-Runtime: 0.013928
Content-Length: 0

Getting cards

Endpoint

GET /api/maps/{map_id}/cards/{id}

Request

Route

GET /api/maps/9446/cards/5764

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTo0M2U0NTU1MmRlYmU1MWY5NjAyYmJiZTU4NDZjNmY4Mw
Host: example.org
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"895c31b91893028cbdf5d572366beb68"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=UUdZdTlGdWRhcjd6UlgrWHZYN0Nrcmtsc0UwSVp1ejRPME83WFN2NWhCSWZXNXhaeFdVaVdyRStSUE1hSUYxeStZZEVYL1BTS1ZEQWRzZlBNUlJZZURUb04vRHlPbG1Xc1FiSGUxU3cvRzQ9LS1ScDJCTUdIdGpEc1BwMEpXL1JmelRRPT0%3D--2b02cbff1f984de447cfd350b8527dcc96fa50fe; path=/; HttpOnly
X-Request-Id: 41ad75a0-6350-4f2f-b432-6675085fdd52
X-Runtime: 0.007956
Content-Length: 319

Body

{
  "id": 5764,
  "name": "Test card",
  "version": 4,
  "uuid": "b915d0d0-b866-0136-9686-34f64ba2347e",
  "x": 0,
  "y": 0,
  "color_name": "blue",
  "description": "this is indeed the card that is known as test",
  "status": "none",
  "annotation": "none",
  "created_at": "2018-10-22T20:26:47.380Z",
  "updated_at": "2018-10-22T20:26:47.380Z",
  "has_comments": false
}

Listing cards

Endpoint

GET /api/maps/{map_id}/cards

Request

Route

GET /api/maps/9445/cards

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbToyNWQ5NzUwZWQ1MzQxNjcxMWIyM2MwYTU3MjRiZDgxNw
Host: example.org
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"2316b1920b6b21a2e329094abbacfbe3"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=a2hRZnNMd09RNnpkbzhFZmJpRzNsSXVFQXhkRXFXa3lodisrOGJPTU1lcmRaWHBLT1Y3STd3K0Q2NTZoSVFrTW13OENtVEJZUDJ3WXBnenFSby9kSDl5Um1ZeC9pNFNlMmdFem1BWCtHNjg9LS1YaXRhWmVQb3l6SGQ2djdLRE50YXZnPT0%3D--60ee9076f8ede1e207cdc63049ede19054b3e41e; path=/; HttpOnly
X-Request-Id: 55dcf4f8-9c92-447a-841f-e555ae06b2dc
X-Runtime: 0.062492
Content-Length: 3274

Body

[
  {
    "id": 5763,
    "name": "Example card: 13",
    "version": 18,
    "uuid": "b906c390-b866-0136-9686-34f64ba2347e",
    "x": 4,
    "y": 3,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.279Z",
    "updated_at": "2018-10-22T20:26:47.279Z",
    "has_comments": false
  },
  {
    "id": 5762,
    "name": "Example card: 12",
    "version": 17,
    "uuid": "b9063e20-b866-0136-9686-34f64ba2347e",
    "x": 5,
    "y": 7,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.276Z",
    "updated_at": "2018-10-22T20:26:47.276Z",
    "has_comments": false
  },
  {
    "id": 5761,
    "name": "Example card: 11",
    "version": 16,
    "uuid": "b905be30-b866-0136-9686-34f64ba2347e",
    "x": 1,
    "y": 2,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.272Z",
    "updated_at": "2018-10-22T20:26:47.272Z",
    "has_comments": false
  },
  {
    "id": 5760,
    "name": "Example card: 10",
    "version": 15,
    "uuid": "b9053630-b866-0136-9686-34f64ba2347e",
    "x": 3,
    "y": 0,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.269Z",
    "updated_at": "2018-10-22T20:26:47.269Z",
    "has_comments": false
  },
  {
    "id": 5759,
    "name": "Example card: 9",
    "version": 14,
    "uuid": "b904b300-b866-0136-9686-34f64ba2347e",
    "x": 1,
    "y": 0,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.265Z",
    "updated_at": "2018-10-22T20:26:47.265Z",
    "has_comments": false
  },
  {
    "id": 5758,
    "name": "Example card: 8",
    "version": 13,
    "uuid": "b9042370-b866-0136-9686-34f64ba2347e",
    "x": 5,
    "y": 8,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.262Z",
    "updated_at": "2018-10-22T20:26:47.262Z",
    "has_comments": false
  },
  {
    "id": 5757,
    "name": "Example card: 7",
    "version": 12,
    "uuid": "b9039fa0-b866-0136-9686-34f64ba2347e",
    "x": 7,
    "y": 9,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.259Z",
    "updated_at": "2018-10-22T20:26:47.259Z",
    "has_comments": false
  },
  {
    "id": 5756,
    "name": "Example card: 6",
    "version": 11,
    "uuid": "b9030eb0-b866-0136-9686-34f64ba2347e",
    "x": 0,
    "y": 5,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.255Z",
    "updated_at": "2018-10-22T20:26:47.255Z",
    "has_comments": false
  },
  {
    "id": 5755,
    "name": "Example card: 5",
    "version": 10,
    "uuid": "b90286a0-b866-0136-9686-34f64ba2347e",
    "x": 2,
    "y": 1,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.251Z",
    "updated_at": "2018-10-22T20:26:47.251Z",
    "has_comments": false
  },
  {
    "id": 5754,
    "name": "Example card: 4",
    "version": 9,
    "uuid": "b90202b0-b866-0136-9686-34f64ba2347e",
    "x": 5,
    "y": 6,
    "color_name": "blue",
    "description": "this is indeed the card that is known as test",
    "status": "none",
    "annotation": "none",
    "created_at": "2018-10-22T20:26:47.248Z",
    "updated_at": "2018-10-22T20:26:47.248Z",
    "has_comments": false
  }
]

Update a card

Endpoint

PATCH api/maps/{map_id}/cards/{id}

Parameters

Name Description
map_id The id of the map which you would like to view the cards of
id The id of the card that you would like to update
x required The x coordinate that you would like the card to have
y required The y coordinate that you would like the card to have
name The text you would like to view on the card
color_name The color of the card, must be one of the following: "purple", "orange", "yellow", "warning", "green", "blue", "pink", "white", "red"
description A longer description of the card, viewed when you click on it
annotation Integer enum for the annotation types (none: 0, question: 1, discuss: 2, lame: 3, blocked: 4, remove: 5)

Request

Route

PATCH api/maps/9448/cards/5767

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbToxNjRhMDgwYTAyYjRkMmNmMzI2NmM0YjYxNmEzMWE5Ng
Content-Type: application/json
Host: example.org
Cookie: 

Body

{
  "map_id": 9448,
  "id": 5767,
  "x": 2,
  "y": 3,
  "name": "Design a flawless API",
  "color_name": "green",
  "description": "In order to allow customers to connect any of their own automated services to Cardboard, we should create an API that allows customers to scrape data whenever they want.",
  "annotation": 2
}

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"205caa28e0a4019eae6b165cc5be0d8f"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=M1h3Mml0UE0wTVBDOW5DdjdOSGtPZ29sWkpNcUxYOVB5VENZZG0rQlVKV01PRzVnaHEvVmsvV0xuTUM4WjdoOWF4U0RkOWFYbDV1eXQ2YTU5WUxScWxkNXhmV1drSTJLMkpxTHZmRXRLc1E9LS12cFBTeHdpc3dueURFcFhuY1U2UDlnPT0%3D--3c31dab03ea19e9f8ee4923cd7c180a46538e2c4; path=/; HttpOnly
X-Request-Id: 9896da94-ea73-462e-8bbc-a354af3f88b0
X-Runtime: 0.012505
Content-Length: 459

Body

{
  "id": 5767,
  "name": "Design a flawless API",
  "version": 5,
  "uuid": "b9240d80-b866-0136-9686-34f64ba2347e",
  "x": 2,
  "y": 3,
  "color_name": "green",
  "description": "In order to allow customers to connect any of their own automated services to Cardboard, we should create an API that allows customers to scrape data whenever they want.",
  "status": "none",
  "annotation": "discuss",
  "created_at": "2018-10-22T20:26:47.471Z",
  "updated_at": "2018-10-22T20:26:47.486Z",
  "has_comments": false
}

Maps

Create a new map

Endpoint

POST api/maps

Parameters

Name Description
name required The Map name
public_read required The option to let other non-organization individuals see the map
collaborators Objects of user ids that specify all the users in the same organization who should have access to changing the map
organization_id The organization (community) id that a user would want to assign this map to

Request

Route

POST api/maps

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTphNjQ1OTI4N2Y4N2NlNGY2MzAzYWVkNDI0ZGRhNmNmNQ
Content-Type: application/json
Host: example.org
Cookie: 

Body

{
  "name": "Map",
  "public_read": true,
  "collaborators": [
    {
      "id": 11023
    }
  ],
  "organization_id": 2768
}

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"4a576379170d1a7e7d20baceb9917537"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=c3JXNDZYRzhacDhrWUtyenprL2dvakpFTGcvc3ZOOFJFclo1UUp2OHI3UklKTUV0RnF6cGpBalBMVXMrQmhjMDNWenpHZ3Y5OEtiNk03WW01dStrNktXVXJET2FNUm5lMXBwUnpZT3doNnM9LS1OdHQvRHVXU2ptck5MMWlmNE5YcVJnPT0%3D--b2e8af305a5e7b4b83a4e39c76bd108800a5a425; path=/; HttpOnly
X-Request-Id: 2e47ea74-18cd-4541-b48d-f63e4d60e37e
X-Runtime: 0.024707
Content-Length: 259

Body

{
  "id": 9463,
  "name": "Map",
  "version": 1,
  "cards": [

  ],
  "slices": [

  ],
  "dividers": [

  ],
  "collaborators": [
    {
      "id": 11022
    },
    {
      "id": 11023
    }
  ],
  "stickers": [

  ],
  "owner_id": 11022,
  "public": true,
  "created_at": "2018-10-22T20:26:47.773Z",
  "updated_at": "2018-10-22T20:26:47.773Z",
  "community": 2768
}

Destroying maps

Endpoint

DELETE /api/maps/{id}

Request

Route

DELETE /api/maps/9465

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTphYTI5YzkxOGM2YTViMjBhOGI2YjIwNTMyZDM1MzM4Zg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/html
Cache-Control: no-cache
Set-Cookie: _cardmap_session=UmFNZXFSbmdpRnFNbTRoQndaUGYvaWpOaGR4c3FzMUJIUGVabVhubXB1TGRoaVdTd1pvTFdSZEZwdlRtQ0E1K0F3WHBza0o0cW55VVRTNzRaa295S3Q4VG1pUnJkM3RmZEdyZWt2Z1lOYkE9LS0yak5acVBMYXpwWDNORTdDdVFWVE9nPT0%3D--6605c04eacb7f04622e492e9ded7a44852fdeb24; path=/; HttpOnly
X-Request-Id: fc98d314-60a5-4fd5-bec9-92924a19f538
X-Runtime: 0.034136
Content-Length: 0

Getting maps

Endpoint

GET /api/maps/{id}

Request

Route

GET /api/maps/9461

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTphYmNhOGE5ZTFiMzZjZTE4ZTczOThlZmU0M2JjNGEyMQ
Host: example.org
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"2dce58ce02fac727751cdb186cdfd374"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=WnBLTTFNYndyUk8vL3Y0OE40dkdOOWNQUXVoYlpVOWhWektsT2t6QmdaU2ZueXptMWJGdmNKcEpvMGU0cnZ4ZmI0YXRmOExteXVRa09NZ1l0SjdSdG5zRlZtN1hSWjJLdWZJMlJFOVJuMTg9LS10YlBXeEhLZE5QeGc5NVJnYnpicUZBPT0%3D--73109553c36fb3388a31cad3dffe2d4c1de16359; path=/; HttpOnly
X-Request-Id: 32713419-f069-47a8-9fd0-057efde881f6
X-Runtime: 0.014036
Content-Length: 223

Body

{
  "id": 9461,
  "name": "Example Map",
  "version": 3,
  "cards": [

  ],
  "slices": [

  ],
  "dividers": [

  ],
  "collaborators": [
    {
      "id": 11021
    }
  ],
  "stickers": [

  ],
  "owner_id": 11021,
  "created_at": "2018-10-22T20:26:47.711Z",
  "updated_at": "2018-10-22T20:26:47.711Z"
}

Listing maps

Endpoint

GET /api/maps

Parameters

Name Description
page Paginate the response, by default paged to 10 entries. Can also be passed as /maps/page/{page-number}

Request

Route

GET /api/maps?page=2

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbToyODMzMTVjYjI3NTkzYmM3OTE5ZmMyM2ExZDM4YmM4OA
Host: example.org
Cookie: 

Query Parameters

page=2

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"63d23e028a6d57cda7ef875337d4defd"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=MFVQZS9KRFI0KzUxblBBcEw5SzhlY0J5dWNuaU1Wa3pHZWZPTVlJZWRwbUFpU0d3N1NRRFcyRUFSQnB3MFhxcHlYaUJsMjJiMzdnaFdSSE5Ha0JJbzh5bVBYTmd4VTZZMXFPVmd1cldBVk09LS1sMnQ5dEdJSU9ZMlc4a2tPSWdxaVFnPT0%3D--c34eb7db3f4655e989123d37f418b6058bdf8b77; path=/; HttpOnly
X-Request-Id: 2898e5e3-0966-420a-a466-a1c87a366ab1
X-Runtime: 0.106512
Content-Length: 225

Body

[
  {
    "id": 9450,
    "name": "Example Map",
    "version": 3,
    "cards": [

    ],
    "slices": [

    ],
    "dividers": [

    ],
    "collaborators": [
      {
        "id": 11020
      }
    ],
    "stickers": [

    ],
    "owner_id": 11020,
    "created_at": "2018-10-22T20:26:47.543Z",
    "updated_at": "2018-10-22T20:26:47.543Z"
  }
]

Updating a map

Endpoint

PATCH api/maps/{id}

Parameters

Name Description
name The Map name
public_read The option to let other non-organization individuals see the map (defaults to false)
collaborators Objects of user ids that specify all the users in the same organization who should have access to changing the map
organization_id The organization (community) id that a user would want to assign this map to

Request

Route

PATCH api/maps/9464

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTo3OTgwZDAwOGQ5MzVkNjAyOTE5NjIxMzM3NjJkYjcyNw
Content-Type: application/json
Host: example.org
Cookie: 

Body

{
  "name": "Map",
  "public_read": true,
  "collaborators": [
    {
      "id": 11025
    }
  ],
  "organization_id": 2769
}

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"ab203494ffd90d95bc253f4be01b5e08"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=ZUZBQThDUXJKR2UvM1hjVmdXNHQ4bkVZTzRQcThqTytjQkhvT2tQNDNmeWd5ODN6bjVxOFFKaE9DcFNlR0kxRUV6VkNranI2YnNCR1JtbDZpSkVvQm9WWEJDWGZ5eU9ZVXVxWVZvMVpGRzA9LS1OM0VjY3U3Nml0N3Y2dkYzQXg4aFJBPT0%3D--83774420236505566d60837354e7eb66746950aa; path=/; HttpOnly
X-Request-Id: 2a8d3a44-cccb-4697-abae-09ae7d6e11cc
X-Runtime: 0.026776
Content-Length: 232

Body

{
  "id": 9464,
  "name": "Map",
  "version": 4,
  "cards": [

  ],
  "slices": [

  ],
  "dividers": [

  ],
  "collaborators": [
    {
      "id": 11025
    }
  ],
  "stickers": [

  ],
  "owner_id": 11024,
  "created_at": "2018-10-22T20:26:47.799Z",
  "updated_at": "2018-10-22T20:26:47.839Z",
  "community": 2769
}

Users

Destroying user

Endpoint

DELETE /api/users/{id}

Request

Route

DELETE /api/users/11042

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbToxMzY4Y2U5OTNjM2VhMDY5OGMxMGE2OTFiOTQ2ZjQyMQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: text/html
Cache-Control: no-cache
Set-Cookie: _cardmap_session=MDN1YW4rL245cVBwRGllVGJLMFZKdUdOWE8yTWovWjhhQWJLUmZyc21xcnZvZmtrWmxvQ1JyclAwWFdQSEhFRUd6Uk9uN1p0RDVkTUxMNVRKT3JkeW9WalQwTVJtaytMVC9YY0JENWZMZGc9LS1EaUpIRm5OOFdnR2RVamtEcUlPQ0JBPT0%3D--d1322ad5be27a39a86e9e9352f96f34e37977e6a; path=/; HttpOnly
X-Request-Id: 6f0a902f-152e-4557-83ed-acac68a949c9
X-Runtime: 0.017709
Content-Length: 0

Getting users

Endpoint

GET /api/users/{id}

Request

Route

GET /api/users/11038

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTo1NTBjZmY5NmQ4MmRmMWRiMTY4MmU0ZjcyNTY2MDcwNg
Host: example.org
Cookie: 

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"1185255333513affa73a45255881be3e"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=dmNpNEo2bS9MNStvMmRhdnBZYm9vMW5Ddm1HU1RKUFByVjU0U0txRFJ2dWwwTy80bC9WL1M0aUhwVVZuS0txb0pmeDN1dTFUa3pIRHEwVkVSRGQ5SDF0WS9GMC9vYWlTajhCQmJkdTVDcjg9LS0wMm9HQTQzTHJ6S0JmLzErRm80bjBBPT0%3D--9659980b9e80288ba27dc619adf7a647a4251c21; path=/; HttpOnly
X-Request-Id: cc8c9f58-1471-4960-9a81-3efa916a9e79
X-Runtime: 0.002876
Content-Length: 70

Body

{
  "id": 11038,
  "name": "Bob",
  "email": "bob@cardboardit.com",
  "initials": "B"
}

Listing users

Endpoint

GET /api/users

Parameters

Name Description
page Paginate the response, by default paged to 10 entries. Can also be passed as /users/page/{page-number}

Request

Route

GET /api/users?page=2

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTplZmZmNzA1YTFkOWNhNzI1MjM5NjI3MTdjMDU0YTllYQ
Host: example.org
Cookie: 

Query Parameters

page=2

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"2acfc7717ad81e62c6a05c33c2aff5ce"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=VTcyTTlJaUJhaytMYnBnQ1dOci8vTGo4eUdhalpFUGZxaHloV1Q3aVJiZU1sZmQyZHlkSGVVYVNoY01VQXlocHRBZGF0KzVsd3NneVhrYWNqUi9yTVpsK3JONyszbWpwUzBpT1NjUmwzVmc9LS1DeTMwNEVCb1BTTVhybEIwSFZpdlNRPT0%3D--cf1736f95dec3bfadd9a560f1544ba53a68b7834; path=/; HttpOnly
X-Request-Id: bd0c042b-f658-41be-98b2-2ac50d6e4bc9
X-Runtime: 0.010463
Content-Length: 90

Body

[
  {
    "id": 11037,
    "name": "Example user: 9",
    "email": "example9@cardboardit.com",
    "initials": "EU"
  }
]

Updating a user

Endpoint

PATCH api/users/{id}

Parameters

Name Description
name Display name of the user

Request

Route

PATCH api/users/11040

Headers

Authorization: Bearer: Ym9iQGNhcmRib2FyZGl0LmNvbTplZjYxNGM1ZDg3NjY5MWI5MGE4NGQxNjNjZWI3OWZmZA
Content-Type: application/json
Host: example.org
Cookie: 

Body

{
  "name": "Frank"
}

Response

Simulated Response

Status

200

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"2c1f27819fff60e5ca4d7b0560068efa"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _cardmap_session=Wm9XM0ZxcEhTNlpuMEQwb29saXdBc2UxdjRNMXdKODRodk1wb0ZFOE85b3VFY1VUYk5HcHo2cnBjb2hIOHhUWVUrVVMwcmdZc2w2Rm5wbG1odTMxVkhSTjFsaGxuQ2ZXWHNHOUhKeE9YZGM9LS1YOFlQNGR5emNGcVFaK3ZyS2JFVUpRPT0%3D--91c38fcf38778a1baeb33bf1d2db20ad102b9315; path=/; HttpOnly
X-Request-Id: 8ae8a7b7-1697-48fc-b9e6-ff7c7b49e07a
X-Runtime: 0.011930
Content-Length: 73

Body

{
  "id": 11040,
  "name": "Frank",
  "email": "fred@cardboardit.com",
  "initials": "F"
}