Skip to content

Commit

Permalink
docs: added admin endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Kan-A-Pesh committed Nov 6, 2024
1 parent df3a5d3 commit cf47c50
Showing 1 changed file with 140 additions and 0 deletions.
140 changes: 140 additions & 0 deletions docs/admin-endpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Admin endpoints

Base url is `https://api-cova-dev.404devinci.fr/admin`

## Clubs

### GET /clubs

No additional data.

### POST /clubs

Body:

```json
{
"name": "string",
"avatarUrl": "string",
"description": "string (optional)",
"dailyDate": "string (optional)"
}
```

Note: If `dailyDate` is not provided, the club will be created with a daily date of today.

### PUT /clubs/:id

Params:

- `id`: number

Body:

```json
{
"name": "string (optional)",
"avatarUrl": "string (optional)",
"description": "string (optional)",
"dailyDate": "string (optional)"
}
```

### DELETE /clubs/:id

Params:

- `id`: number

## Challenges

### GET /challenges

No additional data.

### POST /challenges

Body:

```json
{
"clubId": "number",
"score": "number",
"name": "string"
}
```

### PUT /challenges/:id

Params:

- `id`: number

Body:

```json
{
"score": "number",
"name": "string"
}
```

### DELETE /challenges/:id

Params:

- `id`: number

## Granters

### GET /granters

Query:

- `clubId`: number (optional)

Note: List all granters when no `clubId` is provided, otherwise list granters for the specified `clubId`.

### POST /granters

Body:

```json
{
"clubId": "number",
"email": "string"
}
```

### DELETE /granters/:id

## Dump

### GET /dump

No additional data.

### POST /dump

Body:

```json
{
"type": "acquired" | "challenges" | "clubs" | "granters" | "users",
"data": "string"
}
```

## Notification

### POST /notification

Body:

```json
{
"title": "string",
"message": "string",
"iconUrl": "string (optional)"
}
```

0 comments on commit cf47c50

Please sign in to comment.