Method and Path | Description | ||
---|---|---|---|
POST | /times | Create a time entry |
|
GET | /times | List all times |
|
GET | /times/:id | Get a specific time entry |
|
PATCH | /times | Patch a time entry |
|
DELETE | /times/:id | Remove a specific time entry |
Method and Path | Description | ||
---|---|---|---|
POST | /users/authenticate | Authentication |
|
POST | /users | Create a user |
|
GET | /users | List all users |
|
GET | /users/:id | Get a specific user |
|
PATCH | /users | Patch a user |
|
DELETE | /users/:id | Remove a specific user |
Name | Type | Required? | Default | Description |
---|---|---|---|---|
Authorization | string | No | - | A base64-encoded JWT token looking like ‘Authorization : Bearer {token}’ |
Patch operation
Name | Value | Description |
---|---|---|
test | test |
|
replace | replace |
|
Integer for ID or string for any other
Name | Value | Description |
---|---|---|
string | string |
|
integer | integer |
|
Time patch field path (id only for test)
Name | Value | Description |
---|---|---|
distance | distance |
|
time | time |
|
id | id |
|
User patch field path (id only for test)
Name | Value | Description |
---|---|---|
username | username |
|
password | password |
|
role | role |
|
id | id |
|
User Role
Name | Value | Description |
---|---|---|
user | user | Regular user
|
manager | manager | User manager
|
admin | admin | The God himself
|
Interfaces: None
Time entry
Field | Type | Required? | Default | Description |
---|---|---|---|---|
id | integer | Yes | - | Unique time id
|
distance | integer | Yes | - | Distance in meters
|
time | integer | Yes | - | Time in seconds
|
createdAt | date-time-iso8601 | Yes | - | Creation date-time
|
updatedAt | date-time-iso8601 | Yes | - | Last update date-time
|
Interfaces: None
Time entry
Field | Type | Required? | Default | Description |
---|---|---|---|---|
distance | integer | Yes | - | Distance in meters
|
time | integer | Yes | - | Time in seconds
|
Interfaces: None
Time patch entry
Field | Type | Required? | Default | Description |
---|---|---|---|---|
op | patch.operation | Yes | - |
|
path | time.patch.path | Yes | - |
|
value | integer | Yes | - |
|
Interfaces: None
User
Field | Type | Required? | Default | Description |
---|---|---|---|---|
id | integer | Yes | - | Unique user id
|
username | string | Yes | - | Username
|
role | user.role | Yes | - | User Role
|
createdAt | date-time-iso8601 | Yes | - | Creation date-time
|
updatedAt | date-time-iso8601 | Yes | - | Last update date-time
|
Interfaces: None
User
Field | Type | Required? | Default | Description |
---|---|---|---|---|
username | string | Yes | - | Username
|
password | string | Yes | - | Password
|
Interfaces: None
User patch entry
Field | Type | Required? | Default | Description |
---|---|---|---|---|
op | patch.operation | Yes | - |
|
path | user.patch.path | Yes | - |
|
value | stringOrInteger | Yes | - |
|