Login into the API in order to request an access token.
Endpoint
POST /access-tokenRequest body
{
username: string,
password: string
}Response
{
access_token: string
}To use the app, the user must have their authentication permission.
Authorization: Bearer {access_token}
Endpoint
GET api/message?recipient_user_idWhere recipient_user_id is required for execution the request.
Here recipient_user_id is the user to whom we have interacted.
Response
{
message: [
{
content: string,
creation_dt: string,
modification_dt: string,
deactivated_dt: string,
message_state_dt: string //YYYY-MM-DD H:i:s,
user: {
user_id: int,
avatar_url: string,
email: string
}
},
...
]
}To use the app, the user must have their authentication permission.
Authorization: Bearer {access_token}
Endpoint
GET api/userResponse
{
user: [
{
name: string,
uuid: string,
creation_dt: string,
modification_dt: string,
deactivated_dt: string,
cellphone: string,
email: string
},
...
]
}To use the app, the user must have their authentication permission.
Authorization: Bearer {access_token}
Endpoint
GET api/user/{id_user}Response
{
user: [
{
name: string,
uuid: string,
creation_dt: string,
modification_dt: string,
deactivated_dt: string,
cellphone: string
}
]
}To use the app, the user must have their authentication permission.
Authorization: Bearer {access_token}
Endpoint
GET api/user/{id_user}/messageResponse
{
message: [
{
content: string,
uuid: string,
creation_dt: string,
modification_dt: string,
deactivated_dt: string,
recipient_user_id: int,
recipient_state_dt: string,
user:{
user_id: int,
avatar_url: string,
email: string
}
}
...
]
}Create request to add new user
Required headers
Authorization: Bearer {access_token}
Endpoint
POST /api/userRequest body
{
name: string,
cellphone: string,
email: string
}Response HTTP 200
{
message: {
name: string,
uuid: string,
creation_dt: string,
modification_dt: string,
deactivated_dt: string,
cellphone: string,
email: string
}
}Required headers
Authorization: Bearer {access_token}
Endpoint
POST /api/user/{recipient_user_id}/messageWhere recipient_user_id is required for execution the request.
Here recipient_user_id is the user to whom we have to send a messages.
Request body
{
content: string
}Response HTTP 200
{
message: {
content: string,
user_id: int,
creation_dt: string,
modification_dt: string,
deactivated_dt: string
}
}Required headers
Authorization: Bearer {access_token}
Endpoint
DELETE /api/message/{message_id}Where message_id is the identifier a message to be deleted, also is required for execution of the request.
**Response HTTP 204 **
{}Required headers
Authorization: Bearer {access_token}
Endpoint
DELETE /api/user/{user_id}Where user_id is the identifier of an User to be deleted, also is required for execution of the request.
**Response HTTP 204 **
{}