Skip to content

Latest commit

 

History

History
298 lines (212 loc) · 4.07 KB

File metadata and controls

298 lines (212 loc) · 4.07 KB

ILLA Supervisor Backend Users APIs

Index

Update Password

Desc

Update user's password.

API Endpoint

PATCH  /api/v1/users/password

Request Body

{
  "currentPassword": "old_password",
  "newPassword": "new_password"
}

Response

none

Update Nickname

Desc

Update user's nickname.

API Endpoint

PATCH  /api/v1/users/nickname

Request Body

{
    "nickname": "yournickname"
}

Response

none

Update Avatar

Desc

Update user's avatar.

API Endpoint

PATCH  /api/v1/users/avatar

Request Body

{
    "avatar": "https://cdn.illacloud.com/avatar.png"
}

Response

none

Get User Avatar PreSigned Put URL

Desc

Get the upload address of the user's avatar.

API Endpoint

GET  /api/v1/users/avatar/uploadAddress/fileName/:fileName

Request Body

none

Response

{
    "uploadAddress":"http://api.com/xxxxxxx"
}

Update Language

Desc

Update user language settings.

API Endpoint

PATCH  /api/v1/users/language

Request Body

{
    "language": "en-US"
}

Response

none

Update Tutorial Viewed

Desc

Update whether the user has seen the tutorial.

API Endpoint

PATCH  /api/v1/users/tutorialViewed

Request Body

{
    "isTutorialViewed": true
}

Response

// HTTP 200
none

Get Users

Desc

Get current user information, no parameter required, will be based on the currently logged in user's TOKEN to resolve the user ID, and then based on the ID to get the user information.

API Endpoint

GET  /api/v1/users

Request Body

none

Response

{
    "userID": "1",
    "uid": "uuid",
    "nickname": "your_nickname",
    "avatar": "https://cdn.illasoft.com/userID/avatar.png",
    "email": "youremail@domain.com",
    "language": "en-US",
    "isTutorialViewed": false,
    "isPasswordSetted": true,
    "createdAt": "2023-03-03 15:54:17.486328",
    "updatedAt": "2023-03-03 15:54:17.486328"
}

Delete User

Desc

User deletes himself/herself If the user is an owner, he/she must transfer all his/her owners before deleting himself/herself.

API Endpoint

DELETE  /api/v1/users

Request Body

none

Response

// HTTP 200
// or
// HTTP 500

logout

Desc

logout.

API Endpoint

POST  /api/v1/users/logout

Request Body

// none

Response

// HTTP 200