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
});
const runtime = await client.runtimes.create({
language: 'python',
manifest_file: { contents: 'contents', name: 'requirements.txt' },
name: 'name',
});
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
)
runtime = client.runtimes.create(
language="python",
manifest_file={
"contents": "contents",
"name": "requirements.txt",
},
name="name",
)
print(runtime.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")
)
runtime, err := client.Runtimes.New(context.TODO(), riza.RuntimeNewParams{
Language: riza.F(riza.RuntimeNewParamsLanguagePython),
ManifestFile: riza.F(riza.RuntimeNewParamsManifestFile{
Contents: riza.F("contents"),
Name: riza.F(riza.RuntimeNewParamsManifestFileNameRequirementsTxt),
}),
Name: riza.F("name"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", runtime.ID)
}{
"id": "<string>",
"name": "<string>",
"revision_id": "<string>",
"additional_python_imports": "<string>",
"manifest_file": {
"contents": "<string>"
}
}{
"code": 16,
"message": "unauthenticated"
}Custom Runtimes
Create runtime
Creates a runtime.
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
});
const runtime = await client.runtimes.create({
language: 'python',
manifest_file: { contents: 'contents', name: 'requirements.txt' },
name: 'name',
});
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
)
runtime = client.runtimes.create(
language="python",
manifest_file={
"contents": "contents",
"name": "requirements.txt",
},
name="name",
)
print(runtime.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")
)
runtime, err := client.Runtimes.New(context.TODO(), riza.RuntimeNewParams{
Language: riza.F(riza.RuntimeNewParamsLanguagePython),
ManifestFile: riza.F(riza.RuntimeNewParamsManifestFile{
Contents: riza.F("contents"),
Name: riza.F(riza.RuntimeNewParamsManifestFileNameRequirementsTxt),
}),
Name: riza.F("name"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", runtime.ID)
}{
"id": "<string>",
"name": "<string>",
"revision_id": "<string>",
"additional_python_imports": "<string>",
"manifest_file": {
"contents": "<string>"
}
}{
"code": 16,
"message": "unauthenticated"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
OK
Available options:
wasi, microvm, v8 Available options:
python, javascript Available options:
pending, building, succeeded, failed, cancelled Show child attributes
Show child attributes
⌘I