Skip to content

Evidence routes

Every Evidence Verb as an api.sb route, with its inputs, result, refusals and an example.

Reference for Evidence.

Evidence.create

Creates an Evidence. Verb page.

Text
POST /{namespace}/evidence

Body, as JSON: the inputs. Emits Evidence.created.

Inputs

InputTypeRequiredDescription
gradestringrequiredOne of Behavior, Commitment, or Opinion. An Opinion weighs zero.
quotetextThe words or reading, verbatim.
sourcestringWho or what it came from: an Interview, an Experiment, or a Metric reading.
bindsstringThe slot it grades, as Hypothesis#<slot>.
forcestringOne of push, pull, anxiety, or habit: the switching force it shows.
observedAtdatetimeWhen it was observed.
distinctIcpMembersintegerHow many distinct ICP members it represents.
outsidebooleanComputed: true when its source shares no owner, Studio account, Agreement, or sibling chain with the Startup.
askedByPartyThe Customer or Contact who asked through an App, the Portal or an Agent; their ask is Opinion grade.
stancestringWhether it supports or refutes the slot it binds; a cancel refutes the slot its reason tests.
interviewInterviewAn Interview captures quotes and commitments, each graded as Evidence.

Returns

OutputTypeRequiredDescription
evidenceEvidencerequiredThe Evidence.

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 POST https://api.sb/leaseline.app/evidence \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"grade":"Behavior"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "evidence": {
    "$id": "https://api.sb/leaseline.app/evidence/evidence_6xsa6iYImd",
    "$type": "Evidence",
    "grade": "Behavior"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Evidence.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Evidence.get

Returns one Evidence by id. Verb page.

Text
GET /{namespace}/evidence/{id}

Path: id. Query: the other inputs. Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Evidence.
atstringA time or Version name: the record as it stood then. Unset: as it stands now.

Returns

OutputTypeRequiredDescription
evidenceEvidencerequiredThe Evidence.

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 https://api.sb/leaseline.app/evidence/evidence_6xsa6iYImd \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "$type": "Evidence",
  "$id": "https://api.sb/leaseline.app/evidence/evidence_6xsa6iYImd",
  "evidence": {
    "$id": "https://api.sb/leaseline.app/evidence/evidence_6xsa6iYImd",
    "$type": "Evidence",
    "grade": "Behavior"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/evidence/evidence_6xsa6iYImd",
    "up": "https://api.sb/leaseline.app/evidence"
  }
}

Evidence.list

Returns Evidence, newest first, one page at a time. Verb page.

Text
GET /{namespace}/evidence

Query: the inputs. Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
limitintegerAt most this many records, up to 100. The default is 20.
afterstringThe cursor from the previous page.
wherestringA filter over the properties, such as paidAt = null and total.amount > 500.
sortstringProperties to sort by, comma-separated; a leading minus sorts descending.
totalbooleanTrue adds the match count as meta.total, exact up to 10,000 matches and estimated above.
facetsstringProperties to count by value, comma-separated, returned as meta.facets.
fieldsstringProperties to return on each record, comma-separated; $id and $type always return.
includestringRelated records to embed in place of their URLs, comma-separated.
depthintegerHow many levels of related records to embed. The default is 1.
qstringWords to match across the text properties, ranked by relevance.
matchstringRanks the search by words, or meaning; words is the default.

Returns

OutputTypeRequiredDescription
evidencelist of EvidencerequiredOne page of Evidence.

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 "https://api.sb/leaseline.app/evidence?limit=20" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "$type": "Evidence",
  "evidence": [
    {
      "$id": "https://api.sb/leaseline.app/evidence/evidence_6xsa6iYImd",
      "$type": "Evidence",
      "grade": "Behavior"
    }
  ],
  "meta": {
    "limit": 20,
    "after": "evidence_6xsa6iYImd"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/evidence?limit=20",
    "next": "https://api.sb/leaseline.app/evidence?after=evidence_6xsa6iYImd"
  }
}