Build API reference
Remote source-to-artifact builds for Socra projects.
Published contracts: @socra/build-api@0.2.0.
Base URL
https://build.socra.cloudBuilds
An immutable source-to-artifact execution.
Create build
POST
/v1/buildsRequest body
project_idcustomrequiredrepositorystringrequiredpattern: ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$refstringoptionaldefault: "main" · min length: 1 · max length: 256profile"bun-web" | "bun-service" | "docker"requiredrootstringoptionaldefault: "."namestringrequiredmin length: 1 · max length: 63 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$source_archivestringoptionalmin length: 1source_digeststringoptionalpattern: ^sha256:[0-9a-f]{64}$Response
17 fields
idcustomrequiredproject_idcustomrequiredrepositorystringrequiredpattern: ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$refstringrequiredmin length: 1 · max length: 256commit_shastring | nullrequiredprofile"bun-web" | "bun-service" | "docker"requiredrootstringrequirednamestringrequiredmin length: 1 · max length: 63 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$status"queued" | "running" | "succeeded" | "failed" | "cancelled"requiredartifact_idstring | nullrequirederrorstring | nullrequiredlogsstringrequiredcache_hitbooleanrequiredcreated_atcustomrequiredupdated_atcustomrequiredstarted_atcustom | nullrequiredfinished_atcustom | nullrequiredList builds
GET
/v1/buildsQuery parameters
project_idcustomrequiredstatus"queued" | "running" | "succeeded" | "failed" | "cancelled"optionallimitintegeroptionalmin: 1 · max: 100afterstringoptionalResponse
2 fields
dataobject[]required
dataobject[]requiredidcustomrequiredproject_idcustomrequiredrepositorystringrequiredpattern: ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$refstringrequiredmin length: 1 · max length: 256commit_shastring | nullrequiredprofile"bun-web" | "bun-service" | "docker"requiredrootstringrequirednamestringrequiredmin length: 1 · max length: 63 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$status"queued" | "running" | "succeeded" | "failed" | "cancelled"requiredartifact_idstring | nullrequirederrorstring | nullrequiredlogsstringrequiredcache_hitbooleanrequiredcreated_atcustomrequiredupdated_atcustomrequiredstarted_atcustom | nullrequiredfinished_atcustom | nullrequiredhas_morebooleanrequiredGet build
GET
/v1/builds/{id}Path parameters
idcustomrequiredQuery parameters
No query parameters
Response
17 fields
idcustomrequiredproject_idcustomrequiredrepositorystringrequiredpattern: ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$refstringrequiredmin length: 1 · max length: 256commit_shastring | nullrequiredprofile"bun-web" | "bun-service" | "docker"requiredrootstringrequirednamestringrequiredmin length: 1 · max length: 63 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$status"queued" | "running" | "succeeded" | "failed" | "cancelled"requiredartifact_idstring | nullrequirederrorstring | nullrequiredlogsstringrequiredcache_hitbooleanrequiredcreated_atcustomrequiredupdated_atcustomrequiredstarted_atcustom | nullrequiredfinished_atcustom | nullrequiredCancel build
POST
/v1/builds/{id}/cancelPath parameters
idcustomrequiredRequest body
No request body
Response
17 fields
idcustomrequiredproject_idcustomrequiredrepositorystringrequiredpattern: ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$refstringrequiredmin length: 1 · max length: 256commit_shastring | nullrequiredprofile"bun-web" | "bun-service" | "docker"requiredrootstringrequirednamestringrequiredmin length: 1 · max length: 63 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$status"queued" | "running" | "succeeded" | "failed" | "cancelled"requiredartifact_idstring | nullrequirederrorstring | nullrequiredlogsstringrequiredcache_hitbooleanrequiredcreated_atcustomrequiredupdated_atcustomrequiredstarted_atcustom | nullrequiredfinished_atcustom | nullrequiredArtifacts
A content-addressed OCI image produced by a build.
List artifacts
GET
/v1/artifactsQuery parameters
project_idcustomrequiredbuild_idcustomoptionallimitintegeroptionalmin: 1 · max: 100afterstringoptionalResponse
2 fields
dataobject[]required
dataobject[]requiredidcustomrequiredproject_idcustomrequiredbuild_idcustomrequirednamestringrequiredimagestringrequiredpattern: ^[a-z0-9.-]+(?::[0-9]+)?\/[a-z0-9._/-]+@sha256:[0-9a-f]{64}$digeststringrequiredpattern: ^sha256:[0-9a-f]{64}$created_atcustomrequiredhas_morebooleanrequiredGet artifact
GET
/v1/artifacts/{id}Path parameters
idcustomrequiredQuery parameters
No query parameters
Response
7 fields
idcustomrequiredproject_idcustomrequiredbuild_idcustomrequirednamestringrequiredimagestringrequiredpattern: ^[a-z0-9.-]+(?::[0-9]+)?\/[a-z0-9._/-]+@sha256:[0-9a-f]{64}$digeststringrequiredpattern: ^sha256:[0-9a-f]{64}$created_atcustomrequired