import Riza from '@riza-io/api';

const client = new Riza({
  apiKey: process.env['RIZA_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const execution of client.executions.list()) {
  console.log(execution.id);
}
{
  "data": [
    {
      "details": {
        "request": {
          "env": [
            {
              "name": "<string>",
              "secret_id": "<string>",
              "value": "<string>"
            }
          ],
          "http": {
            "allow": [
              {
                "auth": {
                  "basic": {
                    "password": "<string>",
                    "secret_id": "<string>",
                    "user_id": "<string>"
                  },
                  "bearer": {
                    "secret_id": "<string>",
                    "token": "<string>"
                  },
                  "query": {
                    "key": "<string>",
                    "secret_id": "<string>",
                    "value": "<string>"
                  }
                },
                "host": "<string>"
              }
            ]
          },
          "input": "<any>",
          "revision_id": "<string>"
        },
        "response": {
          "execution": {
            "duration": 123,
            "exit_code": 123,
            "id": "<string>",
            "stderr": "<string>",
            "stdout": "<string>"
          },
          "output": "<any>",
          "output_status": "error"
        },
        "tool_id": "<string>",
        "type": "tool"
      },
      "duration": 123,
      "exit_code": 123,
      "id": "<string>",
      "language": "python",
      "started_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

starting_after
string

The ID of the item to start after. To get the next page of results, set this to the ID of the last item in the current page.

limit
integer

The number of items to return. Defaults to 100. Maximum is 100.

only_non_zero_exit_codes
boolean

If true, only show executions where the exit code is not 0, indicating an execution error. Defaults to false.

Response

200
application/json

OK

The response is of type object.