Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions users-status/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
| [PATCH /users/status/:userId](#patch-usersstatususerid) | Creates or Updates a new User Status data with the given id |
| [DELETE /users/self](#delete-usersstatususerid) | Deletes the User Status data of the User with the given id |
| [PATCH /users/status/batch](#patch-usersstatusbatch) | Batch Update the UserIds of the passed users to Idle |
| [PATCH /users/status/sync](#patch-usersstatussync) | runs user/status/update, user/status, user/status/batch |

## **GET /users/status**

Expand Down Expand Up @@ -241,3 +242,45 @@ Deletes the User Status data of the User with the given id.
- **Content:** `{ 'statusCode': 404, 'id': null ,'userId':'userId',"message": "User Status to delete not found." }`
- **Code:** 500
- **Content:** `{ 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' }`

```

## **PATCH /users/status/sync**

Runs PATCH /users/status/batch, GET /users/status, PATCH /users/status/batch internally and is getting used for cronjob trigger

- **Headers**
Content-Type: application/json
Authorization: Bearer `<JWT>`

- **Success Response:**
- **Code:** 200
- **Content:**
```
{
"message": "Users status updated successfully.",
"data": <updatedUserData>
}
```

- **Error Responses:**
- **Code:** 500
- **Content:**
```
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "The server has encountered an unexpected error. Please contact the administrator for more information."
}
```
- **Code:** 401
- **Content:**
```
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Unauthenticated User"
}
```