Documentation Index
Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
The organizations client methods are currently in ALPHA. The API may change without notice. A one-time warning is emitted on first use.
Organizations group spaces and members under a billing account. The Get and Update methods accept either an organization name or an ID — the SDK resolves names to IDs on your behalf.
List Organizations
List returns a paginated list of organizations.
Signature:
func (c *Client) List(ctx context.Context, params ListParams) (*OrganizationList, error)
Usage Example:
package main
import (
"context"
"errors"
"fmt"
"log"
"github.com/Arize-ai/client-go-v2"
"github.com/Arize-ai/client-go-v2/organizations"
)
func main() {
client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
if err != nil {
log.Fatal(err)
}
resp, err := client.Organizations.List(context.Background(), organizations.ListParams{})
if err != nil {
var unauthorized *arize.UnauthorizedError
if errors.As(err, &unauthorized) {
log.Fatalf("unauthorized: %v", unauthorized)
}
log.Fatal(err)
}
for _, org := range resp.Data {
fmt.Printf("%s: %s\n", org.Id, org.Name)
}
}
Get an Organization
Get returns a single organization, resolving by name or ID.
Signature:
func (c *Client) Get(ctx context.Context, nameOrID string) (*Organization, error)
Usage Example:
package main
import (
"context"
"errors"
"fmt"
"log"
"github.com/Arize-ai/client-go-v2"
)
func main() {
client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
if err != nil {
log.Fatal(err)
}
org, err := client.Organizations.Get(context.Background(), "your-org-name-or-id")
if err != nil {
var notFound *arize.NotFoundError
if errors.As(err, ¬Found) {
log.Fatalf("organization not found: %v", notFound)
}
log.Fatal(err)
}
fmt.Printf("org %s: %s\n", org.Id, org.Name)
}
Create an Organization
Create issues a POST to create a new organization and returns the created organization.
Signature:
func (c *Client) Create(
ctx context.Context,
req CreateRequest,
) (*Organization, error)
Usage Example:
package main
import (
"context"
"errors"
"fmt"
"log"
"github.com/Arize-ai/client-go-v2"
"github.com/Arize-ai/client-go-v2/organizations"
)
func main() {
client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
if err != nil {
log.Fatal(err)
}
org, err := client.Organizations.Create(
context.Background(),
organizations.CreateRequest{
Name: "your-new-org",
},
)
if err != nil {
var conflict *arize.ConflictError
if errors.As(err, &conflict) {
log.Fatalf("organization already exists: %v", conflict)
}
log.Fatal(err)
}
fmt.Printf("created org %s\n", org.Id)
}
Update an Organization
Update modifies an existing organization, resolving the target by name or ID, and returns the updated organization.
Signature:
func (c *Client) Update(
ctx context.Context,
nameOrID string,
req UpdateRequest,
) (*Organization, error)
Usage Example:
package main
import (
"context"
"errors"
"fmt"
"log"
"github.com/Arize-ai/client-go-v2"
"github.com/Arize-ai/client-go-v2/organizations"
)
func main() {
client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
if err != nil {
log.Fatal(err)
}
newName := "renamed-org"
org, err := client.Organizations.Update(
context.Background(),
"your-org-name-or-id",
organizations.UpdateRequest{
Name: &newName,
},
)
if err != nil {
var notFound *arize.NotFoundError
if errors.As(err, ¬Found) {
log.Fatalf("organization not found: %v", notFound)
}
log.Fatal(err)
}
fmt.Printf("updated org %s: %s\n", org.Id, org.Name)
}