- Output in Json or Xml format
- Output pagination and filtering
- ApiKey Authentication method for clients
- Swagger documentation
All the APIs output the following Json structures depending on whether the response is paged or not:
{
"success": true,
"message": "",
"errors": [],
"data": {
}
}
{
"pageNumber": 1,
"pageSize": 5,
"recordsTotal": 0,
"success": true,
"message": "",
"errors": [],
"data": []
}
I always try to use the best HTTP Status Code for every type of response. In this particular project the following are the possible response code:
- OK 200
- Unauthorized 401
- Forbidden 403
- BadRequest 400
- NotFound 404
- InternalServerError 500