Common Response for HTTP Calls

Description

HI. What is the response pattern of successful or failed HTTP calls?

Server Setup Information

  • Version of Rocket.Chat Server: 3.10.7
  • NodeJS Version: 14

hi! Welcome to our forums.

It should be both the status code and then the success key.

All endpoints should have this to indicate if things were fine.

Check it out:

{
    "agent": {
        "_id": "XycfA5CetCPuEjqxw",
        "emails": [
            {
                "address": "faria@rocket.chat",
                "verified": true
            }
        ],
        "status": "online",
        "name": "Faria",
        "username": "faria.masood",
        "livechat": {
            "maxNumberSimultaneousChat": "5"
        }
    },
    "success": true
}
1 Like

Also, please, consider upgrading to latest version.

Not only to have access to new features but also for security matters.

1 Like