briqs

Run a command inside a briq

Runs the command and answers with its output, for up to 60 s. With async: true, starts it and answers at once (202) with an exec to check, read and stop later: for anything that can take longer. Async needs sh in the image.

post/v1/briqs/{id}/exec

Request

  • Base URL: https://api.briq.cloud
  • URL: https://api.briq.cloud/v1/briqs/{id}/exec
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

cmdstring[] required

argv, run without a shell: ["sh", "-c", "…"] for pipes, globs or $VARS

timeoutMsinteger

Without async: 60000 by default and at most. With async: when to stop it, 3600000 (1 h) by default, 86400000 (24 h) at most

stdinstring

Fed to the command's standard input

asyncboolean

Start the command and answer at once with an exec to check later (GET /briqs/{id}/execs/{execId}): for anything that can take over a minute. Needs sh in the image

Response

ok

stdoutstring required
stderrstring required
exitCodenumber required
timedOutboolean required
costLinestring required
warningstring

Set when timeoutMs was over 60000 without async: it ran with 60000

Changes

No recorded changes to this operation across all 2 revisions of this API.