This document provides an overview and documentation for the LifeTracker REST API service. It describes the available endpoints, request and response formats, and provides examples for common use cases, security configuration and token usage.
The base URL for accessing the API service is:
https://eternaltimeline.ru/api
To access the API service, you need to include an authentication token in the request header. The token should be included in the Authorization header field using the Bearer authentication scheme.
If you are a new user, you need to send a request to "", after which you will get your UserId AccessToken and RefreshToken.
POST /auth/signup
Endpoint allows you to create a new user. It requires the following parameters:
username: [string](required) unique usernameemail: [string](required) unique emailpassword: [string](required) passwordfirstname: [string](optional) firstnamelastname: [string](optional) lastname
POST /signup HTTP/1.1
Content-Type: application/json
{
"username": "YourUsername",
"email": "[email protected]",
"firstname": "ludwig",
"firstname": "andreas",
"password": "YourPassword123"
}{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}If you already have an account, you can use the login form
POST /auth/login
Endpoint allows you to login. It requires the following parameters:
username: [string](required) your usernamepassword: [string](required) password
POST /login HTTP/1.1
Content-Type: application/json
{
"username": "YourUsername",
"password": "YourPassword123"
}{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}With each authorization, a new refreshToken is created, which you can use to access resources.
If you need to log out you can use next endpoint:
POST /auth/logout
Endpoint allows you to logout. It requires the following parameters:
user_id: [string](required) your user_idaccess_token: [string](required) your access tokenrefresh_token: [string](required) your refresh token
POST /logout HTTP/1.1
Content-Type: application/json
{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}The query will result in an empty body and the execution status can be tracked via the response status
POST /auth/logout-all
Endpoint allows you to logout all your devices. It requires the following parameters:
user_id: [string](required) your user_idaccess_token: [string](required) your access tokenrefresh_token: [string](required) your refresh token
POST /logout-all HTTP/1.1
Content-Type: application/json
{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}Works just the same as /logout but logout all devices
POST /auth/access-token
Generates new access-token using refresh-token
user_id: [string](required) your user_idrefresh_token: [string](required) your refresh token
POST /access-token HTTP/1.1
Content-Type: application/json
{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}POST /auth/refresh-token
Generates new access-token and refresh-token using refresh-token
user_id: [string](required) your user_idrefresh_token: [string](required) your refresh token
POST /logout HTTP/1.1
Content-Type: application/json
{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}{
"user_id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}User contains all info about user.
DELETE /users/{userId}
/users allows you to delete all user data. It supports the following parameters:
userId: (required) userId as it's provided after authentication.
DELETE /users/{id} HTTP/1.1
Authorization: Bearer <your_token>{
"id": "1234a56-789b-01cd-d23e-4567f8j9h0i1"
}GET /users/{id}
/users allows you to retrieve a user data. It supports the following parameters:
userId: (required) userId as it's provided after authentication.
GET /users/{id} HTTP/1.1
Authorization: Bearer <your_token>{
"id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"username": "lsherry",
"firstname": "Ludwig",
"lastname": "Andreas",
"email": "[email protected]",
"created_date": "2023-05-18",
"last_updated_date": "2023-05-18"
}PATCH /users/{id}
/users allows you to change a user data. Supports JSON Patch that specified in RFC 6902 from the IETF.
userId: (required) userId as it's provided after authentication.
GET /users/{id} HTTP/1.1
Authorization: Bearer <your_token>
[
{ "op": "replace", "path": "/username", "value": "lsherry_new" },
{ "op": "replace", "path": "/firstname", "value": "Restalw" },
{ "op": "replace", "path": "/email", "value": "[email protected]" }
]{
"id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"username": "lsherry_new",
"firstname": "Restalw",
"lastname": "Andreas",
"email": "[email protected]",
"created_date": "2023-05-18",
"last_updated_date": "2023-05-18"
}PUT /users/{id}
/users allows you to change whole user data. It supports the following parameters:
userId: (required) userId as it's provided after authentication.username: (optional) userId as it's provided after authentication.firstname: (optional) userId as it's provided after authentication.lastname: (optional) userId as it's provided after authentication.email: (optional) userId as it's provided after authentication.password: (optional) userId as it's provided after authentication.~~
GET /users/{id} HTTP/1.1
Authorization: Bearer <your_token>
{
"id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"username": "lsherry_new",
"firstname": "Restalw",
"lastname": "Andreas",
"email": "[email protected]",
"created_date": "2023-05-18",
"last_updated_date": "2023-05-18"
}{
"id": "1234a56-789b-01cd-d23e-4567f8j9h0i1",
"username": "lsherry_new",
"firstname": "Restalw",
"lastname": "Andreas",
"email": "[email protected]",
"created_date": "2023-05-18",
"last_updated_date": "2023-05-18"
}Documentation not provided yet
Documentation not provided yet
Documentation not provided yet
In case of errors, the API service returns appropriate HTTP status codes along with error messages in the response body.
Here are some common error codes:
400 Bad Request: The request was invalid or could not be understood.
401 Unauthorized: The request lacks valid authentication credentials.
404 Not Found: The requested resource could not be found.
409 Conflict: The request can not be performed because of conflict of user's data.
This concludes the documentation for the REST API service. Please refer to the specific endpoint details for more information on how to use the API.
If you have any further questions or need assistance, please contact our support team.