SpaceCorp API

Base URL

https://api.spacecorp.io/v1

The API is read-only and needs no authentication. It serves the same validated content as this website and changes only when a new version of the site is deployed.

Versioning

v1 is a compatibility namespace. Additive changes, such as new fields or endpoints, stay inv1. A breaking change gets a new namespace (/v2) instead of changing v1. Deployment IDs and source commits identify a deployment; they are not compatibility versions.

Endpoints

EndpointReturns
GET /v1API root: name, version and entry points.
GET /v1/healthLiveness. Always no-store.
GET /v1/versionDeployment and version identifiers.
GET /v1/projectsPublic projects.
GET /v1/projects/:idOne project by stable ID (public or unlisted).
GET /v1/projects/:id/relationshipsRelationships of one project.
GET /v1/projects/:id/factsSource-linked facts recorded for one project.
GET /v1/researchPublic research.
GET /v1/research/:idOne research document by ID.
GET /v1/buildsPublic builds.
GET /v1/releasesReleases with their artifact manifests.
GET /v1/releases/:idOne release by ID, with artifact URLs and checksums.
GET /v1/sourcesThe public source registry.
GET /v1/sources/:idOne source record by ID.
GET /v1/factsFacts. Filters: ?project=, ?subject=, ?verification= (unverified, verified, conflicting, ...).
GET /v1/facts/:idOne fact with its evidence and verification state.
GET /v1/subsystemsVehicle subsystems with part counts. Filter: ?project=.
GET /v1/subsystems/:idOne subsystem with its linked fact IDs.
GET /v1/partsPart objects, 100 per page. Filters and paging below.
GET /v1/parts/:idOne part: twin part ID, subsystem, parent, evidence level, OEM number, fastener, torque, notes.
GET /v1/graphProject graph: nodes and edges.
GET /v1/artifacts/:idOne artifact manifest by ID.

Collections return { data: [...], meta }; single resources return { data: {...}, meta }.meta carries schema_version, source_commit and content_revision.

curl https://api.spacecorp.io/v1/projects/scp-a8

{
  "data": {
    "id": "scp-a8",
    "slug": "audi-a8-d2",
    "name": "Audi A8 D2 Digital Twin",
    "status": "active",
    "maturity": "alpha",
    ...
  },
  "meta": {
    "schema_version": "1.0.0",
    "source_commit": "…",
    "content_revision": "…"
  }
}

Parts

/v1/parts is paginated: ?limit= (1 to 500, default 100) and ?offset=.meta.pagination gives total, offset, limit andnext_offset (null on the last page). Exact-match filters: ?project=,?subsystem=, ?parent=, ?evidence= (measured, photo, catalogue, published, generic) and ?fastener=true or false.

Schemas

JSON Schemas (draft 2020-12) for every canonical record:

Errors

Errors never include stack traces. Codes: bad_request, not_found,method_not_allowed, rate_limited, internal_error. Every response carries anX-Request-ID header, and error bodies repeat it.

{
  "error": {
    "code": "not_found",
    "message": "Project not found.",
    "request_id": "6f1c…"
  }
}

Caching

Collections and individual records: Cache-Control: public, max-age=300, s-maxage=3600. Health and version: no-store. Responses carry an ETag; send it back in If-None-Matchto receive 304 Not Modified.

curl -i https://api.spacecorp.io/v1/projects \
  -H 'If-None-Match: "<etag from a previous response>"'

HTTP/2 304

CORS and methods

Access-Control-Allow-Origin: *. Only GET, HEAD and OPTIONS are accepted; other methods return 405.