Get Environments

View as Markdown
  • GET
  • /workspaces
  • /:workspace
  • /environments
  • /:environment_id

Get a specific environment by ID

Request

REQUIRED SCOPES
ENVIRONMENT_READ
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

environment_idrequiredstring
The ID of the environment

Example: "3a4KbBQl"

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
idstring
The ID of the environment
namerequiredstring
The name of the environment
identifierstring
A human-readable ID of the environment. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end).
tagsstring[]
The list of tags associated with the environment

Constraints: Unique items required

iconstring
The icon of the environment
public_urlstring
The public URL of the environment
pipelines_access_levelstring enum
Indicates if all pipelines can inherit to this environment
Allowed enum:
DENIED,
READ_ONLY,
USE_ONLY,
BLIND,
RUN_ONLY,
READ_WRITE,
MANAGE,
DEFAULT,
ALLOWED,
STAGE,
COMMIT
environments_access_levelstring enum
Indicates if all pipelines can use this environment
Allowed enum:
DENIED,
READ_ONLY,
USE_ONLY,
BLIND,
RUN_ONLY,
READ_WRITE,
MANAGE,
DEFAULT,
ALLOWED,
STAGE,
COMMIT
allowed_pipelinesAllowedPipelineView[]
The List of pipelines that can use this environment (specified by project slug and pipeline slug)
allowed_environmentsAllowedEnvironmentView[]
The List of environments that can inherit this environment (specified by project slug and environment slug)
create_datestring
The creation date of the environment
projectShortProjectView
Short representation of a project
permissionsPermissionsView
Access permissions configuration
base_environmentsstring[]
The list of environments that is used as a base for this environment (specified by project slug and environment slug)
targetsTargetView[]
The list of targets associated with the environment
base_onlyboolean
Indicates if this environment can only be used as a base for other environments
allow_decrypted_valuesboolean
Indicates if values of encrypted variables of this environment can be returned decrypted to a token with the MASKED_VARIABLE_VALUE_DECRYPTED scope
scopestring enum
The scope of the environment
Allowed enum:
PROJECT,
WORKSPACE
notestring
Note for this resource
agent_notestring
YAML note for AI agents operating on this resource

Last modified on Nov 26, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/environments/:environment_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json"
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-workspace/projects/environments/3a4KbBQl",
  "html_url": "https://app.buddy.works/my-workspace/my-project/environments/environment/3a4KbBQl",
  "id": "3a4KbBQl",
  "name": "Development Environment",
  "identifier": "dev",
  "tags": [
    "development",
    "dev"
  ],
  "icon": "development.svg",
  "public_url": "https://env.myproduct.com",
  "pipelines_access_level": "DENIED",
  "environments_access_level": "DENIED",
  "allowed_pipelines": [
    {
      "project": "my-project",
      "pipeline": "Deploy to Dev"
    }
  ],
  "allowed_environments": [
    {
      "project": "my-project",
      "environment": "staging"
    }
  ],
  "create_date": "2024-01-15T10:30:00Z",
  "project": {
    "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project",
    "html_url": "https://app.buddy.works/my-workspace/my-project",
    "name": "my-project",
    "display_name": "My Project"
  },
  "permissions": {
    "others": "USE_ONLY",
    "users": [
      {
        "id": 123,
        "access_level": "MANAGE"
      }
    ],
    "groups": [
      {
        "id": 456,
        "access_level": "READ_WRITE"
      }
    ]
  },
  "base_environments": [
    "production",
    "staging"
  ],
  "targets": [
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/targets/123",
      "html_url": "https://app.buddy.works/my-workspace/my-project/environments/environment/3a4KbBQl/targets/abc123/edit",
      "id": "abc123",
      "identifier": "dev-server",
      "type": "SSH"
    }
  ],
  "base_only": false,
  "allow_decrypted_values": false,
  "scope": "PROJECT",
  "note": "Notes about this resource",
  "agent_note": "my_custom_field: note for agent"
}
STATUS
200 OK