List targets

View as Markdown
  • GET
  • /workspaces
  • /:workspace
  • /targets

Get all deployment targets in the workspace

Request

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

Example: "my-company"

GET PARAMETERS
project_namestring
Filter targets by project name

Example: "my-project"

pipeline_idinteger
Filter targets by pipeline ID

Example: 12345

environment_idstring
Filter targets by environment ID

Example: "67890"

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
targetsTargetView[]

Last modified on Nov 17, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/targets" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json"
EXAMPLE RESPONSE
{
  "url": "https://api.buddy.works/workspaces/my-workspace/targets",
  "html_url": "https://app.buddy.works/targets",
  "targets": [
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/targets/tg-12345",
      "html_url": "https://app.buddy.works/targets/tg-12345",
      "id": "tg-12345",
      "identifier": "production-web-server",
      "name": "Production Web Server",
      "type": "SSH"
    },
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/targets/tg-67890",
      "html_url": "https://app.buddy.works/targets/tg-67890",
      "id": "tg-67890",
      "identifier": "gke-production",
      "name": "GKE Production Cluster",
      "type": "GKE"
    },
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/targets/tg-54321",
      "html_url": "https://app.buddy.works/targets/tg-54321",
      "id": "tg-54321",
      "identifier": "ftp-server",
      "name": "FTP File Server",
      "type": "FTP"
    },
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/targets/tg-24680",
      "html_url": "https://app.buddy.works/targets/tg-24680",
      "id": "tg-24680",
      "identifier": "dev-sandbox",
      "name": "Dev Sandbox",
      "type": "SANDBOX",
      "sandbox": {
        "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345",
        "html_url": "https://app.buddy.works/sandboxes/sb-12345",
        "id": "sb-12345",
        "identifier": "dev-sandbox",
        "name": "Dev Sandbox"
      }
    }
  ]
}
STATUS
200 OK