# Export target

`GET /workspaces/:workspace/targets/:target_id/yaml`

Get target YAML

**Required Scopes:** `TARGET_INFO`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** Target unique identifier (hash ID) */
  target_id: string; // Example: "tgt-1234567890abcdef"
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The Base64-encoded YAML definition of the target */
  yaml?: string;
}
```

## Response Example

**Status:** `200 OK`

```json
{
  "yaml": "LSB0YXJnZXQ6..."
}
```

---
Original source: https://buddy.works/docs/api/targets/export