Organisations
Turn a repository's badge on, or give it a new address
A README badge of the repository's status at an unguessable address that names no repository.
POST
/orgs/{org}/evidence/badgesTL;DR
| Question | Answer |
|---|---|
| What does it do? | Turn a repository's badge on, or give it a new address. |
| What does it take? | A JSON body of type EvidenceBadgeBody. |
| What does it return? | Status 201 with a body of type EvidenceBadge. |
| What can go wrong? | 400 the body is not valid; 401 not signed in; 403 a member or a reader (orgs.forbidden), a plan without compliance evidence (plan.compliance_evidence_not_included), or an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
A README badge of the repository's status at an unguessable address that names no repository. Shown once; asking again replaces it. The owner and admins, on Enterprise. Audited.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Request body
The body has the type EvidenceBadgeBody.
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | The repository, as owner/name. at most 140 characters; pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,38}\/[A-Za-z0-9._-]{1,100}$. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | The badge's address and the Markdown for a README. | EvidenceBadge |
| 400 | The body is not valid. | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | A member or a reader (orgs.forbidden), a plan without compliance evidence (plan.compliance_evidence_not_included), or an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
Response body
A 201 answer has the type EvidenceBadge.
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | |
url | string | yes | The badge, an SVG. The address is the secret: it names no repository. |
markdown | string | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |