Skip to content
Collin edited this page Apr 27, 2022 · 6 revisions

Endpoints

This is a list of all currently used endpoints

🚧 THIS PAGE IS UNDER CONSTRUCTION 🧱

GENERAL SYNTAX GET/POST/PATCH/DELETE http://localhost:8080/table_name?id=1 POST and PATCH just have the body as json data to be inserted.

/signals

GET "/signals"

Returns all signals in the current EM environment Response Body

[
    {
        "id": 1,
        "user_id": 1,
        "amplitude": "12.30",
        "frequency": "14.30",
        "power": "16.30",
        "bandwidth": "12.00"
    },
    {
        "id": 2,
        "user_id": 2,
        "amplitude": "12.30",
        "frequency": "14.30",
        "power": "16.30",
        "bandwidth": "12.00"
    },
]

POST "/signals"

Post a new signal to the database

Request Body

{
    "user_id": 1,
    "amplitude": 12.3,
    "frequency": 14.3,
    "power": 16.3,
    "bandwidth": 12
}

Response Body Signal updated

/authors

GET "/authors"

Get all authors for the project.

Response Body

[
    {
        "firstName": "Snuffy",
        "lastName": "Airman"
    },
    {
        "firstName": "John",
        "lastName": "Specialist"
    }
]

/users

GET /users

Get all user information from the Database

Response Body

[
    {
        "id": 1,
        "name": "specialist snuffy",
        "isInstructor": false
    },
    {
        "id": 2,
        "name": "sample instructor",
        "isInstructor": true
    }
]

POST /users

Send user information to the Database

Request Body

{
    "name": "specialist snuffy",
    "isInstructor": 0
}

Response Body User created

Clone this wiki locally