Skip to content

Readout routes: update, delete

The Readout Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Readout, one group of Readout routes.

Readout.update

Changes the given properties of a Readout. Verb page.

Text
PATCH /{namespace}/readouts/{id}

Path: id. Body, as JSON: the other inputs. Emits Readout.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Readout.
valuenumberThe Metric’s value for the Variant.
nintegerHow many exposed units it counts.
intervaljsonThe low and high bounds of the estimate.
readabilitystringOne of A, B, C, or inadmissible: how far the number can be trusted.
pooledbooleanTrue when exposures from sibling Startups or earlier Portfolio results are pooled in.

Returns

OutputTypeRequiredDescription
readoutReadoutrequiredThe Readout.

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.

Example

Terminal
curl -X PATCH https://api.sb/leaseline.app/readouts/readout_dlRDxjf2vt \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":1}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "readout": {
    "$id": "https://api.sb/leaseline.app/readouts/readout_dlRDxjf2vt",
    "$type": "Readout",
    "value": 1,
    "n": 1,
    "readability": "A"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Readout.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Readout.delete

Deletes a Readout: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/readouts/{id}

Path: id. Emits Readout.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Readout.

Returns

OutputTypeRequiredDescription
readoutReadoutrequiredThe Readout.

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.

Example

Terminal
curl -X DELETE https://api.sb/leaseline.app/readouts/readout_dlRDxjf2vt \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "readout": {
    "$id": "https://api.sb/leaseline.app/readouts/readout_dlRDxjf2vt",
    "$type": "Readout",
    "value": 1,
    "n": 1,
    "readability": "A"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Readout.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}