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 runtime of client.runtimes.list()) {
console.log(runtime.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.runtimes.list()
page = page.runtimes[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.Runtimes.List(context.TODO(), riza.RuntimeListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"runtimes": [
{
"engine": "wasi",
"id": "<string>",
"language": "python",
"name": "<string>",
"revision_id": "<string>",
"status": "pending",
"additional_python_imports": "<string>",
"manifest_file": {
"contents": "<string>",
"name": "requirements.txt"
}
}
]
}{
"code": 16,
"message": "unauthenticated"
}Custom Runtimes
List runtimes
Returns a list of runtimes 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 runtime of client.runtimes.list()) {
console.log(runtime.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.runtimes.list()
page = page.runtimes[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.Runtimes.List(context.TODO(), riza.RuntimeListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"runtimes": [
{
"engine": "wasi",
"id": "<string>",
"language": "python",
"name": "<string>",
"revision_id": "<string>",
"status": "pending",
"additional_python_imports": "<string>",
"manifest_file": {
"contents": "<string>",
"name": "requirements.txt"
}
}
]
}{
"code": 16,
"message": "unauthenticated"
}