@{ ViewData["Title"] = "API"; }
API

If authentication is enabled, use the credentials of the user for Basic Auth(RFC2617)


Method
Endpoint
Description
Parameters
GET
/api/whoami
Returns information for current user
No Params
GET
/api/vehicles
Returns a list of vehicles
No Params
GET
/api/vehicle/info
Returns details for list of vehicles or specific vehicle
VehicleId - Id of Vehicle(optional)
GET
/api/vehicle/adjustedodometer
Returns odometer reading with adjustments applied
vehicleId - Id of Vehicle
odometer - Unadjusted odometer
GET
/api/vehicle/odometerrecords
Returns a list of odometer records for the vehicle
vehicleId - Id of Vehicle
GET
/api/vehicle/odometerrecords/latest
Returns last reported odometer for the vehicle
vehicleId - Id of Vehicle
POST
/api/vehicle/odometerrecords/add
Adds Odometer Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
date - Date to be entered
initialOdometer - Initial Odometer reading(optional)
odometer - Odometer reading
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
PUT
/api/vehicle/odometerrecords/update
Updates Odometer Record
Body(form-data): {
Id - Id of Odometer Record
date - Date to be entered
initialOdometer - Initial Odometer reading
odometer - Odometer reading
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
DELETE
/api/vehicle/odometerrecords/delete
Deletes Odometer Record
Id - Id of Odometer Record
GET
/api/vehicle/planrecords
Returns a list of plan records for the vehicle
vehicleId - Id of Vehicle
POST
/api/vehicle/planrecords/add
Adds Plan Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
description - Description
cost - Cost
type - ServiceRecord/RepairRecord/UpgradeRecord
priority - Low/Normal/Critical
progress - Backlog/InProgress/Testing
notes - notes(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
PUT
/api/vehicle/planrecords/update
Updates Plan Record
Body(form-data): {
Id - Id of Plan Record
description - Description
cost - Cost
type - ServiceRecord/RepairRecord/UpgradeRecord
priority - Low/Normal/Critical
progress - Backlog/InProgress/Testing
notes - notes(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
DELETE
/api/vehicle/planrecords/delete
Deletes Plan Record
Id - Id of Plan Record
GET
/api/vehicle/servicerecords
Returns a list of service records for the vehicle
vehicleId - Id of Vehicle
POST
/api/vehicle/servicerecords/add
Adds Service Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
date - Date to be entered
odometer - Odometer reading
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
PUT
/api/vehicle/servicerecords/update
Updates Service Record
Body(form-data): {
Id - Id of Service Record
date - Date to be entered
odometer - Odometer reading
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
DELETE
/api/vehicle/servicerecords/delete
Deletes Service Record
Id - Id of Service Record
GET
/api/vehicle/repairrecords
Returns a list of repair records for the vehicle
vehicleId - Id of Vehicle
POST
/api/vehicle/repairrecords/add
Adds Repair Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
date - Date to be entered
odometer - Odometer reading
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
PUT
/api/vehicle/repairrecords/update
Updates Repair Record
Body(form-data): {
Id - Id of Repair Record
date - Date to be entered
odometer - Odometer reading
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
DELETE
/api/vehicle/repairrecords/delete
Deletes Repair Record
Id - Id of Repair Record
GET
/api/vehicle/upgraderecords
Returns a list of upgrade records for the vehicle
vehicleId - Id of Vehicle
POST
/api/vehicle/upgraderecords/add
Adds Upgrade Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
date - Date to be entered
odometer - Odometer reading
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
PUT
/api/vehicle/upgraderecords/update
Updates Upgrade Record
Body(form-data): {
Id - Id of Upgrade Record
date - Date to be entered
odometer - Odometer reading
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
DELETE
/api/vehicle/upgraderecords/delete
Deletes Upgrade Record
Id - Id of Upgrade Record
GET
/api/vehicle/taxrecords
Returns a list of tax records for the vehicle
vehicleId - Id of Vehicle
GET
/api/vehicle/taxrecords/check
Updates Outdated Recurring Tax Records
No Params
POST
/api/vehicle/taxrecords/add
Adds Tax Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
date - Date to be entered
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
PUT
/api/vehicle/taxrecords/update
Updates Tax Record
Body(form-data): {
Id - Id of Tax Record
date - Date to be entered
description - Description
cost - Cost
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
DELETE
/api/vehicle/taxrecords/delete
Deletes Tax Record
Id - Id of Tax Record
GET
/api/vehicle/gasrecords
Returns a list of gas records for the vehicle
vehicleId - Id of Vehicle
useMPG(bool) - Use Imperial Units and Calculation
useUKMPG(bool) - Use UK Imperial Calculation
POST
/api/vehicle/gasrecords/add
Adds Gas Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
date - Date to be entered
odometer - Odometer reading
fuelConsumed - Fuel Consumed
cost - Cost
isFillToFull(bool) - Filled To Full
missedFuelUp(bool) - Missed Fuel Up
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
PUT
/api/vehicle/gasrecords/update
Updates Gas Record
Body(form-data): {
Id - Id of Gas Record
date - Date to be entered
odometer - Odometer reading
fuelConsumed - Fuel Consumed
cost - Cost
isFillToFull(bool) - Filled To Full
missedFuelUp(bool) - Missed Fuel Up
notes - notes(optional)
tags - tags separated by space(optional)
extrafields - extrafields(optional)
files - attachments(optional)
}
DELETE
/api/vehicle/gasrecords/delete
Deletes Gas Record
Id - Id of Gas Record
GET
/api/vehicle/reminders
Returns a list of reminders for the vehicle
vehicleId - Id of Vehicle
POST
/api/vehicle/reminders/add
Adds Reminder Record to the vehicle
vehicleId - Id of Vehicle
Body(form-data): {
description - Description
dueDate - Due Date
dueOdometer - Due Odometer reading
metric - Date/Odometer/Both
notes - notes(optional)
tags - tags separated by space(optional)
}
PUT
/api/vehicle/reminders/update
Updates Reminder Record
Body(form-data): {
Id - Id of Reminder Record
description - Description
dueDate - Due Date
dueOdometer - Due Odometer reading
metric - Date/Odometer/Both
notes - notes(optional)
tags - tags separated by space(optional)
}
DELETE
/api/vehicle/reminders/delete
Deletes Reminder Record
Id - Id of Reminder Record
GET
/api/calendar
Returns reminder calendar in ICS format
No Params
POST
/api/documents/upload
Upload Documents
Body(form-data): {
documents[] - Files to Upload
}
@if (User.IsInRole(nameof(UserData.IsRootUser))) {
GET
/api/vehicle/reminders/send
Send reminder emails out to collaborators based on specified urgency.
(must be root user)
urgencies[]=[NotUrgent,Urgent,VeryUrgent,PastDue](optional)
GET
/api/makebackup
Creates a snapshot/backup of the DB at the time and returns a URL to download it.
No Params(must be root user)
GET
/api/cleanup
Clears out temp files. Deep clean will also delete unlinked thumbnails and documents. Returns number of deleted files.
(must be root user)
deepClean(bool) - Perform deep clean(optional)
}