API reference
The academy-api HTTP endpoints, generated from the OpenAPI specification.
Generated from the OpenAPI specification (CNCR-IRF academy API 0.1.0). It documents the currently specified endpoints; more are covered by the spec over time.
health
/healthzLiveness probe
- 200 The process is up.
/readyzReadiness probe
- 200 The process can reach its dependencies.
- 503 A dependency is not ready.
catalog
/api/v1/scenariosList scenarios
trackin querydifficultyin querystatusin query
- 200 A page of scenarios.
- 400
/api/v1/scenariosRegister a new draft scenario
- 201 The created scenario.
- 400
- 403
/api/v1/scenarios/{id}Get a scenario by id
in
- 200 The scenario.
- 404
/api/v1/scenarios/{id}Replace a draft lab's content
in
- 200 The updated scenario.
- 400
- 403
- 404
- 409
/api/v1/scenarios/{id}/validateTransition a scenario from draft to validated
in
- 200 The updated scenario.
- 404
- 409
/api/v1/scenarios/{id}/publishTransition a scenario from validated to published
in
- 200 The updated scenario.
- 404
- 409
/api/v1/scenarios/{id}/image-sourceWhere this lab's own image lives
in
- 200 Where the lab's image lives.
- 404
/api/v1/scenarios/{id}/image-sourcePoint this lab at an image your organisation hosts
in
- 204 Recorded.
- 400
- 403
- 404
/api/v1/scenarios/{id}/image-sourceStop using an externally hosted image for this lab
in
- 204 Removed.
- 404
/api/v1/badges/availabilityWhether badges can reach anybody for this caller
- 200 How far the chain gets.
/api/v1/paths/{id}/holdersWho has finished this learning path
idin path · required
- 200 Who has finished it.
- 404
public
/api/v1/public/ctfList the public competitions
- 200 Every public round, open and finished. An empty list is an ordinary answer.
/api/v1/public/subscriptionsAsk to hear when the next competition opens
- 202 The request is recorded and a confirmation is on its way.
- 400
/api/v1/public/subscriptions/confirmConfirm a request to hear about competitions
- 200 Confirmed.
- 400
- 404
/api/v1/public/subscriptions/unsubscribeLeave the list
- 204 They are not on the list.
- 400
/api/v1/public/ctf/{id}Read one public competition
in
- 200 The event.
- 400
- 404
/api/v1/public/ctf/{id}/entriesEnter a public competition
in
- 202 The entry is recorded and the link is on its way.
- 400
- 404
- 409
/api/v1/public/registrationWhether a person may make an account of their own here
- 200 Whether the form should be offered, and the texts it must link to.
/api/v1/public/registration/challengeA proof of work for one registration
- 200 A challenge. Never cached.
- 403 Registration is closed on this deployment.
- 429 Too many challenges from one address this hour.
- 503 The limits could not be counted, so registration is refused.
/api/v1/public/registrationsRegister as an organisation of one
- 202 The registration is taken and a message is on its way.
- 400 Not an address, the terms not accepted, or a proof of work that is wrong, expired or already used. The message says which.
- 403 Registration is closed on this deployment.
- 409 The terms or the privacy notice changed after the page was opened; the versions sent are not the ones this build serves.
- 422 The address is at a domain this deployment does not take registrations from (ADR-240), or the intent names a plan not bought on the site (ADR-244). Refused before anything is counted. An intent naming a currency the site does not price in is refused the same way, as 400.
- 429 Too many registrations from one address this hour.
- 503 The deployment's hourly cap is reached, or the limits could not be counted.
/api/v1/entrant/runs/{id}/artifactsDownload a public competitor's evidence bundle
idin path · required
- 200 The evidence, as a zip.
- 404
- 409
/api/v1/entrant/runs/{id}/artifacts/manifestList the files in a public competitor's evidence bundle
idin path · required
- 200 The bundle's files.
- 404
- 409
platform
/api/v1/statusWhat works, for the people who use the platform
- 200 What works.
- 503 This deployment records no component health, so nothing can be reported.
/api/v1/platform/federationsWho has asked to sign in through their own identity provider
- 200 Every organisation's single sign-on request.
- 403
- 503 This deployment does not serve the vendor console.
/api/v1/platform/clientsEvery organisation on this deployment, for the vendor
- 200 The deployment's organisations.
- 503 This deployment does not serve the client list.
/api/v1/platform/clientsTake a customer on
- 201 The organisation, as the list serves it. Every count is zero.
- 400 The slug is not a shape this platform and the identity provider can carry, or the name is empty. The message names which.
- 409 Another organisation already holds that slug. A refusal rather than a resolve-to-the-existing-one: the two are indistinguishable to whoever filled in the form and their consequences are not.
- 503 This deployment does not manage clients.
/api/v1/platform/clients/personalPersonal accounts, a page at a time, for the vendor
offsetin querylimitin query
- 200 One page of personal accounts.
- 400 An offset or a limit that is not a page.
- 503 This deployment does not serve the client list.
/api/v1/platform/clients/{id}Correct an organisation's display name
idin path · required
- 204 Renamed.
- 400 An organisation needs a name.
- 404
/api/v1/platform/clients/{id}/suspensionWithdraw or restore an organisation's access
idin path · required
- 204 Recorded.
- 400
- 503 This deployment does not manage clients.
/api/v1/platform/clients/{id}/subscriptionGrant an organisation a plan directly
idin path · required
- 204 Recorded.
- 400
- 409 The organisation has a live Stripe subscription. Change the plan in Stripe.
/api/v1/platform/subscriptionsWhat every organisation subscribes to
- 200 Every organisation with a subscription recorded.
/api/v1/billing/stripe/webhookReceive a subscription change from Stripe
Stripe-Signaturein header · required · Stripe's timestamp and one or more v1 signatures. More than one appears while the endpoint secret is being rotated, and any match is accepted.
- 204 Applied, already applied, superseded by a newer event, about something this platform does not model, or about a subscription that names no plan or no organisation of ours. All are acknowledgements: none of them should be sent again.
- 400 The signature did not verify, the body is not a Snapshot event (a Thin event is refused naming Snapshot), or a subscription event carries no subscription.
- 500 The event could not be applied for a reason that might not recur. Stripe should retry.
- 503 This deployment accepts no Stripe webhooks.
/api/v1/platform/healthWhat each run-mode says about the dependencies it needs
- 200 The deployment's component reports.
- 503 This deployment records no component health, so nothing can be reported. Said rather than answered with an empty report, which would read as a healthy one.
/api/v1/platform/range-providersList the range providers this deployment offers
- 200 Every provider the platform knows about.
/api/v1/platform/range-providers/{name}Switch one range provider on or off
in
- 204 Switched.
- 400
- 404
/api/v1/platform/cloud-accountsList the cloud subscriptions this deployment can build in
- 200 Every account, retired ones included.
/api/v1/platform/cloud-accountsAdd a cloud subscription
- 201 The account as recorded.
- 400
- 409
/api/v1/platform/cloud-accounts/{id}Edit a cloud subscription, or retire and reinstate it
in
- 204 Updated.
- 400
- 404
- 409
/api/v1/platform/cloud-accounts/{id}Remove a cloud subscription nothing was built in
in
- 204 Removed.
- 409
/api/v1/platform/cloud-estatesList the standing cloud estates
- 200 Every estate and the account it lives in, plus the platform modules that have no estate recorded and therefore build in whichever subscription the deployment was started with.
/api/v1/platform/cloud-estatesRecord an environment built outside the platform
- 201 The estate as recorded.
- 400
- 409
/api/v1/platform/cloud-estates/{id}Edit one estate, or mark it standing or taken down
in
- 204 Updated.
- 400
- 404
- 409
/api/v1/platform/cloud-estates/{id}Forget an estate recorded by mistake
in
- 204 Forgotten.
- 404
preferences
/api/v1/preferences/Read the signed-in member's own preferences
- 200 The member's preferences, or the unsaved defaults when they have never saved any.
- 401 Unauthenticated.
/api/v1/preferences/Save the signed-in member's own preferences
- 200 The saved preferences.
- 400 The body was not valid.
- 401 Unauthenticated.
/api/v1/preferences/organisationRead what the organisation has chosen for all of its members
- 200 The organisation's choices, or the unsaved defaults when it has never chosen.
- 401 Unauthenticated.
/api/v1/preferences/organisationSet what the organisation has chosen for all of its members
- 200 The saved choices.
- 400 The body was not valid.
- 401 Unauthenticated.
- 403 The caller does not hold the team.manage capability.
billing
The organisation's own plan: what it is on, what is for sale, buying a plan on the site and managing what was bought through Stripe (ADR-232). The platform holds no amount; what the offer shows is read from Stripe when it is asked.
/api/v1/public/offerWhat is for sale, for somebody with no account
- 200 What is for sale, or `available: false` with the sentence that says why nothing is.
- 429 Too many requests from one place.
/api/v1/billing/planThe caller's organisation's plan
- 200 The organisation's plan.
- 401 Unauthenticated.
/api/v1/billing/offerWhat is for sale
- 200 What is for sale, or why nothing is.
- 401 Unauthenticated.
/api/v1/billing/checkoutBuy a plan on the site
- 201 The purchase is recorded and Stripe has a page for it.
- 400 `startNow` is missing or false, the interval is neither `month` nor `year`, or the currency is neither `eur` nor `usd`.
- 403 The caller does not hold `billing.manage`.
- 409 The organisation already holds an entitled plan. The detail says how it is changed: by contact for a plan Invictus set up, through Manage billing for one live through Stripe.
- 422 The plan is not bought on the site, or it is not sold at that interval (Standard is sold monthly only); the detail names the plan and the interval.
- 503 Buying a plan is not set up on this deployment, or a price is missing or mislabelled in Stripe.
/api/v1/billing/checkout/{sessionId}Where a purchase stands, on the way back from Stripe
sessionIdin path · required · Stripe's id for the Checkout Session, as the success URL carries it.
- 200 Where the purchase stands.
- 403 The caller does not hold `billing.manage`.
- 404
- 503 Buying a plan is not set up on this deployment.
/api/v1/billing/portalOpen Stripe's customer portal
- 201 Stripe has a portal page for the organisation.
- 403 The caller does not hold `billing.manage`.
- 409 Nothing was bought through Stripe, so there is no billing to manage.
- 503 Buying a plan is not set up on this deployment.
/api/v1/billing/intent/takeTake what the person came to buy
- 200 The organisation came to buy this.
- 204 Nothing to send the person to: no intent was kept, it was taken already, the caller may not buy, or the organisation cannot buy now.
federation
Controls belonging to whoever operates the deployment rather than to any organisation on it. Guarded by the platform_admin realm role, never by org_admin: one organisation's administrator must not be able to change what the other twenty-seven can run or where it gets built.
/api/v1/tenant/federationRead the organisation's single sign-on request and whether it works
- 200 The organisation's request.
- 401 Unauthenticated.
- 404 The organisation has requested no federation.
/api/v1/tenant/federationSet the organisation's own identity provider up
- 200 The recorded request.
- 400 The request was not valid (kind, alias, endpoint or a domain).
- 403 The caller does not hold the team.manage capability, or the organisation's plan does not include single sign-on (ADR-223), which the detail names.
/api/v1/tenant/federationWithdraw the organisation's request
- 204 Withdrawn.
- 403 The caller does not hold the team.manage capability.
/api/v1/tenant/federation/microsoftOffer to connect a Microsoft directory in one approval
- 200 Whether it is on offer, and where the approval happens.
- 403 The caller does not hold the team.manage capability, or the organisation's plan does not include single sign-on (ADR-223).
/api/v1/tenant/federation/microsoft/completeRecord a Microsoft directory that has just approved this platform
- 200 The recorded provider, which is being written.
- 400 The consent was declined, the state was not minted here or has expired, or Microsoft named no usable directory. Nothing was changed.
- 403 The caller does not hold the team.manage capability, the organisation's plan does not include single sign-on (ADR-223), or the state was minted for a different organisation.
- 404 This deployment has registered no Microsoft application of its own.
/api/v1/tenant/federation/checkProbe the declared provider and report what was found
- 200 What the probe found. A reachable provider with no problems is sound.
- 403 The caller does not hold the team.manage capability, or the organisation's plan does not include single sign-on (ADR-223).
- 404 The organisation has requested no federation, so there is nothing to check.
/api/v1/tenant/domainsList the domains the organisation claims, and which are proven
- 200 The claimed domains.
- 401 Unauthenticated.
/api/v1/tenant/domainsClaim a domain and mint its verification challenge
- 200 The claim, with the record to publish.
- 400 The domain was not valid.
- 403 The caller does not hold the team.manage capability.
/api/v1/tenant/domains/{domain}Withdraw a claimed domain
domainin path · required
- 204 Withdrawn.
- 403 The caller does not hold the team.manage capability.
/api/v1/tenant/domains/{domain}/verifyLook for the challenge in the domain's TXT records
domainin path · required
- 200 The domain, verified or not.
- 403 The caller does not hold the team.manage capability.
- 404 The organisation has not claimed that domain.