{
  "app": "apiworkbench",
  "format": 1,
  "exportedAt": "2026-11-09T00:00:00.000",
  "collections": [
    {
      "id": "53e4325d-02c4-553c-a658-f821f01d9d29",
      "name": "Todo API (sample)",
      "requests": [
        {
          "id": "6a3022d2-bf9c-5f7a-bf9f-223973f30dc0",
          "name": "Health check",
          "method": "GET",
          "url": "{{baseUrl}}/health",
          "params": [],
          "headers": [],
          "bodyType": "none",
          "body": "",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "200",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "status",
              "x": "ok",
              "e": true
            },
            {
              "kind": "timeBelow",
              "t": "",
              "x": "1000",
              "e": true
            }
          ],
          "description": "Is the API up? The simplest possible request."
        },
        {
          "id": "5f03256b-ee37-5947-9381-fd7345658d94",
          "name": "List todos",
          "method": "GET",
          "url": "{{baseUrl}}/todos",
          "params": [],
          "headers": [],
          "bodyType": "none",
          "body": "",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "200",
              "e": true
            },
            {
              "kind": "headerContains",
              "t": "Content-Type",
              "x": "json",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "[0].id",
              "x": "1",
              "e": true
            },
            {
              "kind": "bodyContains",
              "t": "",
              "x": "Send my first request",
              "e": true
            }
          ],
          "folder": "Todos",
          "description": "Reads the whole list."
        },
        {
          "id": "89da66da-1384-5578-945b-ddac6d89613b",
          "name": "Get one todo",
          "method": "GET",
          "url": "{{baseUrl}}/todos/2",
          "params": [],
          "headers": [],
          "bodyType": "none",
          "body": "",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "200",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "id",
              "x": "2",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "done",
              "x": "false",
              "e": true
            }
          ],
          "folder": "Todos",
          "description": "Reads a single todo by its id in the path."
        },
        {
          "id": "7a3d9ebb-6451-5185-b7c9-1dd679d9bdbd",
          "name": "Get a todo that does not exist",
          "method": "GET",
          "url": "{{baseUrl}}/todos/404",
          "params": [],
          "headers": [],
          "bodyType": "none",
          "body": "",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "404",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "error",
              "x": "not_found",
              "e": true
            }
          ],
          "folder": "Todos",
          "description": "A negative test: the API must answer 404, not 200."
        },
        {
          "id": "29d62847-0272-5365-8782-190eaaa1a56f",
          "name": "Create a todo",
          "method": "POST",
          "url": "{{baseUrl}}/todos",
          "params": [],
          "headers": [],
          "bodyType": "json",
          "body": "{\n  \"title\": \"Buy milk\"\n}",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "201",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "title",
              "x": "Buy milk",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "done",
              "x": "false",
              "e": true
            },
            {
              "kind": "headerContains",
              "t": "Location",
              "x": "",
              "e": true
            }
          ],
          "folder": "Todos",
          "description": "Creates a todo, then saves the new id as {{newId}} for the next requests.",
          "captures": {
            "newId": "body.id"
          }
        },
        {
          "id": "e1b9f569-a3c3-5556-b69f-84dc72993c78",
          "name": "Create a todo without a title",
          "method": "POST",
          "url": "{{baseUrl}}/todos",
          "params": [],
          "headers": [],
          "bodyType": "json",
          "body": "{}",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "400",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "error",
              "x": "validation_failed",
              "e": true
            }
          ],
          "folder": "Todos",
          "description": "A negative test: a missing title must be rejected with 400."
        },
        {
          "id": "42d697f0-fde7-5d37-a19f-69fcaab39c92",
          "name": "Update the new todo",
          "method": "PUT",
          "url": "{{baseUrl}}/todos/{{newId}}",
          "params": [],
          "headers": [],
          "bodyType": "json",
          "body": "{\n  \"title\": \"Buy oat milk\",\n  \"done\": true\n}",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "200",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "title",
              "x": "Buy oat milk",
              "e": true
            },
            {
              "kind": "jsonEquals",
              "t": "done",
              "x": "true",
              "e": true
            }
          ],
          "folder": "Todos",
          "description": "Uses the id captured by Create a todo."
        },
        {
          "id": "44410b18-2cab-59ab-bbd9-092153405fbf",
          "name": "Delete the new todo",
          "method": "DELETE",
          "url": "{{baseUrl}}/todos/{{newId}}",
          "params": [],
          "headers": [],
          "bodyType": "none",
          "body": "",
          "graphqlVariables": "",
          "formFields": [],
          "authType": "none",
          "bearerToken": "",
          "assertions": [
            {
              "kind": "statusEquals",
              "t": "",
              "x": "204",
              "e": true
            }
          ],
          "folder": "Todos",
          "description": "Deletes the todo. 204 means done, with nothing to send back."
        }
      ],
      "variables": [
        {
          "k": "baseUrl",
          "v": "http://localhost:4010",
          "e": true
        }
      ],
      "description": "Requests and tests for the Todo API sample mock. From learn.dhivalabs.com."
    }
  ],
  "environments": []
}
