Skip to content

Risk routes: accept, assess, close, treat

The Risk Verbs accept, assess, close, treat as api.sb routes, with inputs, result, refusals and an example.

Reference for Risk, one group of Risk routes.

Risk.accept

Accept records an officer’s signed Decision to carry a Risk untreated until its next review. Verb page.

Text
POST /{namespace}/risks/{risk}/accept

Path: risk. Body, as JSON: the other inputs. Emits Risk.accepted.

Inputs

InputTypeRequiredDescription
riskRiskrequiredThe Risk to carry.
reasontextrequiredWhy it is carried, recorded as a Decision.

Returns

OutputTypeRequiredDescription
riskRiskrequiredThe accepted Risk.

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/risks/risk_a3Rw0qcmRy/accept \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "risk": {
    "$id": "https://api.sb/leaseline.app/risks/risk_a3Rw0qcmRy",
    "$type": "Risk",
    "scope": "Example scope",
    "likelihood": 1,
    "impact": 1,
    "owner": "role_oloMFMUeCH"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Risk.accept",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Risk.assess

Assess scores a Risk’s likelihood and impact from the Startup’s records and sets its next review date. Verb page.

Text
POST /{namespace}/risks/{risk}/assess

Path: risk. Body, as JSON: the other inputs. Emits Risk.assessed.

Inputs

InputTypeRequiredDescription
riskRiskrequiredThe Risk to score.
likelihoodintegerrequiredLikelihood from 1 to 5.
impactintegerrequiredImpact from 1 to 5.

Returns

OutputTypeRequiredDescription
riskRiskrequiredThe scored Risk.

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/risks/risk_a3Rw0qcmRy/assess \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"likelihood":1,"impact":1}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "risk": {
    "$id": "https://api.sb/leaseline.app/risks/risk_a3Rw0qcmRy",
    "$type": "Risk",
    "scope": "Example scope",
    "likelihood": 1,
    "impact": 1,
    "owner": "role_oloMFMUeCH"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Risk.assess",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Risk.close

Close ends a Risk that can no longer happen and keeps it, with its scores and treatments, forever. Verb page.

Text
POST /{namespace}/risks/{risk}/close

Path: risk. Body, as JSON: the other inputs. Emits Risk.closed.

Inputs

InputTypeRequiredDescription
riskRiskrequiredThe Risk to close.
reasontextrequiredWhy it can no longer happen.

Returns

OutputTypeRequiredDescription
riskRiskrequiredThe closed Risk, kept forever.

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/risks/risk_a3Rw0qcmRy/close \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "risk": {
    "$id": "https://api.sb/leaseline.app/risks/risk_a3Rw0qcmRy",
    "$type": "Risk",
    "scope": "Example scope",
    "likelihood": 1,
    "impact": 1,
    "owner": "role_oloMFMUeCH"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Risk.close",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Risk.treat

Treat links a Risk to the Controls that lower it and records the score it should reach. Verb page.

Text
POST /{namespace}/risks/{risk}/treat

Path: risk. Body, as JSON: the other inputs. Emits Risk.treated.

Inputs

InputTypeRequiredDescription
riskRiskrequiredThe Risk to treat.
controlslist of ControlrequiredThe Controls that lower it.

Returns

OutputTypeRequiredDescription
riskRiskrequiredThe treated Risk.

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/risks/risk_a3Rw0qcmRy/treat \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"controls":["control_o4pMmXUeCH"]}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "risk": {
    "$id": "https://api.sb/leaseline.app/risks/risk_a3Rw0qcmRy",
    "$type": "Risk",
    "scope": "Example scope",
    "likelihood": 1,
    "impact": 1,
    "owner": "role_oloMFMUeCH"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Risk.treat",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}