Skip to main content
PATCH
/
v1
/
environments
/
{environment_id}
Update Organization Environment
curl --request PATCH \
  --url https://api.retab.com/v1/environments/{environment_id} \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "is_default": false,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

Update an environment’s display name.
Python
from retab import Retab

client = Retab()

environment = client.environments.update_environment(
    "env_123",
    name="QA",
)
print(environment.name)
TypeScript
import { Retab } from "@retab/node";

const client = new Retab({ apiKey: process.env.RETAB_API_KEY });

const environment = await client.environments.update_environment("env_123", "QA");
console.log(environment.name);
Go
package main

import (
	"context"
	"fmt"
	"log"

	retab "github.com/retab-dev/retab/clients/go"
)

func main() {
	client, err := retab.NewClient("")
	if err != nil {
		log.Fatal(err)
	}

	name := "QA"
	environment, err := client.Environments.Update(context.Background(), "env_123", &retab.EnvironmentsUpdateParams{
		Name: &name,
	})
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(environment.Name)
}
Java
import com.retab.RetabClient;

public final class Example {
  public static void main(String[] args) throws Exception {
    RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));

    var environment = client.environments().update("env_123", "QA");
    System.out.println(environment.getName());
  }
}
cURL
curl -X PATCH 'https://api.retab.com/v1/environments/env_123' \
  -H "Api-Key: $RETAB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"name":"QA"}'

Authorizations

Api-Key
string
header
required

Path Parameters

environment_id
string
required

Body

application/json
name
string | null

Response

Successful Response

id
string
required
name
string
required
type
enum<string>
required
Available options:
production,
non_production
is_default
boolean
default:false
created_at
string<date-time>
updated_at
string<date-time>