API reference Trust badge
Trust badge
The "Monitored by Stackurity" badge and its public trust page (Stackurity Cloud only).
Every organisation's trust badges
GET /admin/trust-badges
For Stackurity's operators, with each badge's last decision. Audited. Stackurity Cloud only (404 elsewhere).
Responses
A trust badge's decisions with their evidence
GET /admin/trust-badges/{id}/history
Full evidence for each decision, newest first. Each read is audited. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | |
limit | query | string |
Responses
Trust pages listed in search engines
GET /public/trust
?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
| Parameter | In | Type | Description |
|---|---|---|---|
listed | query | string |
Responses
A trust page's public data
GET /public/trust/{slug}
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
| Parameter | In | Type | Description |
|---|---|---|---|
slug required | path | string |
Responses
A trust page's logo
GET /public/trust/{slug}/logo
The customer's logo (PNG, JPEG or WebP) when the trust data names it; 404 otherwise. No sign-in. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
slug required | path | string |
Responses
The organisation's trust badges
GET /trust-badges
The badges the caller may manage, the plan's limits and the badge terms to accept. Stackurity Cloud only (404 elsewhere).
Responses
Make a trust badge (off)
POST /trust-badges
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
Change a trust badge
PUT /trust-badges/{id}
The same body as making one. Audited with the values before and after. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
Request body
application/json, required: object
Responses
Delete a trust badge
DELETE /trust-badges/{id}
Its history stays until the retention purge. Audited. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
Responses
Turn a trust badge on or off
POST /trust-badges/{id}/enabled
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
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
Request body
application/json, required: object
Responses
A trust badge's status timeline
GET /trust-badges/{id}/history
Decisions, newest first: time, result, reason and rule version. Each read is audited. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | |
limit | query | string |
Responses
Upload a trust page logo
PUT /trust-badges/{id}/logo
The image as the body: PNG, JPEG or WebP, at most 256 KiB. Paid plans only. Audited. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
Request body
application/json, required: object
Responses
Remove a trust page logo
DELETE /trust-badges/{id}/logo
Audited. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
Responses
Preview a trust badge
GET /trust-badges/{id}/preview
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
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
Responses
Accept the badge terms
POST /trust-badges/{id}/terms
version (the current one) and accepted: true; a person in the dashboard only. Audited. Stackurity Cloud only (404 elsewhere).
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
Request body
application/json, required: object