---
# System prepended metadata

title: MAZDA Car Service

---

# MAZDA Car Service - API document
## Swagger URL
Detail usage please refer to:
https://car-service.songyen.duckdns.org/swagger/api

### List all channel
List all registered channels in the server.
> GET https://car-service.songyen.duckdns.org/api/v1/channel/

Result:
```json
[
  {
    "channel_id": 1,
    "channel_name": "test1",
    "channel_url": "https://streamserver.japaneast.cloudapp.azure.com:8889/livestream/poc",
    "plate_number": "ABC1234",
    "car_owner": "tester",
    "update_datetime": "2024-02-19T23:16:55"
  },
  {
    "channel_id": 2,
    "channel_name": "test2",
    "channel_url": "https://streamserver.japaneast.cloudapp.azure.com:8889/livestream/poc2",
    "plate_number": "EFG5678",
    "car_owner": "tester",
    "update_datetime": "2024-02-19T23:16:55"
  }
]
```

### Get single channel
Get channel with channel id.
>GET https://car-service.songyen.duckdns.org/api/v1/channel/2

Result:
```json
{
  "channel_id": 2,
  "channel_name": "test2",
  "channel_url": "https://streamserver.japaneast.cloudapp.azure.com:8889/livestream/poc2",
  "plate_number": "ABC1234",
  "car_owner": "Michael",
  "update_datetime": "2024-02-19T23:28:55"
}
```

### Register a Car
Binding the car information to a exist channel by id
>PUT https://car-service.songyen.duckdns.org/api/v1/channel/2

body 
```json
{
  "plate_number": "ABC1234",
  "car_owner": "Michael"
}
```


## Reset a channel
Clear car information of a channel
> PATCH https://car-service.songyen.duckdns.org/api/v1/channel/2/reset
