# System Actions

System actions are used for internal functions, client-specific features, and debugging.

## ACCESS

Returns a temporary websocket access ID. Only used in the web client.

| Property | Value | Req | Default |
|-|-|-|-|
| action | `"access"` | ✓ |

**Response**

| Property | Value |
|-|-|
| access_id | `string` |
| expires | `number` (Unix ms) |

## ECHO

Returns a string sent in the action. Used for debugging.

| Property | Value | Req | Default |
|-|-|-|-|
| action | `"echo"` | ✓ |
| echo | `string` | ✓ |

**Response**

| Property | Value |
|-|-|
| echo | `string` |

## IF

Performs a write-only action depending on query based conditional check. The value of the first column of the first row is checked for each query, and the first returning `true` is executed. If none match an optional `else` action will be executed. Otherwise, no action occurs.

| Property | Value | Req | Default |
|-|-|-|-|
| action | `"if"` | ✓ |
| do | `condition[]` | ✓ |
| else | action | |

**Condition**

| Property | Value | Req |
|-|-|-|
| if | [select](select-syntax) | ✓ |
| then | action | ✓ |

## SYNC

Returns a string sent in the action. Used for debugging. Redundant with [ECHO](#bkmrk-echo) but preserved for backwards compatibility.

| Property | Value | Req | Default |
|-|-|-|-|
| action | `"echo"` | ✓ |
| id | `string` | ✓ |

**Response**

| Property | Value |
|-|-|
| id | `string` |

## VIEW

Marks tasks or notifications as `seen`, for purposes of client side notification.

## WAIT

Waits a specified number of milliseconds and returns. Can be set to fail, or fail if resolved before a particular instant.

| Property | Value | Req | Default |
|-|-|-|-|
| action | `"wait"` | ✓ |
| ms | `number` |  | `1000`
| fail | `boolean` |  | `false`
| fail_before | `instant` |  |