---
# System prepended metadata

title: "EVIG NEDTUR BACKEND DOCUMENTATION \U0001F602"

---

# EVIG NEDTUR BACKEND DOCUMENTATION 😂

Base url: https://evignedtur-backend.herokuapp.com

## Table of contents

### Items

1. [GET](#GET-/items)
2. [POST](#POST-/items)
3. [PUT](#PUT-/items)
4. [DELETE](#DELETE-/items)

### Players

1. [GET](#GET-/players)
2. [POST](#POST-/players)
3. [PUT](#PUT-/players)
4. [DELETE](#DELETE-/players)

### Characters

1. [GET](#GET-/characters)
2. [POST](#POST-/characters)
3. [PUT](#PUT-/characters)
4. [DELETE](#DELETE-/characters)

### Attendance

1. [GET](#GET-/attendance)
2. [POST](#POST-/attendance)
3. [PUT](#PUT-/attendance)
4. [DELETE](#DELETE-/attendance)

---

# Items

## GET /items

### Description

> Retrieve all items from the DB.

### Request Body

> None

### Return Body

`Contains item ids in an array of json objects.`

> `[{"id":12345}, {"id":12346}]`

---

## POST /items

### Description

> Inserts new items in to the database.

### Request Body

`Contains item ids in an array of json objects.`

> `[{"id":12345}, {"id":12346}]`

### Return Body

> All Items in the database

---

## PUT /items

### Description

> Updates an item id in the database

### Request Body

> `{"oldid":1, "newid":2}`

### Return Body

> All Items in the database

---

## DELETE /items

### Description

> Deletes one or more items form the database

### Request Body

`Deletes all item ids present in the array`

> `[{"id":12345}, {"id":12346}]`

### Return Body

> All Items in the database

---

---

# Players

## GET /players

### Description

> Retrieve all players from the DB.

### Request Body

> None

### Return Body

`Contains players in an array of json objects.`

> `[{"Id":11,"Name":"TPU"},{"Id":21,"Name":"Absence"}]`

---

## POST /players

### Description

> Inserts new players in to the database.

### Request Body

`Contains players in an array of json objects.`

> `[{"Name":"Bob"}, {"Name":"Per"}]`

### Return Body

> All information about the players

---

## PUT /players

### Description

> Updates a player in the database

### Request Body

> `{"id":9, "newname": "TPU2"}`

### Return Body

> All information about the players

---

## DELETE /players

### Description

> Deletes one or more players form the database

### Request Body

`Deletes all players with ids present in the array`

> `[{"id":9}, {"id":10}]`

### Return Body

> All information about the players

---

---

# Characters

## GET /characters

### Description

> Retrieve all characters from the DB.

### Request Body

> None

### Return Body

`Contains characters in an array of json objects. Player_id is the unique id grabbed from the player endpoint`

> `[{"Id":10,"Player_Id":11,"Class":"Warrior","Role":"DPS","Name":"TPU","Team":"3","Alt":"Nei","Praidbis":"Ja"}]`

---

## POST /characters

### Description

> Inserts new characters in to the database.

### Request Body

`Contains characters in an array of json objects. Player_id is the unique id grabbed from the player endpoint`

> `[{"Player_Id":11,"Class":"Warrior","Role":"DPS","Name":"TPU","Team":"3","Alt":"Nei","Praidbis":"Ja"}]`

### Return Body

> All information about the characters

---

## PUT /characters

### Description

> Updates a character in the database

### Request Body

`Player_id is the unique id grabbed from the player endpoint`

> `{"Id":10,"Player_Id":11,"Class":"Warrior","Role":"DPS","Name":"TPU","Team":"3","Alt":"Nei","Praidbis":"Ja"}`

### Return Body

> All information about the characters

---

## DELETE /characters

### Description

> Deletes one or more characters form the database

### Request Body

`Deletes all characters with ids present in the array`

> `[{"id":9}, {"id":10}]`

### Return Body

> All information about the characters

---

# Attendance

## GET /attendance

### Description

> Retrieve all attendance data from the DB.

### Request Body

> None

### Return Body

`Contains characters in an array of json objects. char_id is the unique id grabbed from the character endpoint`

> `[{"Id":1,"Char_Id":11,"Date":"2020-07-28 20:09:51"}]`

---

## POST /attendance

### Description

> Inserts new attendance data in to the database.

### Request Body

`Contains attendance in an array of json objects. char_id is the unique id grabbed from the character endpoint`

> `[{"Id":1,"Char_Id":11,"Date":"2020-07-28 20:09:51"}]`

### Return Body

> All information about the attendace

---

## PUT /attendance

### Description

> Updates an attendance data point in the database

### Request Body

`char_id is the unique id grabbed from the character endpoint`

> `{"Id":1,"Char_Id":11,"Date":"2020-07-28 20:09:51"}`

### Return Body

> All information about the attendance

---

## DELETE /attendance

### Description

> Deletes one or more characters form the database

### Request Body

`Deletes all attendance with ids present in the array`

> `[{"id":9}, {"id":10}]`

### Return Body

> All information about the attendance
