Skip to content

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.

Text
POST /{namespace}/hypotheses/{hypothesis}/drop

Path: hypothesis. Body, as JSON: the other inputs. Emits Hypothesis.dropped.

Inputs

InputTypeRequiredDescription
hypothesisHypothesisrequiredThe Hypothesis to retire.
reasontextrequiredWhy it is dropped.

Returns

OutputTypeRequiredDescription
hypothesisHypothesisrequiredThe dropped Hypothesis.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

Terminal
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"}'
JSON
{
  "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.

Text
POST /{namespace}/hypotheses/{hypothesis}/test

Path: hypothesis. Body, as JSON: the other inputs. Emits Hypothesis.tested.

Inputs

InputTypeRequiredDescription
hypothesisHypothesisrequiredThe Hypothesis to test.
experimentExperimentrequiredThe Experiment that decides it.

Returns

OutputTypeRequiredDescription
hypothesisHypothesisrequiredThe Hypothesis, now testing.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

Terminal
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"}'
JSON
{
  "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"
  }
}