Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Report a resource a build acted on

PUT/v1/builds/{buildId}/resources/{resourceType}/{resourceId}Report a resource a build acted on

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

Records that the build created, acted on, or deleted a platform resource — the provenance a deploy run leaves behind. Idempotent: re-reporting the same resource updates the row rather than adding one, and never weakens the recorded action. The resource must belong to the caller's workspace, and must still be findable: a soft-deleted resource can be reported, but project, database, service_key and config_variable leave no row behind, so a build that deletes one must report it before deleting it. Reporting a deployment as created also attaches the deployment to the build and records the app it deployed into, both in the same transaction, because a deployment relates its build to that app whether or not the reporter says so.

Parameters

buildIdstringpathrequired

pattern ^(bld_)?([cC][^\s-]{8,}|[a-z0-9]+)$

resourceTypestringpathrequired

one of "project", "branch", "database", "app", "deployment", "bucket", "service_key", "config_variable"

one of "project", "branch", "database", "app", "deployment", "bucket", "service_key", "config_variable"

resourceIdstringpathrequired

maxLength 200 · minLength 1

Request body

application/json
object
actionstringrequired

The strongest effect the build had on the resource. Re-reporting is safe: a weaker action never overwrites a stronger one, so `created` survives a later `acted_on`.

one of "created", "acted_on", "deleted"

Example request
{
  "action": "acted_on"
}

Responses

204Recorded.
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Build or resource not found, or the caller's workspace does not own it (indistinguishable).application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
429Rate limit exceeded.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu