[Experimental]

Report a build

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Records a build any deploy tool is running — a CI workflow, a deploy script, or Composer from a laptop. The workspace comes from the token, never from the body, which is what lets a build be reported before the project it will create exists. Supplying runIdentity makes the call idempotent: a repeat for the same run returns the build already recorded rather than a second one. The response is the same either way; a caller cannot tell whether it created the build or joined one.

A build reported with no runIdentity has no dedup key, so a client that retries a lost response creates a second build. Supply a runIdentity whenever the run has one.

post/v1/builds

Request

  • Base URL: https://api.prisma.io
  • URL: https://api.prisma.io/v1/builds
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://auth.prisma.io/authorize, token URL https://auth.prisma.io/token, scopes: workspace:admin, offline_access)
    • HTTP bearer

Request body

source'ci' | 'cli' required

ci for a build reported from a CI run, cli for a deploy run directly by a human or agent.

commitShastring required

Commit the build ran on.

branchNamestring required

Git branch name.

externalLogUrlstring uri

Link to the run's logs in the reporter's own system.

projectIdstring

Project the build targets, when it exists. A build may be reported before its project does.

branchIdstring
applicationTopologyContentHashstring

Content hash of the application topology this run deploys, as submitted to the application-topology endpoint. A value match, never a reference: equal hashes identify the same graph.

Response

The build. Returned whether this call created it or an earlier report of the same run did.

Changes

No recorded changes to this operation across all 1 revision of this API.