Updates API documentation

This commit is contained in:
BinaryAlley committed 2026-08-23 03:57:37 -07:00
1 parent 53ec400921
commit 629e6e463e
59 files changed
+1558 -192

No files matched your search

@@ -14,6 +14,9 @@
- [Change Password](#change-password)
- [Change Password Request](#change-password-request)
- [Change Password Response](#change-password-response)
- [Get Users](#get-users)
- [Get Users Request](#get-users-request)
- [Get Users Response](#get-users-response)
## Authentication
@@ -27,10 +30,10 @@ POST api/v1/auth/register
```json
{
"Username": "JohnDoe",
"Password": "Abcd123$",
"PasswordConfirm": "Abcd123$",
"Use2fa": true
"username": "JohnDoe",
"password": "Abcd123$",
"passwordConfirm": "Abcd123$",
"use2fa": true
}
```
@@ -42,9 +45,9 @@ POST api/v1/auth/register
```json
{
"Id": "c8ec9858-ed98-4936-a893-cddfe40edf5c",
"Username": "JohnDoe",
"TotpSecret": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABCQAAAQkAQAAAACN7fKkAAAFW0lEQVR4nO3bQW4cOQwF0L6B73/L3MABjCp/ilR1BphkFAl..."
"id": "c8ec9858-ed98-4936-a893-cddfe40edf5c",
"username": "JohnDoe",
"totpSecret": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABCQAAAQkAQAAAACN7fKkAAAFW0lEQVR4nO3bQW4cOQwF0L6B73/L3MABjCp/ilR1BphkFAl..."
}
```
@@ -58,9 +61,9 @@ POST api/v1/auth/login
```json
{
"Username": "JohnDoe",
"Password": "Abcd123$",
"TotpCode": "123456"
"username": "JohnDoe",
"password": "Abcd123$",
"totpCode": "123456"
}
```
@@ -72,10 +75,10 @@ POST api/v1/auth/login
```json
{
"Id": "e5ea6c64-992b-4173-9c1c-46d5786e4226",
"Username": "JohnDoe",
"Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwNzE2Y2E1ZC1hZjhkLT...",
"UsesTotp": true
"id": "e5ea6c64-992b-4173-9c1c-46d5786e4226",
"username": "JohnDoe",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwNzE2Y2E1ZC1hZjhkLT...",
"usesTotp": true
}
```
@@ -89,8 +92,8 @@ POST api/v1/auth/recover-password
```json
{
"Username": "JohnDoe",
"TotpCode": "123456"
"username": "JohnDoe",
"totpCode": "123456"
}
```
@@ -102,7 +105,7 @@ POST api/v1/auth/recover-password
```json
{
"IsPasswordReset": true
"isPasswordReset": true
}
```
@@ -116,10 +119,10 @@ POST api/v1/auth/change-password
```json
{
"Username": "JohnDoe",
"CurrentPassword": "Abcd123$",
"NewPassword": "123$Abcd",
"NewPasswordConfirm": "123$Abcd"
"username": "JohnDoe",
"currentPassword": "Abcd123$",
"newPassword": "123$Abcd",
"newPasswordConfirm": "123$Abcd"
}
```
@@ -131,6 +134,37 @@ POST api/v1/auth/change-password
```json
{
"IsPasswordChanged": true
"isPasswordChanged": true
}
```
### Get Users
#### Get Users Request
```js
GET api/v1/auth/users
```
#### Get Users Response
```js
200 Ok
```
```json
[
{
"id": "c8ec9858-ed98-4936-a893-cddfe40edf5c",
"username": "JohnDoe",
"createdOnUtc": "2025-01-01T12:00:00.0000000Z",
"updatedOnUtc": null
},
{
"id": "e5ea6c64-992b-4173-9c1c-46d5786e4226",
"username": "JaneDoe",
"createdOnUtc": "2025-01-02T12:00:00.0000000Z",
"updatedOnUtc": "2025-01-03T12:00:00.0000000Z"
}
]
```
@@ -50,22 +50,16 @@ GET api/v1/auth/permissions
```
```json
{
"Role": {
"Id": "61567253-c752-4680-989c-a40a73f3e4b9",
"RoleName": "Editor"
[
{
"id": "5264e3a8-bdec-4ec0-9423-839f3a9afe4b",
"permissionName": "CanDeleteUsers"
},
"Permissions": [
{
"Id": "5264e3a8-bdec-4ec0-9423-839f3a9afe4b",
"PermissionName": "CanDeleteUsers"
},
{
"Id": "7830cd55-3585-4da1-bfad-994be8637da8",
"PermissionName": "CanViewUsers"
}
]
}
{
"id": "7830cd55-3585-4da1-bfad-994be8637da8",
"permissionName": "CanViewUsers"
}
]
```
### Get Roles
@@ -85,8 +79,8 @@ GET api/v1/auth/roles
```json
[
{
"Id": "776e440d-39d2-4f31-8dcd-481de61e8792",
"RoleName": "Admin"
"id": "776e440d-39d2-4f31-8dcd-481de61e8792",
"roleName": "Admin"
}
]
```
@@ -106,20 +100,22 @@ GET api/v1/auth/roles/{roleId}/permissions
```
```json
[
{
"Id": "c64fc53f-ef32-4eba-9592-67b42ced63a3",
"PermissionName": "CanViewUsers"
{
"role": {
"id": "61567253-c752-4680-989c-a40a73f3e4b9",
"roleName": "Editor"
},
{
"Id": "dbfb6847-7a05-49b5-b63b-b08b020389e8",
"PermissionName": "CanDeleteUsers"
},
{
"Id": "c3dcd487-01fb-4ad9-b14d-7767809bd07c",
"PermissionName": "CanRegisterUsers"
}
]
"permissions": [
{
"id": "5264e3a8-bdec-4ec0-9423-839f3a9afe4b",
"permissionName": "CanDeleteUsers"
},
{
"id": "7830cd55-3585-4da1-bfad-994be8637da8",
"permissionName": "CanViewUsers"
}
]
}
```
### Add Role
@@ -130,6 +126,16 @@ GET api/v1/auth/roles/{roleId}/permissions
POST api/v1/auth/roles
```
```json
{
"roleName": "Editor",
"permissions": [
"7934ff13-1ccd-4c24-bab3-6423c905e249",
"8f23e43a-bb4b-483a-99eb-7ab361df7482"
]
}
```
#### Add Role Response
```js
@@ -138,18 +144,18 @@ POST api/v1/auth/roles
```json
{
"Role": {
"Id": "e5b67972-6928-4be1-a757-e98879d4a12a",
"RoleName": "Editor"
"role": {
"id": "e5b67972-6928-4be1-a757-e98879d4a12a",
"roleName": "Editor"
},
"Permissions": [
"permissions": [
{
"Id": "7934ff13-1ccd-4c24-bab3-6423c905e249",
"PermissionName": "CanDeleteUsers"
"id": "7934ff13-1ccd-4c24-bab3-6423c905e249",
"permissionName": "CanDeleteUsers"
},
{
"Id": "8f23e43a-bb4b-483a-99eb-7ab361df7482",
"PermissionName": "CanViewUsers"
"id": "8f23e43a-bb4b-483a-99eb-7ab361df7482",
"permissionName": "CanViewUsers"
}
]
}
@@ -165,9 +171,9 @@ PUT api/v1/auth/roles
```json
{
"RoleId": "73d204e2-5922-441d-83d8-8d4d8fc29eaa",
"RoleName": "Editor",
"Permissions": [
"roleId": "73d204e2-5922-441d-83d8-8d4d8fc29eaa",
"roleName": "Editor",
"permissions": [
"ac113d18-69bb-4162-8c05-ff7a5559059a",
"3c2fd936-8d4a-4963-b237-9f8d3aeeab26"
]
@@ -182,18 +188,18 @@ PUT api/v1/auth/roles
```json
{
"Role": {
"Id": "61567253-c752-4680-989c-a40a73f3e4b9",
"RoleName": "Editor"
"role": {
"id": "61567253-c752-4680-989c-a40a73f3e4b9",
"roleName": "Editor"
},
"Permissions": [
"permissions": [
{
"Id": "5264e3a8-bdec-4ec0-9423-839f3a9afe4b",
"PermissionName": "CanDeleteUsers"
"id": "5264e3a8-bdec-4ec0-9423-839f3a9afe4b",
"permissionName": "CanDeleteUsers"
},
{
"Id": "7830cd55-3585-4da1-bfad-994be8637da8",
"PermissionName": "CanViewUsers"
"id": "7830cd55-3585-4da1-bfad-994be8637da8",
"permissionName": "CanViewUsers"
}
]
}
@@ -218,7 +224,7 @@ DELETE api/v1/auth/roles/{roleId}
#### Get Authorization Request
```js
GET api/v1/auth/get-authorization
GET api/v1/auth/get-authorization?userId=8e5e2be7-9f3b-4309-882b-8913dc6bda10
```
#### Get Authorization Response
@@ -229,9 +235,9 @@ GET api/v1/auth/get-authorization
```json
{
"UserId": "8e5e2be7-9f3b-4309-882b-8913dc6bda10",
"Role": "Admin",
"Permissions": [
"userId": "8e5e2be7-9f3b-4309-882b-8913dc6bda10",
"role": "Admin",
"permissions": [
"CanRegisterUsers",
"CanDeleteUsers"
]
@@ -255,16 +261,16 @@ GET api/v1/auth/users/{userId}/permissions
```json
[
{
"Id": "52c58482-f792-4d8a-b97c-7944cf4500d5",
"PermissionName": "CanViewUsers"
"id": "52c58482-f792-4d8a-b97c-7944cf4500d5",
"permissionName": "CanViewUsers"
},
{
"Id": "b3b7e562-2e42-455f-a9e7-fed38a3ff63e",
"PermissionName": "CanDeleteUsers"
"id": "b3b7e562-2e42-455f-a9e7-fed38a3ff63e",
"permissionName": "CanDeleteUsers"
},
{
"Id": "43bdf58b-1edf-4909-ac43-8be1aaf191f4",
"PermissionName": "CanRegisterUsers"
"id": "43bdf58b-1edf-4909-ac43-8be1aaf191f4",
"permissionName": "CanRegisterUsers"
}
]
```
@@ -285,8 +291,8 @@ GET api/v1/auth/users/{userId}/role
```json
{
"Id": "54bfd571-9283-4949-bd47-9aa4416c5328",
"RoleName": "Admin"
"id": "54bfd571-9283-4949-bd47-9aa4416c5328",
"roleName": "Admin"
}
```
@@ -300,8 +306,8 @@ PUT api/v1/auth/users/{userId}/role-and-permissions
```json
{
"RoleId": "92e996fd-645e-4e2f-96fe-30c27e4c6423",
"Permissions": [
"roleId": "92e996fd-645e-4e2f-96fe-30c27e4c6423",
"permissions": [
"5957ea98-3deb-4ebe-a5b9-1aafa1480558",
"5b9cedf5-9fc5-44d9-bc7e-1164409dc952"
]
@@ -316,9 +322,9 @@ PUT api/v1/auth/users/{userId}/role-and-permissions
```json
{
"UserId": "910518c3-01a4-4622-8114-3a77eed0f392",
"Role": "Editor",
"Permissions": [
"userId": "910518c3-01a4-4622-8114-3a77eed0f392",
"role": "Editor",
"permissions": [
"CanRegisterUsers",
"CanDeleteUsers"
]
@@ -0,0 +1,63 @@
# Lumina API
- [Lumina API](#lumina-api)
- [Settings](#settings)
- [Get User Settings](#get-user-settings)
- [Get User Settings Request](#get-user-settings-request)
- [Get User Settings Response](#get-user-settings-response)
- [Update User Settings](#update-user-settings)
- [Update User Settings Request](#update-user-settings-request)
- [Update User Settings Response](#update-user-settings-response)
## Settings
### Get User Settings
#### Get User Settings Request
```js
GET api/v1/users/me/settings
```
Returns the settings of the currently authenticated user.
#### Get User Settings Response
```js
200 Ok
```
```json
{
"userId": "2cff0c0f-3a67-4e30-b94f-f4e948a3b64f",
"isPaginationEnabled": true,
"itemsPerPage": 50,
"ignoreThePrefixForAlphaPicker": true,
"isThemeCachingEnabled": true
}
```
### Update User Settings
#### Update User Settings Request
```js
PUT api/v1/users/me/settings
```
Updates the settings of the currently authenticated user.
```json
{
"isPaginationEnabled": true,
"itemsPerPage": 50,
"ignoreThePrefixForAlphaPicker": true,
"isThemeCachingEnabled": true
}
```
#### Update User Settings Response
```js
200 Ok
```