Response builder

Response Builder is a key component for unifying the format of responses from the sAPI. It generates a template that is then filled by the data returned from a “task”. An example response looks like the following:

{   "code": 200,   "data": {    "data": ["test"]  } }

First comes the internal response code which will in most cases match the response’s HTTP return code unless an internal issue occurs. Following it comes the data field, this contains any data returned from a “task” component, this can be either a list of all cogs if using /list_asgard or a reply from a cog when using /asgard.