{
    "info": {
        "name": "Experimentium API v1",
        "description": "The Experimentium public API. Docs: https://staging.experimentium.com/developers.\n\nSet token (a personal token, or run \"Get a service token\"). Every request has tests. Run the Walkthrough folder with the Collection Runner to test the whole API in order: it makes a project, an experiment and a logbook, so use a test team. The other folders are one request per endpoint; list requests save the first id they find (team, experiment, subject…) for the requests after them.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{token}}",
                "type": "string"
            }
        ]
    },
    "event": [
        {
            "listen": "test",
            "script": {
                "type": "text/javascript",
                "exec": [
                    "// Every request: no server error, and an answer within 2 seconds.",
                    "pm.test(\"No server error\", function () { pm.expect(pm.response.code).to.be.below(500); });",
                    "pm.test(\"Answers within 2 seconds\", function () { pm.expect(pm.response.responseTime).to.be.below(2000); });"
                ]
            }
        }
    ],
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://staging.experimentium.com/api/v1"
        },
        {
            "key": "tokenUrl",
            "value": "https://staging.experimentium.com/oauth/token"
        },
        {
            "key": "token",
            "value": ""
        },
        {
            "key": "clientId",
            "value": ""
        },
        {
            "key": "clientSecret",
            "value": ""
        },
        {
            "key": "scopes",
            "value": "projects:read projects:write experiments:read experiments:write experiments:run data:write logbooks:read logbooks:write"
        },
        {
            "key": "team",
            "value": ""
        },
        {
            "key": "project",
            "value": ""
        },
        {
            "key": "experiment",
            "value": ""
        },
        {
            "key": "variant",
            "value": ""
        },
        {
            "key": "stage",
            "value": ""
        },
        {
            "key": "step",
            "value": ""
        },
        {
            "key": "task",
            "value": ""
        },
        {
            "key": "readingId",
            "value": ""
        },
        {
            "key": "photoReadingId",
            "value": ""
        },
        {
            "key": "subject",
            "value": ""
        },
        {
            "key": "reading",
            "value": ""
        },
        {
            "key": "logbook",
            "value": ""
        },
        {
            "key": "field",
            "value": ""
        },
        {
            "key": "kind",
            "value": "experiment"
        }
    ],
    "item": [
        {
            "name": "Sign in",
            "item": [
                {
                    "name": "Get a service token",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (pm.response.code === 200) { pm.collectionVariables.set(\"token\", pm.response.json().access_token); }"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "noauth"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "grant_type",
                                    "value": "client_credentials"
                                },
                                {
                                    "key": "client_id",
                                    "value": "{{clientId}}"
                                },
                                {
                                    "key": "client_secret",
                                    "value": "{{clientSecret}}"
                                },
                                {
                                    "key": "scope",
                                    "value": "{{scopes}}"
                                }
                            ]
                        },
                        "url": {
                            "raw": "{{tokenUrl}}",
                            "host": [
                                "{{tokenUrl}}"
                            ]
                        },
                        "description": "For a service client (client credentials). Saves the token for the other requests. Apps that sign people in use the authorization code flow instead; see the docs."
                    }
                }
            ]
        },
        {
            "name": "Walkthrough",
            "description": "Runs through a whole experiment in order, testing every step: run this folder with the Collection Runner. It creates a project, an experiment and a logbook in the team it runs in (the team variable, or the first team with the API on), so use a test team. Needs a token with every scope.",
            "item": [
                {
                    "name": "Who am I",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "// A fresh run: forget ids from the last one.",
                                    "pm.collectionVariables.unset(\"project\");",
                                    "pm.collectionVariables.unset(\"experiment\");",
                                    "pm.collectionVariables.unset(\"variant\");",
                                    "pm.collectionVariables.unset(\"subject\");",
                                    "pm.collectionVariables.unset(\"reading\");",
                                    "pm.collectionVariables.unset(\"readingValue\");",
                                    "pm.collectionVariables.unset(\"observation\");",
                                    "pm.collectionVariables.unset(\"task\");",
                                    "pm.collectionVariables.unset(\"step\");",
                                    "pm.collectionVariables.unset(\"stepDone\");",
                                    "pm.collectionVariables.unset(\"stageTo\");",
                                    "pm.collectionVariables.unset(\"restarted\");",
                                    "pm.collectionVariables.unset(\"logbook\");",
                                    "pm.collectionVariables.unset(\"field\");"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Signed in\", function () { pm.expect(body.data.user).to.have.property(\"id\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/me",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "me"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Pick the team",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    const chosen = pm.collectionVariables.get(\"team\");",
                                    "    const team = chosen ? body.data.find(function (t) { return String(t.id) === String(chosen); }) : body.data.find(function (t) { return t.api_enabled; });",
                                    "    pm.test(\"The team can use the API\", function () { pm.expect(team && team.api_enabled).to.be.true; });",
                                    "    if (team) { pm.collectionVariables.set(\"team\", String(team.id)); }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Create a project",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.collectionVariables.set(\"project\", String(body.data.id));",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/projects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "projects"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\": \"API walkthrough {{$timestamp}}\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Check the design",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"The design has no problems\", function () { pm.expect(body.data.problems.length).to.equal(0); pm.expect(body.data.ok).to.be.true; });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/designs/check",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "designs",
                                "check"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"kind\": \"experiment\", \"design\": {\"title\":\"API walkthrough: does mulch keep pots moist?\",\"hypothesis\":\"Mulched pots keep more water than bare ones.\",\"experiment_type\":\"Agriculture\",\"design\":\"groups\",\"subject_noun\":\"pot\",\"subjects_per_variant\":2,\"subjects_total\":null,\"turns\":null,\"units\":[],\"sites\":[],\"constants\":[{\"key\":\"crop\",\"type\":\"text\",\"value\":\"basil\",\"unit\":null}],\"variants\":[{\"name\":\"Bare soil\",\"is_control\":true,\"values\":[]},{\"name\":\"Mulched\",\"is_control\":false,\"values\":[]}],\"steps\":[{\"title\":\"Grow\",\"instructions\":\"Grow the {crop}.\",\"explanation\":null,\"days\":30,\"anytime\":false,\"tasks\":[{\"title\":\"Water\",\"instructions\":\"Water until it drains.\",\"frequency\":\"one_time\",\"interval_days\":null,\"when_you_can\":false,\"starts_after\":null,\"wait_days\":null,\"starts_when_reading\":null,\"starts_when_value\":null,\"starts_when_key\":null,\"stops_after\":null,\"stops_at_stage\":null,\"moves_to_stage\":null}],\"readings\":[{\"name\":\"Soil moisture\",\"type\":\"decimal\",\"role\":\"outcome\",\"schedule\":\"daily\",\"every_days\":null,\"unit\":\"%\",\"min\":null,\"max\":null,\"categories\":[],\"weight\":null,\"better\":null,\"combine\":null,\"task\":null,\"optional\":false,\"per_site\":false,\"site_summary\":null,\"starts\":null,\"primary\":false,\"stage\":null,\"when_you_can\":false,\"starts_after\":null,\"wait_days\":null,\"starts_when_reading\":null,\"starts_when_value\":null,\"starts_when_key\":null,\"stops_after\":null,\"stops_at_stage\":null}]}],\"stages\":[\"Seedling\",\"Growing\"],\"condition\":null,\"rules\":[],\"compare_by\":null,\"closing_questions\":[],\"notes\":[]}}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create the draft",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"It is a draft in the project\", function () { pm.expect(body.data.status).to.equal(\"draft\"); pm.expect(String(body.data.project.id)).to.equal(pm.collectionVariables.get(\"project\")); });",
                                    "    pm.collectionVariables.set(\"experiment\", String(body.data.id));",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/designs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "designs"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"kind\": \"experiment\", \"project_id\": {{project}}, \"design\": {\"title\":\"API walkthrough: does mulch keep pots moist?\",\"hypothesis\":\"Mulched pots keep more water than bare ones.\",\"experiment_type\":\"Agriculture\",\"design\":\"groups\",\"subject_noun\":\"pot\",\"subjects_per_variant\":2,\"subjects_total\":null,\"turns\":null,\"units\":[],\"sites\":[],\"constants\":[{\"key\":\"crop\",\"type\":\"text\",\"value\":\"basil\",\"unit\":null}],\"variants\":[{\"name\":\"Bare soil\",\"is_control\":true,\"values\":[]},{\"name\":\"Mulched\",\"is_control\":false,\"values\":[]}],\"steps\":[{\"title\":\"Grow\",\"instructions\":\"Grow the {crop}.\",\"explanation\":null,\"days\":30,\"anytime\":false,\"tasks\":[{\"title\":\"Water\",\"instructions\":\"Water until it drains.\",\"frequency\":\"one_time\",\"interval_days\":null,\"when_you_can\":false,\"starts_after\":null,\"wait_days\":null,\"starts_when_reading\":null,\"starts_when_value\":null,\"starts_when_key\":null,\"stops_after\":null,\"stops_at_stage\":null,\"moves_to_stage\":null}],\"readings\":[{\"name\":\"Soil moisture\",\"type\":\"decimal\",\"role\":\"outcome\",\"schedule\":\"daily\",\"every_days\":null,\"unit\":\"%\",\"min\":null,\"max\":null,\"categories\":[],\"weight\":null,\"better\":null,\"combine\":null,\"task\":null,\"optional\":false,\"per_site\":false,\"site_summary\":null,\"starts\":null,\"primary\":false,\"stage\":null,\"when_you_can\":false,\"starts_after\":null,\"wait_days\":null,\"starts_when_reading\":null,\"starts_when_value\":null,\"starts_when_key\":null,\"stops_after\":null,\"stops_at_stage\":null}]}],\"stages\":[\"Seedling\",\"Growing\"],\"condition\":null,\"rules\":[],\"compare_by\":null,\"closing_questions\":[],\"notes\":[]}}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Replace the draft’s design",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Same experiment, new design\", function () { pm.expect(String(body.data.id)).to.equal(pm.collectionVariables.get(\"experiment\")); pm.expect(body.data.variants.length).to.be.above(0); });",
                                    "    // Variants and stages were made again: save the new ids.",
                                    "    pm.collectionVariables.set(\"variant\", String(body.data.variants[0].id));",
                                    "    if (body.data.stages.length > 1) { pm.collectionVariables.set(\"stageTo\", String(body.data.stages[body.data.stages.length - 1].id)); }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/design",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "design"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"design\": {\"title\":\"API walkthrough: does mulch keep pots moist?\",\"hypothesis\":\"Mulched pots keep more water than bare ones.\",\"experiment_type\":\"Agriculture\",\"design\":\"groups\",\"subject_noun\":\"pot\",\"subjects_per_variant\":2,\"subjects_total\":null,\"turns\":null,\"units\":[],\"sites\":[],\"constants\":[{\"key\":\"crop\",\"type\":\"text\",\"value\":\"basil\",\"unit\":null}],\"variants\":[{\"name\":\"Bare soil\",\"is_control\":true,\"values\":[]},{\"name\":\"Mulched\",\"is_control\":false,\"values\":[]}],\"steps\":[{\"title\":\"Grow\",\"instructions\":\"Grow the {crop}.\",\"explanation\":null,\"days\":30,\"anytime\":false,\"tasks\":[{\"title\":\"Water\",\"instructions\":\"Water until it drains.\",\"frequency\":\"one_time\",\"interval_days\":null,\"when_you_can\":false,\"starts_after\":null,\"wait_days\":null,\"starts_when_reading\":null,\"starts_when_value\":null,\"starts_when_key\":null,\"stops_after\":null,\"stops_at_stage\":null,\"moves_to_stage\":null}],\"readings\":[{\"name\":\"Soil moisture\",\"type\":\"decimal\",\"role\":\"outcome\",\"schedule\":\"daily\",\"every_days\":null,\"unit\":\"%\",\"min\":null,\"max\":null,\"categories\":[],\"weight\":null,\"better\":null,\"combine\":null,\"task\":null,\"optional\":false,\"per_site\":false,\"site_summary\":null,\"starts\":null,\"primary\":false,\"stage\":null,\"when_you_can\":false,\"starts_after\":null,\"wait_days\":null,\"starts_when_reading\":null,\"starts_when_value\":null,\"starts_when_key\":null,\"stops_after\":null,\"stops_at_stage\":null}]}],\"stages\":[\"Seedling\",\"Growing\"],\"condition\":null,\"rules\":[],\"compare_by\":null,\"closing_questions\":[],\"notes\":[]}}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Add a subject",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"It has the external_id\", function () { pm.expect(body.data[0].external_id.indexOf(\"WALK-\")).to.equal(0); });",
                                    "    pm.collectionVariables.set(\"subject\", String(body.data[0].id));",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"subjects\": [{\"name\": \"Walkthrough plant\", \"variant_id\": {{variant}}, \"external_id\": \"WALK-{{$timestamp}}\"}]}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Get the subject",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Found\", function () { pm.expect(String(body.data.id)).to.equal(pm.collectionVariables.get(\"subject\")); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Start",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Running\", function () { pm.expect(body.data.status).to.equal(\"active\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/start",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "start"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Recording form",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    // Pick a number reading that is open now, a task with no required readings, and a step.",
                                    "    const open = function (item) { return !item.open || item.open.state === \"open\"; };",
                                    "    const readings = [].concat.apply([], body.data.steps.map(function (s) { return s.readings; }));",
                                    "    const reading = readings.find(function (r) { return (r.type === \"decimal\" || r.type === \"integer\") && open(r); });",
                                    "    if (reading) {",
                                    "        let value = reading.min !== null && reading.max !== null ? (reading.min + reading.max) / 2 : (reading.min !== null ? reading.min + 1 : (reading.max !== null ? reading.max - 1 : 5));",
                                    "        if (reading.type === \"integer\") { value = Math.round(value); }",
                                    "        pm.collectionVariables.set(\"reading\", String(reading.id));",
                                    "        pm.collectionVariables.set(\"readingValue\", String(value));",
                                    "    }",
                                    "    const tasks = [].concat.apply([], body.data.steps.map(function (s) { return s.tasks; }));",
                                    "    const task = tasks.find(function (t) { return open(t) && !t.readings.some(function (r) { return r.required; }); });",
                                    "    if (task) { pm.collectionVariables.set(\"task\", String(task.id)); }",
                                    "    const step = body.data.steps.find(function (s) { return !s.anytime; });",
                                    "    if (step) { pm.collectionVariables.set(\"step\", String(step.id)); }",
                                    "    pm.test(\"Lists the steps the subject is on\", function () { pm.expect(body.data.steps.length).to.be.above(0); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/recording-form?subject_id={{subject}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "recording-form"
                            ],
                            "query": [
                                {
                                    "key": "subject_id",
                                    "value": "{{subject}}"
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Record a reading",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"reading\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"Saved with the value sent\", function () { pm.expect(Number(body.data[0].value)).to.equal(Number(pm.collectionVariables.get(\"readingValue\"))); });",
                                    "    pm.collectionVariables.set(\"observation\", String(body.data[0].id));",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"subject_id\": {{subject}}, \"readings\": [{\"reading_id\": {{reading}}, \"value\": {{readingValue}}}]}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Refuse a wrong value",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"reading\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 422\", function () { pm.expect(pm.response.code).to.be.oneOf([422]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 422) {",
                                    "    pm.test(\"Says why, with a reason code\", function () { pm.expect(body.reason).to.equal(\"invalid_value\"); pm.expect(body).to.have.property(\"message\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"subject_id\": {{subject}}, \"readings\": [{\"reading_id\": {{reading}}, \"value\": \"tall\"}]}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Flag the reading",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"observation\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Flagged\", function () { pm.expect(body.data.flagged).to.be.true; });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings/{{observation}}/flag",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings",
                                "{{observation}}",
                                "flag"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"reason\": \"Walkthrough: testing flags\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Unflag the reading",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"observation\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Counts again\", function () { pm.expect(body.data.flagged).to.be.false; });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings/{{observation}}/unflag",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings",
                                "{{observation}}",
                                "unflag"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List the readings",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Comes in pages\", function () { pm.expect(body.meta).to.have.property(\"total\"); });",
                                    "    if (pm.collectionVariables.get(\"observation\")) { pm.test(\"Has the reading\", function () { pm.expect(body.meta.total).to.be.above(0); }); }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings?subject_id={{subject}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings"
                            ],
                            "query": [
                                {
                                    "key": "subject_id",
                                    "value": "{{subject}}"
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Log a task",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"task\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"One log for the subject\", function () { pm.expect(body.data.length).to.equal(1); pm.expect(body.data[0].notes).to.equal(\"Walkthrough\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/task-logs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "task-logs"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"task_id\": {{task}}, \"subject_ids\": [{{subject}}], \"notes\": \"Walkthrough\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Move the stage",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"stageTo\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"At the new stage\", function () { pm.expect(String(body.data.subject.stage.id)).to.equal(pm.collectionVariables.get(\"stageTo\")); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/stage",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "stage"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"stage_id\": {{stageTo}}, \"note\": \"Walkthrough\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Complete the step",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"step\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200 or 422\", function () { pm.expect(pm.response.code).to.be.oneOf([200,422]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200 || pm.response.code === 422) {",
                                    "    if (pm.response.code === 200) { pm.collectionVariables.set(\"stepDone\", \"1\"); pm.test(\"Completed\", function () { pm.expect(body.data.status).to.equal(\"completed\"); }); }",
                                    "    else { pm.test(\"Not ready yet, and says so\", function () { pm.expect(body.reason).to.equal(\"step_not_ready\"); }); }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/steps/{{step}}/complete",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "steps",
                                "{{step}}",
                                "complete"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Reopen the step",
                    "event": [
                        {
                            "listen": "prerequest",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "if (!pm.collectionVariables.get(\"stepDone\")) { pm.execution.skipRequest(); }"
                                ]
                            }
                        },
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"In progress again\", function () { pm.expect(body.data.status).to.equal(\"in_progress\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/steps/{{step}}/reopen",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "steps",
                                "{{step}}",
                                "reopen"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Add a note",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"A note\", function () { pm.expect(body.data.kind).to.equal(\"note\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/notes",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "notes"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"text\": \"Walkthrough note\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Log an event",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"An event\", function () { pm.expect(body.data.kind).to.equal(\"event\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/events",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "events"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"title\": \"Walkthrough event\", \"description\": \"Testing the journal.\", \"severity\": \"low\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Read the journal",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Has the note and the event\", function () { pm.expect(body.data.length).to.be.above(1); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/journal",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "journal"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Leave the subject out of results",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Left out\", function () { pm.expect(body.data.left_out_of_results).to.be.true; });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/leave-out",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "leave-out"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"reason\": \"Walkthrough\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Count it again",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Counts again\", function () { pm.expect(body.data.left_out_of_results).to.be.false; });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/count-again",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "count-again"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Mark the subject failed",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Failed\", function () { pm.expect(body.data.status).to.equal(\"failed\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"status\": \"failed\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "What’s due",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Lists the experiment\", function () { pm.expect(String(body.data[0].experiment.id)).to.equal(pm.collectionVariables.get(\"experiment\")); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/due?experiment_id={{experiment}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "due"
                            ],
                            "query": [
                                {
                                    "key": "experiment_id",
                                    "value": "{{experiment}}"
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Results",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Has the findings\", function () { pm.expect(body.data).to.include.all.keys([\"headline\", \"summary\", \"outcomes\"]); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/results",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "results"
                            ],
                            "query": []
                        }
                    }
                },
                {
                    "name": "Pause",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Paused\", function () { pm.expect(body.data.status).to.equal(\"paused\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/pause",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "pause"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Refuse to start a paused experiment",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 409\", function () { pm.expect(pm.response.code).to.be.oneOf([409]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 409) {",
                                    "    pm.test(\"Says it is the wrong state\", function () { pm.expect(body.reason).to.equal(\"status\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/start",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "start"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Resume",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Running again\", function () { pm.expect(body.data.status).to.equal(\"active\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/resume",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "resume"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "End",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Ended\", function () { pm.expect(body.data.status).to.equal(\"abandoned\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/end",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "end"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"outcome\": \"abandoned\", \"reason\": \"Walkthrough finished.\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Write the conclusion",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Saved\", function () { pm.expect(body.data.verdict).to.equal(\"inconclusive\"); pm.expect(body.data.conclusion).to.equal(\"Only a walkthrough.\"); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/conclusion",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "conclusion"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"verdict\": \"inconclusive\", \"conclusion\": \"Only a walkthrough.\", \"next_steps\": \"None.\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Restart as a new attempt",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"A new draft that links back\", function () { pm.expect(body.data.status).to.equal(\"draft\"); pm.expect(String(body.data.restarted_from_id)).to.equal(pm.collectionVariables.get(\"experiment\")); });",
                                    "    pm.collectionVariables.set(\"restarted\", String(body.data.id));",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/restart",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "restart"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Create a logbook",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.collectionVariables.set(\"logbook\", String(body.data.id));",
                                    "    const field = body.data.fields.find(function (f) { return f.input; });",
                                    "    pm.test(\"Has a field to fill in\", function () { pm.expect(field).to.have.property(\"id\"); });",
                                    "    if (field) { pm.collectionVariables.set(\"field\", String(field.id)); }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/designs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "designs"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"kind\": \"logbook\", \"visibility\": \"private\", \"design\": {\"name\":\"Walkthrough rain gauge\",\"description\":\"Made by the API walkthrough.\",\"fields\":[{\"name\":\"Rain\",\"type\":\"decimal\",\"unit\":\"in\",\"required\":true}]}}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Add a logbook entry",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.be.oneOf([201]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 201) {",
                                    "    pm.test(\"Saved the value\", function () { pm.expect(Number(body.data.values[0].value)).to.equal(0.4); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}/entries",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "logbooks",
                                "{{logbook}}",
                                "entries"
                            ],
                            "query": []
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\"values\": [{\"field_id\": {{field}}, \"value\": 0.4}], \"note\": \"Walkthrough\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "List the logbook’s entries",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200]); });",
                                    "const body = pm.response.code < 500 ? pm.response.json() : {};",
                                    "if (pm.response.code === 200) {",
                                    "    pm.test(\"Has the entry\", function () { pm.expect(body.meta.total).to.equal(1); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}/entries",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "logbooks",
                                "{{logbook}}",
                                "entries"
                            ],
                            "query": []
                        }
                    }
                }
            ]
        },
        {
            "name": "Account",
            "description": "Who the token acts for, and the teams it can work in. These need no scope.",
            "item": [
                {
                    "name": "Who am I",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"user\",\"via\",\"client\",\"scopes\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/me",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "me"
                            ],
                            "query": []
                        },
                        "description": "The person the token acts for, how it signed in (app, service or personal_token), and its scopes."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/me",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "me"
                                    ],
                                    "query": []
                                },
                                "description": "The person the token acts for, how it signed in (app, service or personal_token), and its scopes."
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"user\": {\n            \"id\": 5,\n            \"name\": \"Sam Rivera\",\n            \"timezone\": \"America/Denver\"\n        },\n        \"via\": \"service\",\n        \"client\": {\n            \"id\": \"9f1c…\",\n            \"name\": \"Seed tracker\"\n        },\n        \"scopes\": [\n            \"experiments:read\",\n            \"data:write\"\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List teams",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"personal\",\"role\",\"api_enabled\"]); });",
                                    "    }",
                                    "    { const v = body?.data?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"team\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams"
                            ],
                            "query": []
                        },
                        "description": "The teams this token may work in, with the person’s role there and whether the API is switched on for it. A service token has exactly one."
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams"
                                    ],
                                    "query": []
                                },
                                "description": "The teams this token may work in, with the person’s role there and whether the API is switched on for it. A service token has exactly one."
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 3,\n            \"name\": \"Backyard\",\n            \"personal\": true,\n            \"role\": \"Owner\",\n            \"api_enabled\": true\n        }\n    ]\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Projects",
            "description": "Projects hold experiments, the way folders hold files.",
            "item": [
                {
                    "name": "List projects",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"description\",\"created_at\"]); });",
                                    "    }",
                                    "    pm.test(\"Comes in pages\", function () { pm.expect(body).to.have.property(\"meta\"); pm.expect(body.meta).to.include.all.keys([\"page\", \"per_page\", \"total\", \"last_page\"]); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/projects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "projects"
                            ],
                            "query": [
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "Part of a name.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Page number, from 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Results per page, 1–100 (default 25).",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "The team’s projects, by name.\n\nScope: projects:read\nTeam permission: projects.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/projects",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "projects"
                                    ],
                                    "query": [
                                        {
                                            "key": "search",
                                            "value": "",
                                            "description": "Part of a name.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, from 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Results per page, 1–100 (default 25).",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "The team’s projects, by name.\n\nScope: projects:read\nTeam permission: projects.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 7,\n            \"name\": \"Garden trials\",\n            \"description\": null,\n            \"created_at\": \"2026-04-01T12:00:00+00:00\"\n        }\n    ],\n    \"meta\": {\n        \"page\": 1,\n        \"per_page\": 25,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a project",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"description\",\"created_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/projects/{{project}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "projects",
                                "{{project}}"
                            ],
                            "query": []
                        },
                        "description": "One project.\n\nScope: projects:read\nTeam permission: projects.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/projects/{{project}}",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "projects",
                                        "{{project}}"
                                    ],
                                    "query": []
                                },
                                "description": "One project.\n\nScope: projects:read\nTeam permission: projects.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 7,\n        \"name\": \"Garden trials\",\n        \"description\": null,\n        \"created_at\": \"2026-04-01T12:00:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Create a project",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"description\",\"created_at\"]); });",
                                    "    }",
                                    "    { const v = body?.data?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"project\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/projects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "projects"
                            ],
                            "query": []
                        },
                        "description": "A new project.\n\nScope: projects:write\nTeam permission: projects.create",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"2027 seed trials\",\n    \"description\": \"Next year’s variety tests.\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/projects",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "projects"
                                    ],
                                    "query": []
                                },
                                "description": "A new project.\n\nScope: projects:write\nTeam permission: projects.create",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"name\": \"2027 seed trials\",\n    \"description\": \"Next year’s variety tests.\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 8,\n        \"name\": \"2027 seed trials\",\n        \"description\": \"Next year’s variety tests.\",\n        \"created_at\": \"2026-11-27T15:00:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Update a project",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"description\",\"created_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/projects/{{project}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "projects",
                                "{{project}}"
                            ],
                            "query": []
                        },
                        "description": "Rename a project or change its description. Send only what changes.\n\nScope: projects:write\nTeam permission: projects.update",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"2027 variety trials\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "PATCH",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/projects/{{project}}",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "projects",
                                        "{{project}}"
                                    ],
                                    "query": []
                                },
                                "description": "Rename a project or change its description. Send only what changes.\n\nScope: projects:write\nTeam permission: projects.update",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"name\": \"2027 variety trials\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 8,\n        \"name\": \"2027 variety trials\",\n        \"description\": \"Next year’s variety tests.\",\n        \"created_at\": \"2026-11-27T15:00:00+00:00\"\n    }\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Designs",
            "description": "Create experiments and logbooks from a design: a JSON description of the whole setup. Get the schema, check your design until it has no problems, then create it. It is made as a draft: nothing is due until it is started. These are the same format and checks the Claude connector uses; no AI runs here. The scope depends on kind: experiments:write for experiments, logbooks:write for logbooks.",
            "item": [
                {
                    "name": "Get the design schema",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"kind\",\"schema\",\"examples\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/designs/schema/{{kind}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "designs",
                                "schema",
                                "{{kind}}"
                            ],
                            "query": []
                        },
                        "description": "The JSON Schema a design must follow, with worked examples.\n\nScope: experiments:write or logbooks:write"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/designs/schema/{{kind}}",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "designs",
                                        "schema",
                                        "{{kind}}"
                                    ],
                                    "query": []
                                },
                                "description": "The JSON Schema a design must follow, with worked examples.\n\nScope: experiments:write or logbooks:write"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"kind\": \"experiment\",\n        \"schema\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"title\": {\n                    \"type\": \"string\"\n                },\n                \"…\": []\n            }\n        },\n        \"examples\": {\n            \"Which variety does best?\": {\n                \"title\": \"…\"\n            }\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Check a design",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"ok\",\"problems\",\"normalized\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/designs/check",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "designs",
                                "check"
                            ],
                            "query": []
                        },
                        "description": "Checks a design against everything that can be built, without making anything. Returns the problems in plain words (empty when ok) and the design as it would be built.\n\nScope: experiments:write or logbooks:write",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"kind\": \"logbook\",\n    \"design\": {\n        \"name\": \"Rain gauge\",\n        \"description\": \"Daily rainfall.\",\n        \"fields\": [\n            {\n                \"name\": \"Rain\",\n                \"type\": \"decimal\",\n                \"unit\": \"in\"\n            }\n        ]\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/designs/check",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "designs",
                                        "check"
                                    ],
                                    "query": []
                                },
                                "description": "Checks a design against everything that can be built, without making anything. Returns the problems in plain words (empty when ok) and the design as it would be built.\n\nScope: experiments:write or logbooks:write",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"kind\": \"logbook\",\n    \"design\": {\n        \"name\": \"Rain gauge\",\n        \"description\": \"Daily rainfall.\",\n        \"fields\": [\n            {\n                \"name\": \"Rain\",\n                \"type\": \"decimal\",\n                \"unit\": \"in\"\n            }\n        ]\n    }\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"ok\": true,\n        \"problems\": [],\n        \"normalized\": {\n            \"name\": \"Rain gauge\",\n            \"…\": []\n        }\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Create from a design",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"title\",\"status\",\"design\",\"hypothesis\",\"project\",\"started_at\",\"planned_end_on\",\"concluded_at\",\"created_at\",\"url\",\"variants\",\"stages\",\"steps\"]); });",
                                    "    }",
                                    "    { const v = body?.data?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"experiment\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/designs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "designs"
                            ],
                            "query": []
                        },
                        "description": "Makes the design as a draft experiment or a logbook. Experiments go into project_id, or a “Garden trials” project when none is given. Logbooks start private unless visibility is team. A design with problems is refused with 422 and the list of problems.\n\nScope: experiments:write or logbooks:write\nTeam permission: experiments.create (experiments)",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"kind\": \"experiment\", \"project_id\": {{project}}, \"design\": {\n    \"title\": \"API walkthrough: does mulch keep pots moist?\",\n    \"hypothesis\": \"Mulched pots keep more water than bare ones.\",\n    \"experiment_type\": \"Agriculture\",\n    \"design\": \"groups\",\n    \"subject_noun\": \"pot\",\n    \"subjects_per_variant\": 2,\n    \"subjects_total\": null,\n    \"turns\": null,\n    \"units\": [],\n    \"sites\": [],\n    \"constants\": [\n        {\n            \"key\": \"crop\",\n            \"type\": \"text\",\n            \"value\": \"basil\",\n            \"unit\": null\n        }\n    ],\n    \"variants\": [\n        {\n            \"name\": \"Bare soil\",\n            \"is_control\": true,\n            \"values\": []\n        },\n        {\n            \"name\": \"Mulched\",\n            \"is_control\": false,\n            \"values\": []\n        }\n    ],\n    \"steps\": [\n        {\n            \"title\": \"Grow\",\n            \"instructions\": \"Grow the {crop}.\",\n            \"explanation\": null,\n            \"days\": 30,\n            \"anytime\": false,\n            \"tasks\": [\n                {\n                    \"title\": \"Water\",\n                    \"instructions\": \"Water until it drains.\",\n                    \"frequency\": \"one_time\",\n                    \"interval_days\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null,\n                    \"moves_to_stage\": null\n                }\n            ],\n            \"readings\": [\n                {\n                    \"name\": \"Soil moisture\",\n                    \"type\": \"decimal\",\n                    \"role\": \"outcome\",\n                    \"schedule\": \"daily\",\n                    \"every_days\": null,\n                    \"unit\": \"%\",\n                    \"min\": null,\n                    \"max\": null,\n                    \"categories\": [],\n                    \"weight\": null,\n                    \"better\": null,\n                    \"combine\": null,\n                    \"task\": null,\n                    \"optional\": false,\n                    \"per_site\": false,\n                    \"site_summary\": null,\n                    \"starts\": null,\n                    \"primary\": false,\n                    \"stage\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null\n                }\n            ]\n        }\n    ],\n    \"stages\": [\n        \"Seedling\",\n        \"Growing\"\n    ],\n    \"condition\": null,\n    \"rules\": [],\n    \"compare_by\": null,\n    \"closing_questions\": [],\n    \"notes\": []\n}}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/designs",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "designs"
                                    ],
                                    "query": []
                                },
                                "description": "Makes the design as a draft experiment or a logbook. Experiments go into project_id, or a “Garden trials” project when none is given. Logbooks start private unless visibility is team. A design with problems is refused with 422 and the list of problems.\n\nScope: experiments:write or logbooks:write\nTeam permission: experiments.create (experiments)",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"kind\": \"experiment\", \"project_id\": {{project}}, \"design\": {\n    \"title\": \"API walkthrough: does mulch keep pots moist?\",\n    \"hypothesis\": \"Mulched pots keep more water than bare ones.\",\n    \"experiment_type\": \"Agriculture\",\n    \"design\": \"groups\",\n    \"subject_noun\": \"pot\",\n    \"subjects_per_variant\": 2,\n    \"subjects_total\": null,\n    \"turns\": null,\n    \"units\": [],\n    \"sites\": [],\n    \"constants\": [\n        {\n            \"key\": \"crop\",\n            \"type\": \"text\",\n            \"value\": \"basil\",\n            \"unit\": null\n        }\n    ],\n    \"variants\": [\n        {\n            \"name\": \"Bare soil\",\n            \"is_control\": true,\n            \"values\": []\n        },\n        {\n            \"name\": \"Mulched\",\n            \"is_control\": false,\n            \"values\": []\n        }\n    ],\n    \"steps\": [\n        {\n            \"title\": \"Grow\",\n            \"instructions\": \"Grow the {crop}.\",\n            \"explanation\": null,\n            \"days\": 30,\n            \"anytime\": false,\n            \"tasks\": [\n                {\n                    \"title\": \"Water\",\n                    \"instructions\": \"Water until it drains.\",\n                    \"frequency\": \"one_time\",\n                    \"interval_days\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null,\n                    \"moves_to_stage\": null\n                }\n            ],\n            \"readings\": [\n                {\n                    \"name\": \"Soil moisture\",\n                    \"type\": \"decimal\",\n                    \"role\": \"outcome\",\n                    \"schedule\": \"daily\",\n                    \"every_days\": null,\n                    \"unit\": \"%\",\n                    \"min\": null,\n                    \"max\": null,\n                    \"categories\": [],\n                    \"weight\": null,\n                    \"better\": null,\n                    \"combine\": null,\n                    \"task\": null,\n                    \"optional\": false,\n                    \"per_site\": false,\n                    \"site_summary\": null,\n                    \"starts\": null,\n                    \"primary\": false,\n                    \"stage\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null\n                }\n            ]\n        }\n    ],\n    \"stages\": [\n        \"Seedling\",\n        \"Growing\"\n    ],\n    \"condition\": null,\n    \"rules\": [],\n    \"compare_by\": null,\n    \"closing_questions\": [],\n    \"notes\": []\n}}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 42,\n        \"title\": \"Which tomato variety yields most?\",\n        \"status\": \"active\",\n        \"design\": \"groups\",\n        \"hypothesis\": \"Sungold gives more fruit per plant than Early Girl.\",\n        \"project\": {\n            \"id\": 7,\n            \"name\": \"Garden trials\"\n        },\n        \"started_at\": \"2026-05-01T14:00:00+00:00\",\n        \"planned_end_on\": \"2026-08-31\",\n        \"concluded_at\": null,\n        \"created_at\": \"2026-04-28T19:12:03+00:00\",\n        \"url\": \"https://app.example.com/app/3/experiments/42\",\n        \"variants\": [],\n        \"stages\": [],\n        \"steps\": []\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Replace a draft’s design",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"title\",\"status\",\"design\",\"hypothesis\",\"project\",\"started_at\",\"planned_end_on\",\"concluded_at\",\"created_at\",\"url\",\"variants\",\"stages\",\"steps\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/design",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "design"
                            ],
                            "query": []
                        },
                        "description": "Replace a draft experiment’s whole design with a new one (the same format as creating it), keeping its id, project, tags and files. Everything inside it is made again from the design, including subjects: add your own subjects after the design is final. Refused once anything has been recorded on it, and for experiments that aren’t drafts (409): restart those as a new attempt.\n\nScope: experiments:write\nTeam permission: protocol.manage",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"design\": {\n    \"title\": \"API walkthrough: does mulch keep pots moist?\",\n    \"hypothesis\": \"Mulched pots keep more water than bare ones.\",\n    \"experiment_type\": \"Agriculture\",\n    \"design\": \"groups\",\n    \"subject_noun\": \"pot\",\n    \"subjects_per_variant\": 2,\n    \"subjects_total\": null,\n    \"turns\": null,\n    \"units\": [],\n    \"sites\": [],\n    \"constants\": [\n        {\n            \"key\": \"crop\",\n            \"type\": \"text\",\n            \"value\": \"basil\",\n            \"unit\": null\n        }\n    ],\n    \"variants\": [\n        {\n            \"name\": \"Bare soil\",\n            \"is_control\": true,\n            \"values\": []\n        },\n        {\n            \"name\": \"Mulched\",\n            \"is_control\": false,\n            \"values\": []\n        }\n    ],\n    \"steps\": [\n        {\n            \"title\": \"Grow\",\n            \"instructions\": \"Grow the {crop}.\",\n            \"explanation\": null,\n            \"days\": 30,\n            \"anytime\": false,\n            \"tasks\": [\n                {\n                    \"title\": \"Water\",\n                    \"instructions\": \"Water until it drains.\",\n                    \"frequency\": \"one_time\",\n                    \"interval_days\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null,\n                    \"moves_to_stage\": null\n                }\n            ],\n            \"readings\": [\n                {\n                    \"name\": \"Soil moisture\",\n                    \"type\": \"decimal\",\n                    \"role\": \"outcome\",\n                    \"schedule\": \"daily\",\n                    \"every_days\": null,\n                    \"unit\": \"%\",\n                    \"min\": null,\n                    \"max\": null,\n                    \"categories\": [],\n                    \"weight\": null,\n                    \"better\": null,\n                    \"combine\": null,\n                    \"task\": null,\n                    \"optional\": false,\n                    \"per_site\": false,\n                    \"site_summary\": null,\n                    \"starts\": null,\n                    \"primary\": false,\n                    \"stage\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null\n                }\n            ]\n        }\n    ],\n    \"stages\": [\n        \"Seedling\",\n        \"Growing\"\n    ],\n    \"condition\": null,\n    \"rules\": [],\n    \"compare_by\": null,\n    \"closing_questions\": [],\n    \"notes\": []\n}}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "PUT",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/design",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "design"
                                    ],
                                    "query": []
                                },
                                "description": "Replace a draft experiment’s whole design with a new one (the same format as creating it), keeping its id, project, tags and files. Everything inside it is made again from the design, including subjects: add your own subjects after the design is final. Refused once anything has been recorded on it, and for experiments that aren’t drafts (409): restart those as a new attempt.\n\nScope: experiments:write\nTeam permission: protocol.manage",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"design\": {\n    \"title\": \"API walkthrough: does mulch keep pots moist?\",\n    \"hypothesis\": \"Mulched pots keep more water than bare ones.\",\n    \"experiment_type\": \"Agriculture\",\n    \"design\": \"groups\",\n    \"subject_noun\": \"pot\",\n    \"subjects_per_variant\": 2,\n    \"subjects_total\": null,\n    \"turns\": null,\n    \"units\": [],\n    \"sites\": [],\n    \"constants\": [\n        {\n            \"key\": \"crop\",\n            \"type\": \"text\",\n            \"value\": \"basil\",\n            \"unit\": null\n        }\n    ],\n    \"variants\": [\n        {\n            \"name\": \"Bare soil\",\n            \"is_control\": true,\n            \"values\": []\n        },\n        {\n            \"name\": \"Mulched\",\n            \"is_control\": false,\n            \"values\": []\n        }\n    ],\n    \"steps\": [\n        {\n            \"title\": \"Grow\",\n            \"instructions\": \"Grow the {crop}.\",\n            \"explanation\": null,\n            \"days\": 30,\n            \"anytime\": false,\n            \"tasks\": [\n                {\n                    \"title\": \"Water\",\n                    \"instructions\": \"Water until it drains.\",\n                    \"frequency\": \"one_time\",\n                    \"interval_days\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null,\n                    \"moves_to_stage\": null\n                }\n            ],\n            \"readings\": [\n                {\n                    \"name\": \"Soil moisture\",\n                    \"type\": \"decimal\",\n                    \"role\": \"outcome\",\n                    \"schedule\": \"daily\",\n                    \"every_days\": null,\n                    \"unit\": \"%\",\n                    \"min\": null,\n                    \"max\": null,\n                    \"categories\": [],\n                    \"weight\": null,\n                    \"better\": null,\n                    \"combine\": null,\n                    \"task\": null,\n                    \"optional\": false,\n                    \"per_site\": false,\n                    \"site_summary\": null,\n                    \"starts\": null,\n                    \"primary\": false,\n                    \"stage\": null,\n                    \"when_you_can\": false,\n                    \"starts_after\": null,\n                    \"wait_days\": null,\n                    \"starts_when_reading\": null,\n                    \"starts_when_value\": null,\n                    \"starts_when_key\": null,\n                    \"stops_after\": null,\n                    \"stops_at_stage\": null\n                }\n            ]\n        }\n    ],\n    \"stages\": [\n        \"Seedling\",\n        \"Growing\"\n    ],\n    \"condition\": null,\n    \"rules\": [],\n    \"compare_by\": null,\n    \"closing_questions\": [],\n    \"notes\": []\n}}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 42,\n        \"title\": \"Which tomato variety yields most?\",\n        \"status\": \"active\",\n        \"design\": \"groups\",\n        \"hypothesis\": \"Sungold gives more fruit per plant than Early Girl.\",\n        \"project\": {\n            \"id\": 7,\n            \"name\": \"Garden trials\"\n        },\n        \"started_at\": \"2026-05-01T14:00:00+00:00\",\n        \"planned_end_on\": \"2026-08-31\",\n        \"concluded_at\": null,\n        \"created_at\": \"2026-04-28T19:12:03+00:00\",\n        \"url\": \"https://app.example.com/app/3/experiments/42\",\n        \"variants\": [],\n        \"stages\": [],\n        \"steps\": []\n    }\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Experiments",
            "description": "Experiments, their whole design, and their results. Results are computed by the app: use these numbers rather than working out your own statistics from readings.",
            "item": [
                {
                    "name": "List experiments",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"title\",\"status\",\"design\",\"hypothesis\",\"project\",\"started_at\",\"planned_end_on\",\"concluded_at\",\"created_at\",\"url\"]); });",
                                    "    }",
                                    "    pm.test(\"Comes in pages\", function () { pm.expect(body).to.have.property(\"meta\"); pm.expect(body.meta).to.include.all.keys([\"page\", \"per_page\", \"total\", \"last_page\"]); });",
                                    "    { const v = body?.data?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"experiment\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "",
                                    "description": "draft, active, paused, completed, failed or abandoned.",
                                    "disabled": true
                                },
                                {
                                    "key": "project_id",
                                    "value": "",
                                    "description": "Only this project.",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "Part of a title.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Page number, from 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Results per page, 1–100 (default 25).",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "The team’s experiments, newest first.\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments"
                                    ],
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "",
                                            "description": "draft, active, paused, completed, failed or abandoned.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "project_id",
                                            "value": "",
                                            "description": "Only this project.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "search",
                                            "value": "",
                                            "description": "Part of a title.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, from 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Results per page, 1–100 (default 25).",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "The team’s experiments, newest first.\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 42,\n            \"title\": \"Which tomato variety yields most?\",\n            \"status\": \"active\",\n            \"design\": \"groups\",\n            \"hypothesis\": \"Sungold gives more fruit per plant than Early Girl.\",\n            \"project\": {\n                \"id\": 7,\n                \"name\": \"Garden trials\"\n            },\n            \"started_at\": \"2026-05-01T14:00:00+00:00\",\n            \"planned_end_on\": \"2026-08-31\",\n            \"concluded_at\": null,\n            \"created_at\": \"2026-04-28T19:12:03+00:00\",\n            \"url\": \"https://app.example.com/app/3/experiments/42\"\n        }\n    ],\n    \"meta\": {\n        \"page\": 1,\n        \"per_page\": 25,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get an experiment",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"title\",\"status\",\"design\",\"hypothesis\",\"project\",\"started_at\",\"planned_end_on\",\"concluded_at\",\"created_at\",\"url\",\"ended_reason\",\"subjects_count\",\"variants\",\"stages\",\"steps\"]); });",
                                    "    }",
                                    "    { const v = body?.data?.variants?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"variant\", String(v)); } }",
                                    "    { const v = body?.data?.stages?.[1]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"stage\", String(v)); } }",
                                    "    { const v = body?.data?.steps?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"step\", String(v)); } }",
                                    "    { const v = body?.data?.steps?.[0]?.tasks?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"task\", String(v)); } }",
                                    "    { const v = body?.data?.steps?.[0]?.readings?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"readingId\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}"
                            ],
                            "query": []
                        },
                        "description": "One experiment with its whole design: variants, stages, and steps with their tasks and readings (ids you use when recording).\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}"
                                    ],
                                    "query": []
                                },
                                "description": "One experiment with its whole design: variants, stages, and steps with their tasks and readings (ids you use when recording).\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 42,\n        \"title\": \"Which tomato variety yields most?\",\n        \"status\": \"active\",\n        \"design\": \"groups\",\n        \"hypothesis\": \"Sungold gives more fruit per plant than Early Girl.\",\n        \"project\": {\n            \"id\": 7,\n            \"name\": \"Garden trials\"\n        },\n        \"started_at\": \"2026-05-01T14:00:00+00:00\",\n        \"planned_end_on\": \"2026-08-31\",\n        \"concluded_at\": null,\n        \"created_at\": \"2026-04-28T19:12:03+00:00\",\n        \"url\": \"https://app.example.com/app/3/experiments/42\",\n        \"ended_reason\": null,\n        \"subjects_count\": 12,\n        \"variants\": [\n            {\n                \"id\": 87,\n                \"name\": \"Early Girl\",\n                \"is_control\": true\n            },\n            {\n                \"id\": 88,\n                \"name\": \"Sungold\",\n                \"is_control\": false\n            }\n        ],\n        \"stages\": [\n            {\n                \"id\": 11,\n                \"name\": \"Seedling\",\n                \"order\": 1,\n                \"is_default\": true\n            },\n            {\n                \"id\": 12,\n                \"name\": \"Flowering\",\n                \"order\": 2,\n                \"is_default\": false\n            }\n        ],\n        \"steps\": [\n            {\n                \"id\": 20,\n                \"order\": 1,\n                \"title\": \"Grow\",\n                \"anytime\": false,\n                \"target_duration_days\": 120,\n                \"tasks\": [\n                    {\n                        \"id\": 31,\n                        \"title\": \"Water\",\n                        \"frequency\": \"every_n_days\",\n                        \"interval_days\": 3,\n                        \"required\": true,\n                        \"when_you_can\": false,\n                        \"moves_to_stage_id\": null\n                    }\n                ],\n                \"readings\": [\n                    {\n                        \"id\": 55,\n                        \"name\": \"Plant height\",\n                        \"type\": \"decimal\",\n                        \"unit\": \"in\",\n                        \"min\": 0,\n                        \"max\": 120,\n                        \"categories\": null,\n                        \"role\": \"outcome\",\n                        \"is_main_outcome\": true,\n                        \"schedule\": \"weekly\",\n                        \"task_id\": null,\n                        \"required\": true,\n                        \"per_site\": false,\n                        \"calculated\": false\n                    }\n                ]\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get results",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"experiment_id\",\"status\",\"headline\",\"summary\",\"outcomes\",\"verdict\",\"conclusion\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/results",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "results"
                            ],
                            "query": []
                        },
                        "description": "The findings as the app computes them: a headline, each outcome by variant against the control with whether the difference is likely real (verdict likely, unclear or chance), and the conclusion the team saved.\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/results",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "results"
                                    ],
                                    "query": []
                                },
                                "description": "The findings as the app computes them: a headline, each outcome by variant against the control with whether the difference is likely real (verdict likely, unclear or chance), and the conclusion the team saved.\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"experiment_id\": 42,\n        \"status\": \"completed\",\n        \"headline\": \"Main outcome, Fruit count: Sungold against Early Girl, likely a real difference.\",\n        \"summary\": \"Fruit count: Sungold 38 (+46% vs control, better; likely a real difference).\",\n        \"outcomes\": [\n            {\n                \"reading_id\": 56,\n                \"reading\": \"Fruit count\",\n                \"unit\": null,\n                \"is_main_outcome\": true,\n                \"better\": \"higher\",\n                \"variants\": [\n                    {\n                        \"variant\": \"Early Girl\",\n                        \"is_control\": true,\n                        \"n\": 6,\n                        \"value\": \"26\",\n                        \"vs_control_percent\": null,\n                        \"improvement_percent\": null,\n                        \"verdict\": null,\n                        \"verdict_text\": null,\n                        \"p\": null,\n                        \"method\": null,\n                        \"likely_range_percent\": null\n                    },\n                    {\n                        \"variant\": \"Sungold\",\n                        \"is_control\": false,\n                        \"n\": 6,\n                        \"value\": \"38\",\n                        \"vs_control_percent\": 46.2,\n                        \"improvement_percent\": 46.2,\n                        \"verdict\": \"likely\",\n                        \"verdict_text\": \"Likely a real difference\",\n                        \"p\": 0.004,\n                        \"method\": \"welch\",\n                        \"likely_range_percent\": [\n                            18,\n                            74\n                        ]\n                    }\n                ]\n            }\n        ],\n        \"verdict\": \"supported\",\n        \"conclusion\": \"Sungold out-yielded Early Girl in every bed.\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Start",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"status\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/start",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "start"
                            ],
                            "query": []
                        },
                        "description": "Start a draft. Readings can be recorded from then on. warning says when there is no proper control. Refused with 409 when it isn’t a draft, and 422 when the plan’s running-experiment limit is reached.\n\nScope: experiments:run\nTeam permission: experiments.run",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/start",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "start"
                                    ],
                                    "query": []
                                },
                                "description": "Start a draft. Readings can be recorded from then on. warning says when there is no proper control. Refused with 409 when it isn’t a draft, and 422 when the plan’s running-experiment limit is reached.\n\nScope: experiments:run\nTeam permission: experiments.run",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"status\": \"active\",\n        \"…\": []\n    },\n    \"warning\": null\n}"
                        }
                    ]
                },
                {
                    "name": "Pause",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"status\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/pause",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "pause"
                            ],
                            "query": []
                        },
                        "description": "Pause a running experiment: participants’ links and reminders stop until it is resumed. Team members can still record late entries.\n\nScope: experiments:run\nTeam permission: experiments.run",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/pause",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "pause"
                                    ],
                                    "query": []
                                },
                                "description": "Pause a running experiment: participants’ links and reminders stop until it is resumed. Team members can still record late entries.\n\nScope: experiments:run\nTeam permission: experiments.run",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"status\": \"paused\",\n        \"…\": []\n    },\n    \"warning\": null\n}"
                        }
                    ]
                },
                {
                    "name": "Resume",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"status\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/resume",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "resume"
                            ],
                            "query": []
                        },
                        "description": "Resume a paused experiment.\n\nScope: experiments:run\nTeam permission: experiments.run",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/resume",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "resume"
                                    ],
                                    "query": []
                                },
                                "description": "Resume a paused experiment.\n\nScope: experiments:run\nTeam permission: experiments.run",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"status\": \"active\",\n        \"…\": []\n    },\n    \"warning\": null\n}"
                        }
                    ]
                },
                {
                    "name": "End",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"status\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/end",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "end"
                            ],
                            "query": []
                        },
                        "description": "End the attempt as completed, failed or abandoned, saying what happened. Closing questions open, as in the app (participants who answer them are emailed). Completing waits for the closing questions when the experiment asks for them first (409).\n\nScope: experiments:run\nTeam permission: experiments.run",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"outcome\": \"completed\",\n    \"reason\": \"Ran the full season; all plants harvested.\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/end",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "end"
                                    ],
                                    "query": []
                                },
                                "description": "End the attempt as completed, failed or abandoned, saying what happened. Closing questions open, as in the app (participants who answer them are emailed). Completing waits for the closing questions when the experiment asks for them first (409).\n\nScope: experiments:run\nTeam permission: experiments.run",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"outcome\": \"completed\",\n    \"reason\": \"Ran the full season; all plants harvested.\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"status\": \"completed\",\n        \"…\": []\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Write the conclusion",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"verdict\",\"conclusion\",\"next_steps\",\"concluded_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/conclusion",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "conclusion"
                            ],
                            "query": []
                        },
                        "description": "The team’s verdict on the hypothesis, the conclusion and next steps, as on the Summary tab. Sending it again replaces them.\n\nScope: experiments:write\nTeam permission: experiments.update",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"verdict\": \"supported\",\n    \"conclusion\": \"Sungold out-yielded Early Girl in every bed.\",\n    \"next_steps\": \"Try Sungold against Sweet 100 next year.\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "PUT",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/conclusion",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "conclusion"
                                    ],
                                    "query": []
                                },
                                "description": "The team’s verdict on the hypothesis, the conclusion and next steps, as on the Summary tab. Sending it again replaces them.\n\nScope: experiments:write\nTeam permission: experiments.update",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"verdict\": \"supported\",\n    \"conclusion\": \"Sungold out-yielded Early Girl in every bed.\",\n    \"next_steps\": \"Try Sungold against Sweet 100 next year.\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"verdict\": \"supported\",\n        \"conclusion\": \"Sungold out-yielded Early Girl in every bed.\",\n        \"next_steps\": \"Try Sungold against Sweet 100 next year.\",\n        \"concluded_at\": \"2026-09-02T18:00:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Restart as a new attempt",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"title\",\"status\",\"design\",\"hypothesis\",\"project\",\"started_at\",\"planned_end_on\",\"concluded_at\",\"created_at\",\"url\",\"restarted_from_id\",\"variants\",\"stages\",\"steps\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/restart",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "restart"
                            ],
                            "query": []
                        },
                        "description": "A new draft with the same protocol (constants, variants, stages, steps, tasks and readings) that links back to this one; subjects and recorded data aren’t copied. For drafts, replace the design instead (409).\n\nScope: experiments:run\nTeam permission: experiments.run and experiments.create",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"Which tomato variety yields most? (attempt 2)\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/restart",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "restart"
                                    ],
                                    "query": []
                                },
                                "description": "A new draft with the same protocol (constants, variants, stages, steps, tasks and readings) that links back to this one; subjects and recorded data aren’t copied. For drafts, replace the design instead (409).\n\nScope: experiments:run\nTeam permission: experiments.run and experiments.create",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"title\": \"Which tomato variety yields most? (attempt 2)\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 42,\n        \"title\": \"Which tomato variety yields most?\",\n        \"status\": \"active\",\n        \"design\": \"groups\",\n        \"hypothesis\": \"Sungold gives more fruit per plant than Early Girl.\",\n        \"project\": {\n            \"id\": 7,\n            \"name\": \"Garden trials\"\n        },\n        \"started_at\": \"2026-05-01T14:00:00+00:00\",\n        \"planned_end_on\": \"2026-08-31\",\n        \"concluded_at\": null,\n        \"created_at\": \"2026-04-28T19:12:03+00:00\",\n        \"url\": \"https://app.example.com/app/3/experiments/42\",\n        \"restarted_from_id\": 42,\n        \"variants\": [],\n        \"stages\": [],\n        \"steps\": []\n    }\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Subjects",
            "description": "The things being tested: plants, pots, beds. external_id is yours to use, for example a seed lot number in your own system.",
            "item": [
                {
                    "name": "List subjects",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"external_id\",\"status\",\"variant\",\"stage\",\"left_out_of_results\",\"left_out_reason\",\"created_at\"]); });",
                                    "    }",
                                    "    pm.test(\"Comes in pages\", function () { pm.expect(body).to.have.property(\"meta\"); pm.expect(body.meta).to.include.all.keys([\"page\", \"per_page\", \"total\", \"last_page\"]); });",
                                    "    { const v = body?.data?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"subject\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects"
                            ],
                            "query": [
                                {
                                    "key": "status",
                                    "value": "",
                                    "description": "active, completed, failed or dropped.",
                                    "disabled": true
                                },
                                {
                                    "key": "variant_id",
                                    "value": "",
                                    "description": "Only this variant.",
                                    "disabled": true
                                },
                                {
                                    "key": "external_id",
                                    "value": "",
                                    "description": "Only the subject with this external_id.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Page number, from 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Results per page, 1–100 (default 25).",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "The experiment’s subjects, with their variant and current stage.\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects"
                                    ],
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "",
                                            "description": "active, completed, failed or dropped.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "variant_id",
                                            "value": "",
                                            "description": "Only this variant.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "external_id",
                                            "value": "",
                                            "description": "Only the subject with this external_id.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, from 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Results per page, 1–100 (default 25).",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "The experiment’s subjects, with their variant and current stage.\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 301,\n            \"name\": \"Sungold – plant 1\",\n            \"external_id\": \"LOT-2026-014\",\n            \"status\": \"active\",\n            \"variant\": {\n                \"id\": 88,\n                \"name\": \"Sungold\"\n            },\n            \"stage\": {\n                \"id\": 12,\n                \"name\": \"Flowering\"\n            },\n            \"left_out_of_results\": false,\n            \"left_out_reason\": null,\n            \"created_at\": \"2026-04-28T19:12:03+00:00\"\n        }\n    ],\n    \"meta\": {\n        \"page\": 1,\n        \"per_page\": 25,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a subject",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"external_id\",\"status\",\"variant\",\"stage\",\"left_out_of_results\",\"left_out_reason\",\"created_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}"
                            ],
                            "query": []
                        },
                        "description": "One subject.\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}"
                                    ],
                                    "query": []
                                },
                                "description": "One subject.\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 301,\n        \"name\": \"Sungold – plant 1\",\n        \"external_id\": \"LOT-2026-014\",\n        \"status\": \"active\",\n        \"variant\": {\n            \"id\": 88,\n            \"name\": \"Sungold\"\n        },\n        \"stage\": {\n            \"id\": 12,\n            \"name\": \"Flowering\"\n        },\n        \"left_out_of_results\": false,\n        \"left_out_reason\": null,\n        \"created_at\": \"2026-04-28T19:12:03+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Add subjects",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"external_id\",\"status\",\"variant\",\"stage\",\"left_out_of_results\",\"left_out_reason\",\"created_at\"]); });",
                                    "    }",
                                    "    { const v = body?.data?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"subject\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects"
                            ],
                            "query": []
                        },
                        "description": "Add up to 200 subjects at once. Each needs a variant when the experiment compares variants (and must not have one when it doesn’t). Not for ended attempts, or when one thing takes turns (409). The plan’s subjects-per-experiment limit applies (422).\n\nScope: experiments:write\nTeam permission: subjects.manage",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"subjects\": [{\"name\": \"Plant from Postman\", \"variant_id\": {{variant}}, \"external_id\": \"LOT-{{$timestamp}}\"}]}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects"
                                    ],
                                    "query": []
                                },
                                "description": "Add up to 200 subjects at once. Each needs a variant when the experiment compares variants (and must not have one when it doesn’t). Not for ended attempts, or when one thing takes turns (409). The plan’s subjects-per-experiment limit applies (422).\n\nScope: experiments:write\nTeam permission: subjects.manage",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"subjects\": [{\"name\": \"Plant from Postman\", \"variant_id\": {{variant}}, \"external_id\": \"LOT-{{$timestamp}}\"}]}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 301,\n            \"name\": \"Sungold – plant 1\",\n            \"external_id\": \"LOT-2026-014\",\n            \"status\": \"active\",\n            \"variant\": {\n                \"id\": 88,\n                \"name\": \"Sungold\"\n            },\n            \"stage\": {\n                \"id\": 12,\n                \"name\": \"Flowering\"\n            },\n            \"left_out_of_results\": false,\n            \"left_out_reason\": null,\n            \"created_at\": \"2026-04-28T19:12:03+00:00\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Update a subject",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"status\",\"id\",\"name\",\"external_id\",\"variant\",\"stage\",\"left_out_of_results\",\"left_out_reason\",\"created_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}"
                            ],
                            "query": []
                        },
                        "description": "Rename a subject, change its external_id, or its status: dropped or failed when it’s lost (a plant died), completed when it’s finished early. Send only what changes.\n\nScope: experiments:write\nTeam permission: subjects.manage",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"status\": \"failed\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "PATCH",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}"
                                    ],
                                    "query": []
                                },
                                "description": "Rename a subject, change its external_id, or its status: dropped or failed when it’s lost (a plant died), completed when it’s finished early. Send only what changes.\n\nScope: experiments:write\nTeam permission: subjects.manage",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"status\": \"failed\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"status\": \"failed\",\n        \"id\": 301,\n        \"name\": \"Sungold – plant 1\",\n        \"external_id\": \"LOT-2026-014\",\n        \"variant\": {\n            \"id\": 88,\n            \"name\": \"Sungold\"\n        },\n        \"stage\": {\n            \"id\": 12,\n            \"name\": \"Flowering\"\n        },\n        \"left_out_of_results\": false,\n        \"left_out_reason\": null,\n        \"created_at\": \"2026-04-28T19:12:03+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Leave out of results",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"left_out_of_results\",\"left_out_reason\",\"id\",\"name\",\"external_id\",\"status\",\"variant\",\"stage\",\"created_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/leave-out",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "leave-out"
                            ],
                            "query": []
                        },
                        "description": "Stop a subject counting in comparisons, charts and shared results, with why. Its readings are kept, and can still be recorded; the summary lists it with the reason.\n\nScope: experiments:write\nTeam permission: experiments.update",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"reason\": \"Eaten by a slug on day 4\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/leave-out",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}",
                                        "leave-out"
                                    ],
                                    "query": []
                                },
                                "description": "Stop a subject counting in comparisons, charts and shared results, with why. Its readings are kept, and can still be recorded; the summary lists it with the reason.\n\nScope: experiments:write\nTeam permission: experiments.update",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"reason\": \"Eaten by a slug on day 4\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"left_out_of_results\": true,\n        \"left_out_reason\": \"Eaten by a slug on day 4\",\n        \"id\": 301,\n        \"name\": \"Sungold – plant 1\",\n        \"external_id\": \"LOT-2026-014\",\n        \"status\": \"active\",\n        \"variant\": {\n            \"id\": 88,\n            \"name\": \"Sungold\"\n        },\n        \"stage\": {\n            \"id\": 12,\n            \"name\": \"Flowering\"\n        },\n        \"created_at\": \"2026-04-28T19:12:03+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Count in results again",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"external_id\",\"status\",\"variant\",\"stage\",\"left_out_of_results\",\"left_out_reason\",\"created_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/count-again",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "count-again"
                            ],
                            "query": []
                        },
                        "description": "Undo leaving a subject out of results.\n\nScope: experiments:write\nTeam permission: experiments.update",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/count-again",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}",
                                        "count-again"
                                    ],
                                    "query": []
                                },
                                "description": "Undo leaving a subject out of results.\n\nScope: experiments:write\nTeam permission: experiments.update",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 301,\n        \"name\": \"Sungold – plant 1\",\n        \"external_id\": \"LOT-2026-014\",\n        \"status\": \"active\",\n        \"variant\": {\n            \"id\": 88,\n            \"name\": \"Sungold\"\n        },\n        \"stage\": {\n            \"id\": 12,\n            \"name\": \"Flowering\"\n        },\n        \"left_out_of_results\": false,\n        \"left_out_reason\": null,\n        \"created_at\": \"2026-04-28T19:12:03+00:00\"\n    }\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Recording",
            "description": "Record as Record data does in the app, with the same checks: ranges and categories, steps in order, taking turns, and timing rules. Each call saves everything or nothing. A refusal is 422 with a plain message and a reason code (see Errors). Times without an offset are read in the person’s time zone; leave them out for now.",
            "item": [
                {
                    "name": "What’s due",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"experiment\",\"items\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/due",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "due"
                            ],
                            "query": [
                                {
                                    "key": "experiment_id",
                                    "value": "",
                                    "description": "Only this experiment.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "What needs doing now in each running experiment: tasks and readings due and for which subjects, with how overdue, and steps ready to mark complete (kind task, reading, complete or waiting).\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/due",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "due"
                                    ],
                                    "query": [
                                        {
                                            "key": "experiment_id",
                                            "value": "",
                                            "description": "Only this experiment.",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "What needs doing now in each running experiment: tasks and readings due and for which subjects, with how overdue, and steps ready to mark complete (kind task, reading, complete or waiting).\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"experiment\": {\n                \"id\": 42,\n                \"title\": \"Which tomato variety yields most?\",\n                \"status\": \"active\"\n            },\n            \"items\": [\n                {\n                    \"kind\": \"task\",\n                    \"label\": \"Water\",\n                    \"step\": {\n                        \"id\": 20,\n                        \"title\": \"Grow\"\n                    },\n                    \"task_id\": 31,\n                    \"reading_id\": null,\n                    \"subjects\": [\n                        {\n                            \"id\": 301,\n                            \"name\": \"Sungold – plant 1\",\n                            \"overdue_days\": 1\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Recording form",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"experiment\",\"subject\",\"steps\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/recording-form",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "recording-form"
                            ],
                            "query": [
                                {
                                    "key": "subject_id",
                                    "value": "",
                                    "description": "One subject, to see what is open for it.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "What can be recorded now: the steps the subjects are on, with their tasks and readings. With subject_id, each also says whether it is open for that subject (state open, waiting or closed), and why not.\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/recording-form",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "recording-form"
                                    ],
                                    "query": [
                                        {
                                            "key": "subject_id",
                                            "value": "",
                                            "description": "One subject, to see what is open for it.",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "What can be recorded now: the steps the subjects are on, with their tasks and readings. With subject_id, each also says whether it is open for that subject (state open, waiting or closed), and why not.\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"experiment\": {\n            \"id\": 42,\n            \"title\": \"Which tomato variety yields most?\",\n            \"status\": \"active\",\n            \"design\": \"groups\",\n            \"hypothesis\": \"Sungold gives more fruit per plant than Early Girl.\",\n            \"project\": {\n                \"id\": 7,\n                \"name\": \"Garden trials\"\n            },\n            \"started_at\": \"2026-05-01T14:00:00+00:00\",\n            \"planned_end_on\": \"2026-08-31\",\n            \"concluded_at\": null,\n            \"created_at\": \"2026-04-28T19:12:03+00:00\",\n            \"url\": \"https://app.example.com/app/3/experiments/42\"\n        },\n        \"subject\": {\n            \"id\": 301,\n            \"name\": \"Sungold – plant 1\",\n            \"external_id\": \"LOT-2026-014\",\n            \"status\": \"active\",\n            \"variant\": {\n                \"id\": 88,\n                \"name\": \"Sungold\"\n            },\n            \"stage\": {\n                \"id\": 12,\n                \"name\": \"Flowering\"\n            },\n            \"left_out_of_results\": false,\n            \"left_out_reason\": null,\n            \"created_at\": \"2026-04-28T19:12:03+00:00\"\n        },\n        \"steps\": [\n            {\n                \"id\": 20,\n                \"title\": \"Grow\",\n                \"anytime\": false,\n                \"tasks\": [\n                    {\n                        \"id\": 31,\n                        \"title\": \"Water\",\n                        \"…\": [],\n                        \"readings\": [],\n                        \"open\": {\n                            \"state\": \"open\",\n                            \"reason\": null,\n                            \"opens_at\": null,\n                            \"waiting_for_stage\": null\n                        }\n                    }\n                ],\n                \"readings\": [\n                    {\n                        \"id\": 55,\n                        \"name\": \"Plant height\",\n                        \"…\": [],\n                        \"open\": {\n                            \"state\": \"open\",\n                            \"reason\": null,\n                            \"opens_at\": null,\n                            \"waiting_for_stage\": null\n                        }\n                    }\n                ]\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List readings",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"subject_id\",\"reading_id\",\"reading\",\"value\",\"unit\",\"task_log_id\",\"flagged\",\"flag_reason\",\"recorded_at\"]); });",
                                    "    }",
                                    "    pm.test(\"Comes in pages\", function () { pm.expect(body).to.have.property(\"meta\"); pm.expect(body.meta).to.include.all.keys([\"page\", \"per_page\", \"total\", \"last_page\"]); });",
                                    "    { const v = body?.data?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"reading\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings"
                            ],
                            "query": [
                                {
                                    "key": "subject_id",
                                    "value": "",
                                    "description": "Only this subject.",
                                    "disabled": true
                                },
                                {
                                    "key": "reading_id",
                                    "value": "",
                                    "description": "Only this reading.",
                                    "disabled": true
                                },
                                {
                                    "key": "since",
                                    "value": "",
                                    "description": "ISO 8601 date or time: recorded at or after.",
                                    "disabled": true
                                },
                                {
                                    "key": "until",
                                    "value": "",
                                    "description": "ISO 8601 date or time: recorded at or before.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Page number, from 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Results per page, 1–100 (default 25).",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Recorded readings, oldest first. Flagged readings are included, marked flagged.\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "readings"
                                    ],
                                    "query": [
                                        {
                                            "key": "subject_id",
                                            "value": "",
                                            "description": "Only this subject.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "reading_id",
                                            "value": "",
                                            "description": "Only this reading.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "since",
                                            "value": "",
                                            "description": "ISO 8601 date or time: recorded at or after.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "until",
                                            "value": "",
                                            "description": "ISO 8601 date or time: recorded at or before.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, from 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Results per page, 1–100 (default 25).",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "Recorded readings, oldest first. Flagged readings are included, marked flagged.\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 9001,\n            \"subject_id\": 301,\n            \"reading_id\": 55,\n            \"reading\": \"Plant height\",\n            \"value\": 14.5,\n            \"unit\": \"in\",\n            \"task_log_id\": null,\n            \"flagged\": false,\n            \"flag_reason\": null,\n            \"recorded_at\": \"2026-06-01T13:30:00+00:00\"\n        }\n    ],\n    \"meta\": {\n        \"page\": 1,\n        \"per_page\": 25,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Record readings",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"subject_id\",\"reading_id\",\"reading\",\"value\",\"unit\",\"task_log_id\",\"flagged\",\"flag_reason\",\"recorded_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings"
                            ],
                            "query": []
                        },
                        "description": "Readings for one subject at one moment. Numbers go without units. Readings tied to a task are recorded with the task (task-logs); photos with the photos endpoint.\n\nScope: data:write\nTeam permission: data.record",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"subject_id\": {{subject}}, \"readings\": [{\"reading_id\": {{readingId}}, \"value\": 14.5}]}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "readings"
                                    ],
                                    "query": []
                                },
                                "description": "Readings for one subject at one moment. Numbers go without units. Readings tied to a task are recorded with the task (task-logs); photos with the photos endpoint.\n\nScope: data:write\nTeam permission: data.record",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"subject_id\": {{subject}}, \"readings\": [{\"reading_id\": {{readingId}}, \"value\": 14.5}]}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 9001,\n            \"subject_id\": 301,\n            \"reading_id\": 55,\n            \"reading\": \"Plant height\",\n            \"value\": 14.5,\n            \"unit\": \"in\",\n            \"task_log_id\": null,\n            \"flagged\": false,\n            \"flag_reason\": null,\n            \"recorded_at\": \"2026-06-01T13:30:00+00:00\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Log a task",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"subject_id\",\"task_id\",\"notes\",\"done_at\",\"readings\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/task-logs",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "task-logs"
                            ],
                            "query": []
                        },
                        "description": "A task done for one or more subjects, with notes and the readings that go with it (the same values for each subject). A task that moves the stage moves it. When a task’s required readings differ per subject, log it one subject at a time.\n\nScope: data:write\nTeam permission: data.record",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"task_id\": {{task}}, \"subject_ids\": [{{subject}}], \"notes\": \"Logged from Postman\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/task-logs",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "task-logs"
                                    ],
                                    "query": []
                                },
                                "description": "A task done for one or more subjects, with notes and the readings that go with it (the same values for each subject). A task that moves the stage moves it. When a task’s required readings differ per subject, log it one subject at a time.\n\nScope: data:write\nTeam permission: data.record",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"task_id\": {{task}}, \"subject_ids\": [{{subject}}], \"notes\": \"Logged from Postman\"}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 700,\n            \"subject_id\": 301,\n            \"task_id\": 31,\n            \"notes\": \"Deep soak after the heat.\",\n            \"done_at\": \"2026-06-01T15:00:00+00:00\",\n            \"readings\": []\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Move a stage",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"subject\",\"moved_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/stage",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "stage"
                            ],
                            "query": []
                        },
                        "description": "Move a subject to another stage (“plant 2 is flowering now”), optionally dated when it happened.\n\nScope: data:write\nTeam permission: data.record",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"stage_id\": {{stage}}, \"note\": \"Moved from Postman\"}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/stage",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}",
                                        "stage"
                                    ],
                                    "query": []
                                },
                                "description": "Move a subject to another stage (“plant 2 is flowering now”), optionally dated when it happened.\n\nScope: data:write\nTeam permission: data.record",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"stage_id\": {{stage}}, \"note\": \"Moved from Postman\"}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"subject\": {\n            \"id\": 301,\n            \"name\": \"Sungold – plant 1\",\n            \"external_id\": \"LOT-2026-014\",\n            \"status\": \"active\",\n            \"variant\": {\n                \"id\": 88,\n                \"name\": \"Sungold\"\n            },\n            \"stage\": {\n                \"id\": 12,\n                \"name\": \"Flowering\"\n            },\n            \"left_out_of_results\": false,\n            \"left_out_reason\": null,\n            \"created_at\": \"2026-04-28T19:12:03+00:00\"\n        },\n        \"moved_at\": \"2026-06-01T15:00:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Upload a photo",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"subject_id\",\"reading_id\",\"reading\",\"value\",\"unit\",\"task_log_id\",\"flagged\",\"flag_reason\",\"recorded_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/photos",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "photos"
                            ],
                            "query": []
                        },
                        "description": "A photo for one of the subject’s photo readings, sent as multipart/form-data. With task_log_id it is added to a task already logged. JPEG, PNG, GIF, WebP or AVIF, up to 12 MB; the plan’s daily upload limit applies.\n\nScope: data:write\nTeam permission: data.record",
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "photo",
                                    "type": "file",
                                    "src": []
                                },
                                {
                                    "key": "reading_id",
                                    "value": "{{photoReadingId}}",
                                    "type": "text"
                                }
                            ]
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/photos",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}",
                                        "photos"
                                    ],
                                    "query": []
                                },
                                "description": "A photo for one of the subject’s photo readings, sent as multipart/form-data. With task_log_id it is added to a task already logged. JPEG, PNG, GIF, WebP or AVIF, up to 12 MB; the plan’s daily upload limit applies.\n\nScope: data:write\nTeam permission: data.record",
                                "body": {
                                    "mode": "formdata",
                                    "formdata": [
                                        {
                                            "key": "photo",
                                            "type": "file",
                                            "src": []
                                        },
                                        {
                                            "key": "reading_id",
                                            "value": "{{photoReadingId}}",
                                            "type": "text"
                                        }
                                    ]
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 9002,\n        \"subject_id\": 301,\n        \"reading_id\": 57,\n        \"reading\": \"Photo\",\n        \"value\": null,\n        \"unit\": null,\n        \"task_log_id\": null,\n        \"flagged\": false,\n        \"flag_reason\": null,\n        \"recorded_at\": \"2026-06-01T15:00:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Complete a step",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"subject_id\",\"step_id\",\"status\",\"completed_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/steps/{{step}}/complete",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "steps",
                                "{{step}}",
                                "complete"
                            ],
                            "query": []
                        },
                        "description": "Mark a step complete for a subject, as Record data’s button does. Refused (step_not_ready) until its required tasks and readings are done; anytime steps are never completed. What’s due lists steps ready for this (kind complete).\n\nScope: data:write\nTeam permission: data.record",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/steps/{{step}}/complete",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}",
                                        "steps",
                                        "{{step}}",
                                        "complete"
                                    ],
                                    "query": []
                                },
                                "description": "Mark a step complete for a subject, as Record data’s button does. Refused (step_not_ready) until its required tasks and readings are done; anytime steps are never completed. What’s due lists steps ready for this (kind complete).\n\nScope: data:write\nTeam permission: data.record",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"subject_id\": 301,\n        \"step_id\": 20,\n        \"status\": \"completed\",\n        \"completed_at\": \"2026-08-30T16:00:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Reopen a step",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"subject_id\",\"step_id\",\"status\",\"completed_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/steps/{{step}}/reopen",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "subjects",
                                "{{subject}}",
                                "steps",
                                "{{step}}",
                                "reopen"
                            ],
                            "query": []
                        },
                        "description": "Put a step marked complete by mistake back in progress for the subject. Nothing recorded changes.\n\nScope: data:write\nTeam permission: data.record",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/subjects/{{subject}}/steps/{{step}}/reopen",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "subjects",
                                        "{{subject}}",
                                        "steps",
                                        "{{step}}",
                                        "reopen"
                                    ],
                                    "query": []
                                },
                                "description": "Put a step marked complete by mistake back in progress for the subject. Nothing recorded changes.\n\nScope: data:write\nTeam permission: data.record",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"subject_id\": 301,\n        \"step_id\": 20,\n        \"status\": \"in_progress\",\n        \"completed_at\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Flag a reading",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"flagged\",\"flag_reason\",\"id\",\"subject_id\",\"reading_id\",\"reading\",\"value\",\"unit\",\"task_log_id\",\"recorded_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings/{{reading}}/flag",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings",
                                "{{reading}}",
                                "flag"
                            ],
                            "query": []
                        },
                        "description": "Mark a reading as wrong, with why: it stops counting in results but is kept, since readings are research data and never deleted. To correct a reading, flag it and record the right value.\n\nScope: data:write\nTeam permission: data.flag",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"reason\": \"Measured the wrong plant.\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings/{{reading}}/flag",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "readings",
                                        "{{reading}}",
                                        "flag"
                                    ],
                                    "query": []
                                },
                                "description": "Mark a reading as wrong, with why: it stops counting in results but is kept, since readings are research data and never deleted. To correct a reading, flag it and record the right value.\n\nScope: data:write\nTeam permission: data.flag",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"reason\": \"Measured the wrong plant.\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"flagged\": true,\n        \"flag_reason\": \"Measured the wrong plant.\",\n        \"id\": 9001,\n        \"subject_id\": 301,\n        \"reading_id\": 55,\n        \"reading\": \"Plant height\",\n        \"value\": 14.5,\n        \"unit\": \"in\",\n        \"task_log_id\": null,\n        \"recorded_at\": \"2026-06-01T13:30:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Unflag a reading",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"flagged\",\"flag_reason\",\"id\",\"subject_id\",\"reading_id\",\"reading\",\"value\",\"unit\",\"task_log_id\",\"recorded_at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings/{{reading}}/unflag",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "readings",
                                "{{reading}}",
                                "unflag"
                            ],
                            "query": []
                        },
                        "description": "Count a flagged reading again.\n\nScope: data:write\nTeam permission: data.flag",
                        "body": {
                            "mode": "raw",
                            "raw": "{}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/readings/{{reading}}/unflag",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "readings",
                                        "{{reading}}",
                                        "unflag"
                                    ],
                                    "query": []
                                },
                                "description": "Count a flagged reading again.\n\nScope: data:write\nTeam permission: data.flag",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"flagged\": false,\n        \"flag_reason\": null,\n        \"id\": 9001,\n        \"subject_id\": 301,\n        \"reading_id\": 55,\n        \"reading\": \"Plant height\",\n        \"value\": 14.5,\n        \"unit\": \"in\",\n        \"task_log_id\": null,\n        \"recorded_at\": \"2026-06-01T13:30:00+00:00\"\n    }\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Journal",
            "description": "An experiment’s journal: notes, and events that may have affected it (a heat wave, a sprinkler left on). Events also show on the Summary timeline and in the findings when they’re serious.",
            "item": [
                {
                    "name": "Read the journal",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"kind\",\"by\",\"at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/journal",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "journal"
                            ],
                            "query": []
                        },
                        "description": "Notes and events, newest first. kind tells them apart.\n\nScope: experiments:read\nTeam permission: experiments.view"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/journal",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "journal"
                                    ],
                                    "query": []
                                },
                                "description": "Notes and events, newest first. kind tells them apart.\n\nScope: experiments:read\nTeam permission: experiments.view"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 5,\n            \"kind\": \"event\",\n            \"title\": \"Heat wave\",\n            \"description\": \"Three days over 100°F.\",\n            \"severity\": \"high\",\n            \"subject_id\": null,\n            \"by\": \"Sam Rivera\",\n            \"at\": \"2026-07-12T20:00:00+00:00\"\n        },\n        {\n            \"id\": 9,\n            \"kind\": \"note\",\n            \"text\": \"Mulched every bed.\",\n            \"by\": \"Sam Rivera\",\n            \"at\": \"2026-06-03T15:00:00+00:00\"\n        }\n    ]\n}"
                        }
                    ]
                },
                {
                    "name": "Add a note",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"kind\",\"text\",\"by\",\"at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/notes",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "notes"
                            ],
                            "query": []
                        },
                        "description": "A note in the journal.\n\nScope: data:write\nTeam permission: journal.write",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"text\": \"Mulched every bed.\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/notes",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "notes"
                                    ],
                                    "query": []
                                },
                                "description": "A note in the journal.\n\nScope: data:write\nTeam permission: journal.write",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"text\": \"Mulched every bed.\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 9,\n        \"kind\": \"note\",\n        \"text\": \"Mulched every bed.\",\n        \"by\": \"Sam Rivera\",\n        \"at\": \"2026-06-03T15:00:00+00:00\"\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Log an event",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"kind\",\"title\",\"description\",\"severity\",\"subject_id\",\"by\",\"at\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/events",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "experiments",
                                "{{experiment}}",
                                "events"
                            ],
                            "query": []
                        },
                        "description": "Something that affected the experiment, optionally one subject. High and critical events are listed with the findings as something that may affect results.\n\nScope: data:write\nTeam permission: journal.write",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"Heat wave\",\n    \"description\": \"Three days over 100°F.\",\n    \"severity\": \"high\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/experiments/{{experiment}}/events",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "experiments",
                                        "{{experiment}}",
                                        "events"
                                    ],
                                    "query": []
                                },
                                "description": "Something that affected the experiment, optionally one subject. High and critical events are listed with the findings as something that may affect results.\n\nScope: data:write\nTeam permission: journal.write",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\n    \"title\": \"Heat wave\",\n    \"description\": \"Three days over 100°F.\",\n    \"severity\": \"high\"\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 5,\n        \"kind\": \"event\",\n        \"title\": \"Heat wave\",\n        \"description\": \"Three days over 100°F.\",\n        \"severity\": \"high\",\n        \"subject_id\": null,\n        \"by\": \"Sam Rivera\",\n        \"at\": \"2026-07-12T20:00:00+00:00\"\n    }\n}"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Logbooks",
            "description": "Logbooks track anything over time: rainfall, soil temperature, what was planted where. You see your own private logbooks and the team’s shared ones. Make new ones with POST /designs (kind logbook).",
            "item": [
                {
                    "name": "List logbooks",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"description\",\"visibility\",\"created_at\"]); });",
                                    "    }",
                                    "    pm.test(\"Comes in pages\", function () { pm.expect(body).to.have.property(\"meta\"); pm.expect(body.meta).to.include.all.keys([\"page\", \"per_page\", \"total\", \"last_page\"]); });",
                                    "    { const v = body?.data?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"logbook\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/logbooks",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "logbooks"
                            ],
                            "query": [
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "Part of a name.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Page number, from 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Results per page, 1–100 (default 25).",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Logbooks this person can see, by name.\n\nScope: logbooks:read"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/logbooks",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "logbooks"
                                    ],
                                    "query": [
                                        {
                                            "key": "search",
                                            "value": "",
                                            "description": "Part of a name.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, from 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Results per page, 1–100 (default 25).",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "Logbooks this person can see, by name.\n\nScope: logbooks:read"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 4,\n            \"name\": \"Rain gauge\",\n            \"description\": \"Daily rainfall.\",\n            \"visibility\": \"team\",\n            \"created_at\": \"2026-03-02T10:00:00+00:00\"\n        }\n    ],\n    \"meta\": {\n        \"page\": 1,\n        \"per_page\": 25,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Get a logbook",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"name\",\"description\",\"visibility\",\"created_at\",\"fields\"]); });",
                                    "    }",
                                    "    { const v = body?.data?.fields?.[0]?.id; if (v !== undefined && v !== null) { pm.collectionVariables.set(\"field\", String(v)); } }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "logbooks",
                                "{{logbook}}"
                            ],
                            "query": []
                        },
                        "description": "One logbook with its fields (ids you use when adding entries). Fields with input false are worked out, not filled in.\n\nScope: logbooks:read"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "logbooks",
                                        "{{logbook}}"
                                    ],
                                    "query": []
                                },
                                "description": "One logbook with its fields (ids you use when adding entries). Fields with input false are worked out, not filled in.\n\nScope: logbooks:read"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 4,\n        \"name\": \"Rain gauge\",\n        \"description\": \"Daily rainfall.\",\n        \"visibility\": \"team\",\n        \"created_at\": \"2026-03-02T10:00:00+00:00\",\n        \"fields\": [\n            {\n                \"id\": 10,\n                \"name\": \"Rain\",\n                \"type\": \"decimal\",\n                \"unit\": \"in\",\n                \"min\": 0,\n                \"max\": null,\n                \"categories\": null,\n                \"required\": true,\n                \"input\": true\n            }\n        ]\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "List entries",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 200\", function () { pm.expect(pm.response.code).to.equal(200); });",
                                    "if (pm.response.code === 200) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"logbook_id\",\"recorded_at\",\"note\",\"values\"]); });",
                                    "    }",
                                    "    pm.test(\"Comes in pages\", function () { pm.expect(body).to.have.property(\"meta\"); pm.expect(body.meta).to.include.all.keys([\"page\", \"per_page\", \"total\", \"last_page\"]); });",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}/entries",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "logbooks",
                                "{{logbook}}",
                                "entries"
                            ],
                            "query": [
                                {
                                    "key": "since",
                                    "value": "",
                                    "description": "ISO 8601: recorded at or after.",
                                    "disabled": true
                                },
                                {
                                    "key": "until",
                                    "value": "",
                                    "description": "ISO 8601: recorded at or before.",
                                    "disabled": true
                                },
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Page number, from 1.",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "Results per page, 1–100 (default 25).",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Entries, newest first.\n\nScope: logbooks:read"
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}/entries",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "logbooks",
                                        "{{logbook}}",
                                        "entries"
                                    ],
                                    "query": [
                                        {
                                            "key": "since",
                                            "value": "",
                                            "description": "ISO 8601: recorded at or after.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "until",
                                            "value": "",
                                            "description": "ISO 8601: recorded at or before.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, from 1.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Results per page, 1–100 (default 25).",
                                            "disabled": true
                                        }
                                    ]
                                },
                                "description": "Entries, newest first.\n\nScope: logbooks:read"
                            },
                            "status": "OK",
                            "code": 200,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": [\n        {\n            \"id\": 120,\n            \"logbook_id\": 4,\n            \"recorded_at\": \"2026-06-01T12:00:00+00:00\",\n            \"note\": null,\n            \"values\": [\n                {\n                    \"field_id\": 10,\n                    \"field\": \"Rain\",\n                    \"value\": 0.4,\n                    \"unit\": \"in\"\n                }\n            ]\n        }\n    ],\n    \"meta\": {\n        \"page\": 1,\n        \"per_page\": 25,\n        \"total\": 1,\n        \"last_page\": 1\n    },\n    \"links\": {\n        \"next\": null,\n        \"prev\": null\n    }\n}"
                        }
                    ]
                },
                {
                    "name": "Add an entry",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test(\"Status is 201\", function () { pm.expect(pm.response.code).to.equal(201); });",
                                    "if (pm.response.code === 201) {",
                                    "    const body = pm.response.json();",
                                    "    pm.test(\"Answers with data\", function () { pm.expect(body).to.have.property(\"data\"); });",
                                    "    const sample = Array.isArray(body.data) ? body.data[0] : body.data;",
                                    "    if (sample) {",
                                    "        pm.test(\"Has the documented fields\", function () { pm.expect(sample).to.include.all.keys([\"id\",\"logbook_id\",\"recorded_at\",\"note\",\"values\"]); });",
                                    "    }",
                                    "}"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}/entries",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "teams",
                                "{{team}}",
                                "logbooks",
                                "{{logbook}}",
                                "entries"
                            ],
                            "query": []
                        },
                        "description": "An entry: values by field id, an optional note, and when. The logbook’s required fields must be given.\n\nScope: logbooks:write",
                        "body": {
                            "mode": "raw",
                            "raw": "{\"values\": [{\"field_id\": {{field}}, \"value\": 0.4}]}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": [
                        {
                            "name": "Example",
                            "originalRequest": {
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Accept",
                                        "value": "application/json"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ],
                                "url": {
                                    "raw": "{{baseUrl}}/teams/{{team}}/logbooks/{{logbook}}/entries",
                                    "host": [
                                        "{{baseUrl}}"
                                    ],
                                    "path": [
                                        "teams",
                                        "{{team}}",
                                        "logbooks",
                                        "{{logbook}}",
                                        "entries"
                                    ],
                                    "query": []
                                },
                                "description": "An entry: values by field id, an optional note, and when. The logbook’s required fields must be given.\n\nScope: logbooks:write",
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"values\": [{\"field_id\": {{field}}, \"value\": 0.4}]}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                }
                            },
                            "status": "Created",
                            "code": 201,
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "_postman_previewlanguage": "json",
                            "body": "{\n    \"data\": {\n        \"id\": 121,\n        \"logbook_id\": 4,\n        \"recorded_at\": \"2026-06-01T18:00:00+00:00\",\n        \"note\": null,\n        \"values\": [\n            {\n                \"field_id\": 10,\n                \"field\": \"Rain\",\n                \"value\": 0.4,\n                \"unit\": \"in\"\n            }\n        ]\n    }\n}"
                        }
                    ]
                }
            ]
        }
    ]
}