# Run a operation on a gateway

`POST https://api.parklio.com/v2/gateways/{id}/operation`

This endpoint serves as the command center for managing a 
      gateway device, enabling users to execute essential operations such as
      rebooting, info or forcing a scan.

**Auth:** `Authorization: Bearer <token>`

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | number | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string (`reboot`, `info`, `force_scan`) | yes |  |

```json
{
  "operation": "reboot"
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "gateway_id": 0
  }
}
```

### 401 — Account user is not logged in and they should log in again.

```json
{
  "success": false,
  "errors": [
    {
      "code": 1,
      "message": "Unauthorized access."
    }
  ]
}
```

### 403 — User does not have permission to access requested resource.

```json
{
  "success": false,
  "errors": [
    {
      "code": 4,
      "message": "No permission."
    }
  ]
}
```

### 404 — Resource that has been requested does not exist. User should not try to repeat this request.

```json
{
  "success": false,
  "errors": [
    {
      "code": 6,
      "message": "Resource not found."
    }
  ]
}
```

