JavaScript
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);
}import os
from rizaio import Riza
client = Riza(
api_key=os.environ.get("RIZA_API_KEY"), # This is the default and can be omitted
)
page = client.executions.list()
page = page.data[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/riza-io/riza-api-go"
"github.com/riza-io/riza-api-go/option"
)
func main() {
client := riza.NewClient(
option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("RIZA_API_KEY")
)
page, err := client.Executions.List(context.TODO(), riza.ExecutionListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}{
"data": [
{
"duration": 123,
"exit_code": 123,
"id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"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": "<unknown>",
"revision_id": "<string>"
},
"response": {
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<unknown>"
},
"tool_id": "<string>",
"type": "tool"
}
}
]
}{
"code": 16,
"message": "unauthenticated"
}Execution
List executions
Returns a list of executions in your project.
JavaScript
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);
}import os
from rizaio import Riza
client = Riza(
api_key=os.environ.get("RIZA_API_KEY"), # This is the default and can be omitted
)
page = client.executions.list()
page = page.data[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/riza-io/riza-api-go"
"github.com/riza-io/riza-api-go/option"
)
func main() {
client := riza.NewClient(
option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("RIZA_API_KEY")
)
page, err := client.Executions.List(context.TODO(), riza.ExecutionListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}{
"data": [
{
"duration": 123,
"exit_code": 123,
"id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"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": "<unknown>",
"revision_id": "<string>"
},
"response": {
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<unknown>"
},
"tool_id": "<string>",
"type": "tool"
}
}
]
}{
"code": 16,
"message": "unauthenticated"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
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.
The number of items to return. Defaults to 100. Maximum is 100.
If true, only show executions where the exit code is not 0, indicating an execution error. Defaults to false.
Response
OK
Show child attributes
Show child attributes
⌘I