Stackurity Start free trial

API reference Trust badge

Trust badge

15 operations. Base URL https://app.stackurity.dev/api/v1 on Stackurity Cloud; see authentication.

The "Monitored by Stackurity" badge and its public trust page (Stackurity Cloud only).

Every organisation's trust badges

GET /admin/trust-badges

Role: instance admin

For Stackurity's operators, with each badge's last decision. Audited. Stackurity Cloud only (404 elsewhere).

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

A trust badge's decisions with their evidence

GET /admin/trust-badges/{id}/history

Role: instance admin

Full evidence for each decision, newest first. Each read is audited. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
id requiredpathstring
limitquerystring

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Trust pages listed in search engines

GET /public/trust

Role: none

?listed=1: slugs of the badges that are on, listed and active, for the sitemap. No sign-in; 120 requests a minute per address. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
listedquerystring

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

A trust page's public data

GET /public/trust/{slug}

Role: none

slug, name, website_url, logo_url, state (active or not_active), last_evaluated_at, kinds, unsupported_kinds, show_marketing, listed, rule_version. Never an id, a count or a package, host, repository, image or project name, nor an item the customer switched off. 404 for an unknown slug or a badge that is off. No sign-in; 120 requests a minute per address. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
slug requiredpathstring

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

The organisation's trust badges

GET /trust-badges

Role: admin, or an admin of every project or asset the badge covers

The badges the caller may manage, the plan's limits and the badge terms to accept. Stackurity Cloud only (404 elsewhere).

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Make a trust badge (off)

POST /trust-badges

Role: admin, or an admin of every project or asset the badge covers

slug, scope_kind (projects or assets), project_ids or asset_ids, display_name, website_url and the item switches. 402 beyond the plan's badges, 409 for a taken address. Audited. Stackurity Cloud only (404 elsewhere).

Request body

application/json, required: object

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Change a trust badge

PUT /trust-badges/{id}

Role: admin, or an admin of every project or asset the badge covers

The same body as making one. Audited with the values before and after. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
id requiredpathstring

Request body

application/json, required: object

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Delete a trust badge

DELETE /trust-badges/{id}

Role: admin, or an admin of every project or asset the badge covers

Its history stays until the retention purge. Audited. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
id requiredpathstring

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Turn a trust badge on or off

POST /trust-badges/{id}/enabled

Role: admin, or an admin of every project or asset the badge covers

enabled. On needs the current terms accepted. Decided at once; turning off takes effect at once and purges cached copies. Audited. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
id requiredpathstring

Request body

application/json, required: object

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

A trust badge's status timeline

GET /trust-badges/{id}/history

Role: admin, or an admin of every project or asset the badge covers

Decisions, newest first: time, result, reason and rule version. Each read is audited. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
id requiredpathstring
limitquerystring

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Preview a trust badge

GET /trust-badges/{id}/preview

Role: admin, or an admin of every project or asset the badge covers

What the public would see if the badge were on now: the trust data and images, from a live run of the rule (nothing written). Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
id requiredpathstring

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError

Accept the badge terms

POST /trust-badges/{id}/terms

Role: admin, or an admin of every project or asset the badge covers

version (the current one) and accepted: true; a person in the dashboard only. Audited. Stackurity Cloud only (404 elsewhere).

Parameters

ParameterInTypeDescription
id requiredpathstring

Request body

application/json, required: object

Responses

StatusMeaningBody
2XXSuccessobject
4XXAn errorError
5XXAn errorError