FousDocs

Allow or decline an action on a connected account

POST /v1/builds/{build_id}/approvals/{approval_id}

POST/v1/builds/{build_id}/approvals/{approval_id}

A build that runs with a connected account sends nothing but plain reads to it until a person allows each other request (GET /v1/builds/{build_id} shows it as pending_approval while waiting_for is approval). approve sends it; with scope build, every later request of the same kind in this build is allowed too. decline refuses it: the build goes on without it and never retries it. Show the person the action’s connection, method, URL, body preview and steps, and obtain their explicit decision; never decide for them. An approval nobody answers within 24 hours expires and the build stops. Needs tools:write.

Requires Authorization: Bearer $FOUS_API_KEY. Create a key.

Path parameters

  • build_idstringrequired
  • approval_idstringrequired

Request body

Required. JSON.

  • decisionstringrequired

    "approve""decline"

  • scopestringdefault "once"

    With approve: this request only, or its kind for the whole build.

    "once""build"

Response 200

Decided; the build resumes

  • successtruerequired
  • dataBuildrequired

    A build: from queued through exploring, compiling, verifying and publishing to ready, failed or cancelled. Once ready, api names the tool and method its operation; prepared_request carries an input the builder verified it with.

Errors

Every failure is an Error: branch on error.code. The errors guide lists each code.

  • 400
  • 401WWW-Authenticate
  • 402
  • 403
  • 404
  • 408
  • 409
  • 410
  • 413
  • 422
  • 429Retry-After
  • 500
  • 502
  • 503Retry-After
  • 504