List targets
- GET
- /workspaces
- /:workspace
- /targets
Get all deployment targets in the workspace
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