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 secret of client.secrets.list()) {
console.log(secret.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.secrets.list()
page = page.secrets[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.Secrets.List(context.TODO(), riza.SecretListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"secrets": [
{
"id": "<string>",
"name": "<string>"
}
]
}{
"code": 16,
"message": "unauthenticated"
}Secrets
List secrets
Returns a list of secrets 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 secret of client.secrets.list()) {
console.log(secret.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.secrets.list()
page = page.secrets[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.Secrets.List(context.TODO(), riza.SecretListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"secrets": [
{
"id": "<string>",
"name": "<string>"
}
]
}{
"code": 16,
"message": "unauthenticated"
}