Skip to content
Dilpreet Chana edited this page Oct 12, 2020 · 6 revisions

vCar API Documentation

Authorization

All commands must be authorized with a bearer token associated with an email.

POST /api/v1/register

Get an email linked auth token

Request Payload

{
    "email": <user email>,
    "password": <user password>
}

Response

Auth token is sent to email.

POST /api/v1/vehicles

Register a new vehicle on the server. Each email is limited to 5 vehicles.

Request Payload

{
	"email": <user email>,
	"token": <auth token>,
	"vtype": <vehicle type>
}

Response

Vehicle ID is sent to email.

GET /api/v1/vechicles/{vid}

Get the state of a vehicle

UPDATE /api/v1/vehicles/{vid}

Send a CAN message to vehicle

DELETE /api/v1/vehicles/{vid}

Delete vechicle