---
title: "Read a component and its versions"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read a component and its versions

Path: CloudRaker Workspace API › Agent components

`GET /agent-components/{slug}`

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `slug` (`getAgentComponent.path.slug`; string, required)
  - pattern `^[a-z][a-z0-9-]{0,63}$`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/agent-components/<slug>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/agent-components/<slug>';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/agent-components/<slug>"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

## Responses

### 200

Read a component and its versions

#### Example

```json
{
  "data": null
}
```

- `data` (`getAgentComponent.response.200.data`; unknown, required)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`getAgentComponent.response.400.success`; boolean, required)
  - one of `false`
- `error` (`getAgentComponent.response.400.error`; array<unknown>, required)
- `data` (`getAgentComponent.response.400.data`; unknown, required)


Source: https://docs.cloudraker.com/workspace/api/agent-components/get-agent-component/index.md
