General information
All request should have a token from auth.emilfolino.se as the x-access-token-header.
Projects
Get all projects
GET /projects
Code example
const response = await fetch("https://docket.emilfolino.se/projects", {
headers: {
'x-access-token': [TOKEN],
},
})
const result = await response.json()
Result:
{
"data": [
{
"uid": "fb5a74fe51f39e0df0f928d7cd98445b",
"name": "Starter project"
},
{
"uid": "9d788496c6fabb77336cccd87844284d",
"name": "Greatest project ever"
}
]
}
Create project
POST /projects
Code example
const response = await fetch("https://docket.emilfolino.se/projects", {
body: JSON.stringify({
name: "Greatest project forever, forever-ever"
}),
method: "POST",
headers: {
'content-type': 'application/json',
'x-access-token': [TOKEN],
},
})
const result = await response.json()
Result:
{
"data": {
"uid": "296c53801cccf467a7afe4f10fc496e3",
"name": "Greatest project forever, forever-ever"
}
}
Add user to project
POST /projects/add_user
Code example
const response = await fetch("https://docket.emilfolino.se/projects/add_user", {
body: JSON.stringify({
uid: "296c53801cccf467a7afe4f10fc496e3",
email: "mos@bth.se",
}),
method: "POST",
headers: {
'content-type': 'application/json',
'x-access-token': [TOKEN],
},
})
const result = await response.json()
Result:
{
"data": {
"uid": "296c53801cccf467a7afe4f10fc496e3",
"email": "mos@bth.se"
}
}
Project files
To use the following route, you need a valid JSON Web Token (JWT) set
in the HTTP-header.
The 'x-access-token' header should contain the JWT.