Skip to main content
GET
/
public
/
v1
/
account
/
{accountSlug}
/
project
/
{projectSlug}
/
environments
/
{environmentId}
Get Environment
curl --request GET \
  --url https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId} \
  --header 'X-Access-Key: <api-key>'
import requests

url = "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}"

headers = {"X-Access-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-Access-Key': '<api-key>'}};

fetch('https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-Access-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Access-Key", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}")
  .header("X-Access-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Access-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "d4e5f6a7-b8c9-0123-def1-234567890123",
  "display_name": "My Multi-Chain Environment",
  "slug": "my-multi-chain-env",
  "description": "A multi-chain test environment spanning Mainnet and Optimism",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T12:00:00Z",
  "networks": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "network_id": "1",
      "network_name": "Mainnet",
      "network_type": "vnet",
      "block_number": "0x12c50f0",
      "region": "eu",
      "chain_config_overrides": {
        "chain_id": "1"
      },
      "explorer_config": {
        "enabled": true,
        "verification_visibility": "abi"
      },
      "accounts": [
        {
          "address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
        }
      ]
    }
  ],
  "bridge_config": {
    "enabled": true,
    "relay_mode": "autoRelay",
    "delay_seconds": 0
  },
  "active_instance": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T12:00:00Z",
    "bridge_config": {
      "enabled": true,
      "relay_mode": "autoRelay",
      "delay_seconds": 0
    },
    "vnets": [
      {
        "id": "4010f442-c4d9-407d-aba1-7276e3312998",
        "display_name": "My Vnet 123",
        "slug": "my-vnet-123",
        "description": "This is a description of my Vnet",
        "status": "running",
        "created_at": "2024-01-15T10:30:00Z",
        "rpcs": [
          {
            "name": "Admin RPC",
            "url": "https://virtual.mainnet.rpc.tenderly.co/tenderly/my-project/my-multi-chain-env-9e7edf81"
          }
        ],
        "fork_config": {
          "network_id": 1,
          "block_number": "0x12c50f0"
        },
        "virtual_network_config": {
          "chain_config": {
            "chain_id": 1
          },
          "base_fee_per_gas": 1,
          "accounts": [
            {
              "address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
            }
          ]
        },
        "rpc_config": {
          "rpc_name": {
            "name": "e2e-tests-example",
            "suffix": "9e7edf81-f6c2-49c2-855f-242ff9a6b09a"
          },
          "rpc_persistence_config": {
            "methods": [
              {
                "method": "tenderly_simulateTransaction"
              }
            ]
          }
        },
        "runtime_config": {
          "running_duration": 3600
        },
        "sync_state_config": {
          "enabled": true
        },
        "explorer_page_config": {
          "enabled": true,
          "verification_visibility": "abi"
        }
      }
    ]
  }
}
{
  "error": {
    "id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
    "slug": "bad_request",
    "message": "Bad request input parameters"
  }
}
{
  "error": {
    "id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
    "slug": "unauthorized",
    "message": "Unauthorized"
  }
}
{
  "error": {
    "id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
    "slug": "insufficient_permissions",
    "message": "Insufficient permissions"
  }
}
{
  "error": {
    "id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
    "slug": "resource_not_found",
    "message": "The resource you requested could not be found."
  }
}
{
  "error": {
    "id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
    "slug": "internal_server_error",
    "message": "Internal server error"
  }
}

Authorizations

X-Access-Key
string
header
required

An API key is a token that a client provides when making API calls. Send it as the X-Access-Key request header on any endpoint:

curl '<API_ENDPOINT>' \
  -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
  ...

Learn how to generate API access tokens at Tenderly Docs.

Path Parameters

accountSlug
string
required

Account ID or slug

projectSlug
string
required

Project ID or slug

environmentId
string<uuid>
required

Environment ID

Response

A successful response.

Multi-chain environment grouping multiple Virtual Environments across chains

id
string<uuid>

Unique identifier of the environment

Example:

"d4e5f6a7-b8c9-0123-def1-234567890123"

display_name
string

Display name of the environment

Example:

"My Multi-Chain Environment"

slug
string

URL-safe slug for the environment

Example:

"my-multi-chain-env"

description
string

Description of the environment

Example:

"A multi-chain test environment spanning Mainnet and Optimism"

created_at
string<date-time>

Timestamp when the environment was created

Example:

"2024-01-15T10:30:00Z"

updated_at
string<date-time>

Timestamp when the environment was last updated

Example:

"2024-01-15T12:00:00Z"

networks
envNetworkConfig · object[]

Network configurations in this environment

bridge_config
bridge_config · object

Cross-chain bridge configuration

active_instance
active_instance · object

The currently active instance of this environment