request:
{
"token": "CHAT eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI3NzlkZjNkOC03NGQwLTQ4M2YtODlmNy05ZmY4ZTE5NTQwN2QiLCJzdWIiOiJhIiwiaWF0IjoxNTM5NDQ3NDM5LCJleHAiOjE1NDAwNTIyMzl9.RoxXnb38achZ6EjRwYKiYIcd35pac96w3NvFwQfZkhbqYh6C1z-9iqcuqLl_nDmF_I54soNPXSGZ16MMOHhsmA",
"type": "JOIN"
}
{
"content": "test",
"conversationId": "1",
"type": "TEXT",
"token": "CHAT eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI3NzlkZjNkOC03NGQwLTQ4M2YtODlmNy05ZmY4ZTE5NTQwN2QiLCJzdWIiOiJhIiwiaWF0IjoxNTM5NDQ3NDM5LCJleHAiOjE1NDAwNTIyMzl9.RoxXnb38achZ6EjRwYKiYIcd35pac96w3NvFwQfZkhbqYh6C1z-9iqcuqLl_nDmF_I54soNPXSGZ16MMOHhsmA"
}
response: token attribute is not used
{
"messageId":null,
"type":"JOIN",
"content":null,
"datetime":null,
"conversationId":null,
"username":"a",
"token":""}
{
"messageId":null,
"type":"LEAVE",
"content":null,
"datetime":null,
"conversationId":null,
"username":"b",
"token":null
}
{
"messageId":"23",
"type":"TEXT",
"content":"fsd",
"datetime":"2018-10-22 03:10:34",
"conversationId":"1",
"username":"b",
"token":""
}
-> token in header
Authorization: CHAT eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI3NzlkZjNkOC03NGQwLTQ4M2YtODlmNy05ZmY4ZTE5NTQwN2QiLCJzdWIiOiJhIiwiaWF0IjoxNTM5NDQ3NDM5LCJleHAiOjE1NDAwNTIyMzl9.RoxXnb38achZ6EjRwYKiYIcd35pac96w3NvFwQfZkhbqYh6C1z-9iqcuqLl_nDmF_I54soNPXSGZ16MMOHhsmA
{
"active": true,
"user":
{
"displayName": "userA",
"avatarUrl": "http://localhost:8083/api/avatar/default.jpg",
"username": "a",
"email": "[email protected]"
}
}
-> {"success": "true"}
-> {
"timestamp": 1539447546025,
"status": 409,
"error": "Conflict",
"message": "Username has been used",
"path": "/api/signup"
}
-> {
"timestamp": 1539447546025,
"status": 520,
"error": "Unknown Error",
"message": "Some error has occurred",
"path": "/api/signup"
}
-> {"success": "true"}
-> {
"timestamp": 1539447546025,
"status": 409,
"error": "Conflict",
"message": "Username has been used",
"path": "/api/signup"
}
-> {
"timestamp": 1539447546025,
"status": 520,
"error": "Unknown Error",
"message": "Some error has occurred",
"path": "/api/signup"
}
Email will be sent automatically if user is not active
input: token in Authorization header
-> {
"timestamp": 1539520526152,
"status": 400,
"error": "Bad Request",
"message": "Incorrect password",
"path": "/api/changePassword"
}
-> {"result":"success"}
For test only
-> [
{
"username": "a",
"password": "$2a$10$gj4OtbyETCraxaVKBg5CXuyIxjOy93vo83nJCgnytwkv5BUHpjmi.",
"displayName": "displayD",
"email": "[email protected]"
}
]
input: token in Authorization header
-> [
{
"username": "huynhha12798",
"displayName": "Huynh Ha",
"email": "[email protected]",
"avatarUrl": "http://localhost:8083/api/avatar/default.jpg",
"online": false
}
]
input: token in Authorization header
-> {
"username": "a",
"displayName": "userA",
"email": "[email protected]",
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
}
-> {
"timestamp": 1540779604010,
"status": 404,
"error": "Not Found",
"message": "User doesn't exist",
"path": "/api/user/e"
}
"success": true
input: token in Authorization header
{
"listUsername": [
"username1",
"username2",
"username2"
]
}
-> {
"conversationId": "12345"
}
input: token in Authorization header
[
{
"conversationId": "3",
"conversationName": "NameOfABC",
"lastMessage": null,
"listUser": [
{
"displayName": "userA",
"username": "a",
"nickname": null,
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
},
{
"displayName": "userB",
"username": "b",
"nickname": null,
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
},
{
"displayName": "userC",
"username": "c",
"nickname": null,
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
}
],
"notiCount": 0
}
]
input: token in Authorization header
[
{
"conversationId": "1",
"conversationName": "NameOfAB",
"lastMessage": null,
"listUser": [
{
"displayName": "userA",
"username": "a",
"nickname": null,
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
},
{
"displayName": "userB",
"username": "b",
"nickname": null,
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
}
],
"notiCount": 0
},
{
"conversationId": "2",
"conversationName": "NameOfBC",
"lastMessage": null,
"listUser": [
{
"displayName": "userB",
"username": "b",
"nickname": null,
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
},
{
"displayName": "userC",
"username": "c",
"nickname": null,
"avatarUrl": "vre.hcmut.edu.vn/threadripper/api/avatar/default.jpg",
"online": false
}
],
"notiCount": 0
}
]
input: token in Authorization header
{
"conversationId": "2",
"conversationName": null,
"lastMessage": {
"messageId": "2",
"type": "TEXT",
"content": "2",
"datetime": "2018-10-19 14:22:18",
"conversationId": "2",
"username": "b",
},
"listUser": [
{
"displayName": "displayD",
"username": "a",
"nickname": null,
"avatarUrl": "http://localhost:8083/api/avatar/10.bmp",
"online": false
},
{
"displayName": "b",
"username": "c",
"nickname": null,
"avatarUrl": "http://localhost:8083/api/avatar/default.jpg",
"online": false
}
],
"notiCount": 1
}
input: token in Authorization header
-> {
"result": "success"
}
input: token in Authorization header
-> {
"timestamp": 1539943510009,
"status": 520,
"error": "Http Status 520",
"message": "User does not have access privileges",
"path": "/api/message"
}
-> [
{
"messageId": "2",
"type": "TEXT",
"content": "2",
"datetime": "2018-10-19",
"conversationId": "2",
"username": "b"
},
{
"messageId": "1",
"type": "TEXT",
"content": "1",
"datetime": "2018-10-19",
"conversationId": "2",
"username": "a"
}
]
Support all format
-> Header:
Content-Type: image/png (image/jpeg OR image/gif OR image/bmp ...)
Content-Disposition: attachment; filename="{filename}.{ext}"
Support all format
-> Header:
Content-Type: image/png (image/jpeg OR image/gif OR image/bmp ...)
Content-Disposition: attachment; filename="{filename}.{ext}"
Support all format
-> Header:
Content-Disposition: attachment; filename="{filename.ext}"
Support all format
input: token in Authorization header
param:
file: File type Object,
ext: file extension ("jpg"/"png"/"gif"/"bmp"/...)
{
"avatarUrl": "http://localhost:8083/api/avatar/10.bmp"
}
Support all format
input: token in Authorization header
param:
file: File type Object,
ext: file extension ("jpg"/"png"/"gif"/"bmp"/...)
{
"imageUrl": "http://localhost:8083/api/image/10.jpg"
}
Support all format
input: token in Authorization header
param:
file: File type Object,
ext: file extension ("cpp"/"png"/"py"/"exe"/...)
{
"fileUrl": "http://localhost:8083/api/file/10.exe"
}