# LiveKit

> LiveKit room, participant, ingress and agent dispatch Twirp APIs.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/livekit

## Actions

### Create agent dispatch

Create agent dispatch.

**Inputs**

- Room (`room`, text, required): Room.
- Agent name (`agent_name`, text, required): Agent name.
- Metadata (`metadata`, text): Metadata.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "agent_name": "example",
    "id": "example",
    "metadata": "example",
    "room": "example"
  }
}
```

### Create ingress

Create ingress.

**Inputs**

- Input type (`input_type`, number, required): Input type. One of: `0` (RTMP), `1` (WHIP), `2` (URL).
- Name (`name`, text, required): Name.
- Room name (`room_name`, text, required): Room name.
- Participant identity (`participant_identity`, text, required): Participant identity.
- Participant name (`participant_name`, text): Participant name.
- Url (`url`, text): Url.
- Enable transcoding (`enable_transcoding`, true/false): Enable transcoding.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "ingress_id": "example",
    "name": "example",
    "participant_identity": "example",
    "room_name": "example",
    "state": {},
    "stream_key": "example",
    "url": "example"
  }
}
```

### Create room

Create room.

**Inputs**

- Name (`name`, text, required): Name.
- Empty timeout (`empty_timeout`, number): Empty timeout. At least 0.
- Departure timeout (`departure_timeout`, number): Departure timeout. At least 0.
- Max participants (`max_participants`, number): Max participants. At least 0.
- Metadata (`metadata`, text): Metadata.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "creation_time": "example",
    "metadata": "example",
    "name": "example",
    "num_participants": 1,
    "sid": "example"
  }
}
```

### Delete agent dispatch

Delete agent dispatch.

**Inputs**

- Room (`room`, text, required): Room.
- Dispatch id (`dispatch_id`, text, required): Dispatch id.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "agent_name": "example",
    "id": "example",
    "metadata": "example",
    "room": "example"
  }
}
```

### Delete ingress

Delete ingress.

**Inputs**

- Ingress id (`ingress_id`, text, required): Ingress id.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "ingress_id": "example",
    "name": "example",
    "participant_identity": "example",
    "room_name": "example",
    "state": {},
    "stream_key": "example",
    "url": "example"
  }
}
```

### Delete room

Delete room.

**Inputs**

- Room (`room`, text, required): Room.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Forward participant

Forward participant.

**Inputs**

- Room (`room`, text, required): Room.
- Participant (`identity`, text, required): Identity.
- Destination room (`destination_room`, text, required): Destination room.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Get participant

Get participant.

**Inputs**

- Room (`room`, text, required): Room.
- Participant (`identity`, text, required): Identity.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "identity": "example",
    "metadata": "example",
    "name": "example",
    "sid": "example",
    "state": "example",
    "tracks": []
  }
}
```

### List agent dispatches

List agent dispatches.

**Inputs**

- Room (`room`, text, required): Room.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "agent_dispatches": []
  }
}
```

### List ingress

List ingress.

**Inputs**

- Room name (`room_name`, text): Room name.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "items": []
  }
}
```

### List participants

List participants.

**Inputs**

- Room (`room`, text, required): Room.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "participants": []
  }
}
```

### List rooms

List rooms.

**Inputs**

- Names (`names`, list): Names.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "rooms": []
  }
}
```

### Move participant

Move participant.

**Inputs**

- Room (`room`, text, required): Room.
- Participant (`identity`, text, required): Identity.
- Destination room (`destination_room`, text, required): Destination room.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Mute track

Mute track.

**Inputs**

- Room (`room`, text, required): Room.
- Participant (`identity`, text, required): Identity.
- Track (`track_sid`, text, required): Track sid.
- Muted (`muted`, true/false, required): Muted.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "track": {}
  }
}
```

### Remove participant

Remove participant.

**Inputs**

- Room (`room`, text, required): Room.
- Participant (`identity`, text, required): Identity.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Send data

Send data.

**Inputs**

- Room (`room`, text, required): Room.
- Text (`text`, text, required): Text.
- Delivery mode (`delivery_mode`, number, required): Kind. One of: `0` (Reliable), `1` (Lossy).
- Destination identities (`destination_identities`, list): Destination identities.
- Topic (`topic`, text): Topic.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Update ingress

Update ingress.

**Inputs**

- Ingress id (`ingress_id`, text, required): Ingress id.
- Name (`name`, text): Name.
- Room name (`room_name`, text): Room name.
- Participant identity (`participant_identity`, text): Participant identity.
- Participant name (`participant_name`, text): Participant name.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "ingress_id": "example",
    "name": "example",
    "participant_identity": "example",
    "room_name": "example",
    "state": {},
    "stream_key": "example",
    "url": "example"
  }
}
```

### Update participant

Update participant.

**Inputs**

- Room (`room`, text, required): Room.
- Participant (`identity`, text, required): Identity.
- Name (`name`, text): Name.
- Metadata (`metadata`, text): Metadata.
- Attributes (`attributes`, object): Attributes.
- Permission (`permission`, object): Permission.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "identity": "example",
    "metadata": "example",
    "name": "example",
    "sid": "example",
    "state": "example",
    "tracks": []
  }
}
```

### Update room metadata

Update room metadata.

**Inputs**

- Room (`room`, text, required): Room.
- Metadata (`metadata`, text, required): Metadata.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "creation_time": "example",
    "metadata": "example",
    "name": "example",
    "num_participants": 1,
    "sid": "example"
  }
}
```

### Update subscriptions

Update subscriptions.

**Inputs**

- Room (`room`, text, required): Room.
- Participant (`identity`, text, required): Identity.
- Track sids (`track_sids`, list, required): Track sids.
- Subscribe (`subscribe`, true/false, required): Subscribe.

**Outputs**

- `data` (object): Api result.

**Example output**

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