GET /api/whoami
200 Ok
{
ipaddress: "::1",
language: "en-US,en;q=0.9",
software: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
}
GET /api/timestamp/:date?
200 Ok
{
"unix": 1,
"utc": "Thu, 01 Jan 1970 00:00:00 GMT",
"Johannesburg": "1970/01/01, 02:00:00",
"New_York": "1969/12/31, 19:00:00",
"Los_Angeles": "1969/12/31, 16:00:00",
"Chicago": "1969/12/31, 18:00:00",
"London": "1970/01/01, 01:00:00",
"Paris": "1970/01/01, 01:00:00",
"Berlin": "1970/01/01, 01:00:00",
"Sydney": "1970/01/01, 10:00:00",
"Toronto": "1969/12/31, 19:00:00",
"Shanghai": "1970/01/01, 08:00:00",
"Tokyo": "1970/01/01, 09:00:00",
"Sao_Paulo": "1969/12/31, 21:00:00",
"Lagos": "1970/01/01, 01:00:00"
}
400 Bad Request
{
error: "Invalid Date"
}
POST /api/url
{
original: "https://cossie.onrender.com/"
}
201 Created
{
original: "https://cossie.onrender.com/",
short: "/api/url/0"
}
200 Ok
{
original: "https://cossie.onrender.com/",
short: "/api/url/0"
}
400 Bad Request
{
error: "Invalid URL"
}
200 Ok
{
originalname: "App.tsx",
encoding: "7bit",
mimetype: "text/plain",
size: 2426
}
GET /api/quotes/?limit={{number}}
200 Ok
{
quotes: [
{
quote: "To iterate is human, to recurse divine.",
author: "Peter Deutsh",
tags: [
"humor"
]
}
]
}
POST /api/exercisetracker
{
username: "John Doe"
}
201 Created
{
username: "John Doe",
_id: "63b74fd0bbc598b8fa544c5d"
}
POST /api/exercisetracker/:_id/logs
{
_id: "63b74fd0bbc598b8fa544c5d",
duration: 120,
date: "2020-01-01",
description: "Dodge, dip, duck, dive, dodge"
}
201 Created
{
_id: "63b74fd0bbc598b8fa544c5d",
username: "John Doe",
date: "Wed Jan 01 2020",
description: "Dodge, dip, duck, dive, dodge"
}
GET /api/exercisetracker/:_id/logs?to={{date}}&from={{date}}&limit={{number}}
200 Ok
{
_id: "63b74fd0bbc598b8fa544c5d",
count: 1,
username: "John Doe",
log: [
{
description: "Dodge, dip, duck, dive, dodge",
duration: 120,
date: "Wed Jan 01 2020"
}
]
}
GET /api/converter?input={{input}}
Example
GET /api/converter?input=123mi
Supported units: km, mi, L, gal, kg, lbs
200 Ok
{
initNum: 123,
initUnit: "mi",
returnNum: 197.94882,
returnUnit: "km",
string: "123 miles converts to 197.94882 kilometers"
}
POST /api/translate
{
text: "lorry bank holiday 1.15",
locale: "british-to-american"
}
200 Ok
{
text: "lorry bank holiday 1.15",
translation: "<span class=\"highlight\">truck</span> <span class=\"highlight\">public holiday</span> <span class=\"highlight\">1:15</span>"
}
400 Bad Request
{
error: "Required field(s) missing"
}
POST /api/issues/:project
{
"issue_title": "test",
"issue_text": "this is a test",
"created_by": "admin",
"assigned_to": "admin"
}
201 Created
{
"assigned_to": "admin",
"status_text": "",
"open": true,
"_id": "63b75ef85ca1072dcc0b9b38",
"issue_title": "test",
"issue_text": "this is a test",
"created_by": "admin",
"created_on": "2023-01-05T23:36:24.644Z",
"updated_on": "2023-01-05T23:36:24.644Z"
}
400 Bad Request
{
error: "required field(s) missing"
}
PUT /api/issues/:project
{
"_id": "63b75ef85ca1072dcc0b9b38",
"issue_title": "test",
"issue_text": "this is a test",
"created_by": "admin",
"assigned_to": "admin",
"status_text": "test complete",
"open": false
}
200 Ok
{
"result": "successfully updated",
"_id": "63b75ef85ca1072dcc0b9b38"
}
DELETE /api/issues/:project
{
"_id": "63b75ef85ca1072dcc0b9b38",
}
200 Ok
{
"result": "successfully deleted",
"_id": "63b75ef85ca1072dcc0b9b38"
}
GET /api/issues/:project?created_by={{creator}}&assigned_to={{person}}&open={{boolean}}
200 Ok
[
{
_id: "63b75ef85ca1072dcc0b9b38",
issue_title: "test",
issue_text: "this is a test",
created_by: "admin",
assigned_to: "admin",
status_text: "test complete",
created_on: "2023-01-05T23:36:24.644Z",
updated_on: "2023-01-06T00:10:58.852Z",
open: false,
__v: 0
}
]