# Get all plugin categories

`GET /api/plugin-categories`

Authentication: no security requirement declared for this operation.

Parameters:

- `format` (query, string, optional) - Response format (tree for hierarchical structure)
  Type: string
  
  enum: ["tree","flat"]

- `name` (query, string, optional) - Filter by category name
  Type: string
  
  Example:
  
  ```json
  "Authentication"
  ```

- `slug` (query, string, optional) - Filter by category slug
  Type: string
  
  Example:
  
  ```json
  "authentication"
  ```

- `isActive` (query, boolean, optional) - Filter by active status
  Type: boolean
  
  Example:
  
  ```json
  true
  ```

- `parentId` (query, string, optional) - Filter by parent category ID
  Type: string
  
  Example:
  
  ```json
  "uuid-string"
  ```

- `page` (query, number, optional) - Page number for pagination
  Type: number
  
  minimum: 1
  
  Example:
  
  ```json
  1
  ```

- `limit` (query, number, optional) - Number of items per page
  Type: number
  
  minimum: 1
  
  maximum: 100
  
  Example:
  
  ```json
  10
  ```

- `sortBy` (query, string, optional) - Sort field
  Type: string
  
  enum: ["name","slug","order","createdAt","updatedAt"]
  
  Example:
  
  ```json
  "name"
  ```

- `sortDirection` (query, string, optional) - Sort direction
  Type: string
  
  enum: ["ASC","DESC"]
  
  Example:
  
  ```json
  "ASC"
  ```

- `relations` (query, array, optional) - Relations to include
  Type: array
  
  Example:
  
  ```json
  [
    "parent",
    "children",
    "plugins"
  ]
  ```
  
  Items:
    Type: string

Responses:

- 200: Plugin categories retrieved successfully

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/plugin-categories'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/plugin-categories', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('http://localhost:3000/api/plugin-categories')
print(response.text)
```
