80 lines
950 B
Markdown
80 lines
950 B
Markdown
## GET /api/v1/channel/{id}
|
|
|
|
_Requires an authorization header_
|
|
|
|
Returns a channel with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"communityId": "string",
|
|
"creationDate": "number"
|
|
}
|
|
```
|
|
|
|
## POST /api/v1/channel
|
|
|
|
_Requires an authorization header_
|
|
|
|
### Request:
|
|
|
|
```json
|
|
{
|
|
"name": "string",
|
|
"communityId": "string"
|
|
}
|
|
```
|
|
|
|
Creates a new channel and returns it
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"communityId": "string"
|
|
}
|
|
```
|
|
|
|
## PATCH /api/v1/channel/{id}
|
|
|
|
_Requires an authorization header_
|
|
|
|
### Request:
|
|
|
|
```json
|
|
{
|
|
"name": "string?"
|
|
}
|
|
```
|
|
|
|
Updates a channel with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"communityId": "string"
|
|
}
|
|
```
|
|
|
|
## DELETE /api/v1/channel/{id}
|
|
|
|
_Requires an authorization header_
|
|
|
|
Removes a channel with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"communityId": "string"
|
|
}
|
|
```
|