### signup user
POST http://localhost:6688/api/signup Content-Type: application/json
- {
- "workspace": "acme", "fullname": "Tyr Chen", "email": "[email protected]", "password": "123456"
}
### signup user
POST http://localhost:6688/api/signup Content-Type: application/json
- {
- "workspace": "acme", "fullname": "Alice Chen", "email": "[email protected]", "password": "123456"
}
### signup user
POST http://localhost:6688/api/signup Content-Type: application/json
- {
- "workspace": "acme", "fullname": "Bob Hua", "email": "[email protected]", "password": "123456"
}
### signin user (invalid)
POST http://localhost:6688/api/signin Content-Type: application/json
- {
- "email": "[email protected]", "password": "a123456"
}
### signin user (valid)
# @name signin POST http://localhost:6688/api/signin Content-Type: application/json
- {
- "email": "[email protected]", "password": "123456"
}
@token = {{signin.response.body.token}}
### signin user (valid)
# @name signin1 POST http://localhost:6688/api/signin Content-Type: application/json
- {
- "email": "[email protected]", "password": "123456"
}
@token1 = {{signin1.response.body.token}}
### create chat POST http://localhost:6688/api/chats Content-Type: application/json Authorization: Bearer {{token}}
- {
- "name": "project X", "members": [1, 2], "public": false
}
### create direct chat POST http://localhost:6688/api/chats Content-Type: application/json Authorization: Bearer {{token}}
- {
- "members": [1, 2], "public": false
}
### create chats without me POST http://localhost:6688/api/chats Content-Type: application/json Authorization: Bearer {{token1}}
- {
- "name": "project Y", "members": [2, 3], "public": false
}
### create direct chat without me POST http://localhost:6688/api/chats Content-Type: application/json Authorization: Bearer {{token1}}
- {
- "members": [2, 3], "public": false
}
### get chat list
GET http://localhost:6688/api/chats Authorization: Bearer {{token}}
### get user list
GET http://localhost:6688/api/users Authorization: Bearer {{token}}
### upload files
POST http://localhost:6688/api/upload Authorization: Bearer {{token}} Content-Type: multipart/form-data; boundary=MyBoundary
--MyBoundary Content-Disposition: form-data; filename="xdiff1.png" Content-Type: application/octet-stream
< /Users/tchen/snapshots/xdiff1.png --MyBoundary Content-Disposition: form-data; filename="hello.txt" Content-Type: text/plain
Hello, World! --MyBoundary--
### get files
GET http://localhost:6688/api/files/1/339/807/e635afbeab088ce33206fdf4223a6bb156.png Authorization: Bearer {{token}}
### send a message
POST http://localhost:6688/api/chats/1 Content-Type: application/json Authorization: Bearer {{token}}
- {
- "content": "Hello, World!", "files": []
}
### get messages
GET http://localhost:6688/api/chats/1/messages?limit=6&last_id=5 Authorization: Bearer {{token}}