Hypothesis routes: drop, test
The Hypothesis Verbs drop, test as api.sb routes, with inputs, result, refusals and an example.
Reference for Hypothesis, one group of Hypothesis routes.
Hypothesis.drop
Drop retires a Hypothesis from active work and keeps it, with its Evidence, on record. Verb page.
POST /{namespace}/ hypotheses/ {hypothesis}/ dropPath: hypothesis. Body, as JSON: the other inputs. Emits Hypothesis.dropped.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
hypothesis | Hypothesis | required | The Hypothesis to retire. |
reason | text | required | Why it is dropped. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
hypothesis | Hypothesis | required | The dropped Hypothesis. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ hypotheses/ hypothesis_Z1gjx1kbtc/ drop \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"reason": "Example reason"}'{
"api": "https: //api.sb/ leaseline.app",
"hypothesis": {
"$id": "https: //api.sb/ leaseline.app/ hypotheses/ hypothesis_Z1gjx1kbtc",
"$type": "Hypothesis",
"statement": "Tracks lease renewals for small property managers.",
"kind": "founding",
"verdict": "Open",
"version": 1
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Hypothesis.drop",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Hypothesis.test
Test binds a Hypothesis to the Experiment that decides it and moves the Hypothesis to testing. Verb page.
POST /{namespace}/ hypotheses/ {hypothesis}/ testPath: hypothesis. Body, as JSON: the other inputs. Emits Hypothesis.tested.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
hypothesis | Hypothesis | required | The Hypothesis to test. |
experiment | Experiment | required | The Experiment that decides it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
hypothesis | Hypothesis | required | The Hypothesis, now testing. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ hypotheses/ hypothesis_Z1gjx1kbtc/ test \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"experiment": "experiment_IyIJJPngKt"}'{
"api": "https: //api.sb/ leaseline.app",
"hypothesis": {
"$id": "https: //api.sb/ leaseline.app/ hypotheses/ hypothesis_Z1gjx1kbtc",
"$type": "Hypothesis",
"statement": "Tracks lease renewals for small property managers.",
"kind": "founding",
"verdict": "Open",
"version": 1
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Hypothesis.test",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}