Tag: rest api

  • Advanced Filtering in REST API

    Advanced Filtering in REST API

    In this article we will look at how to implement advanced filtering in REST API when a GET request a list of results. In our API project that will be GET /v1/travels and GET /v1/tours endpoints. Although setup for filtering is similar to sorting, the implementation is a bit more complex. First we are going…

  • Sorting REST API Results

    Sorting REST API Results

    In this article we will look at how to sort results when using a GET request that returns a list. Implementing sorting functionality in a RESTful API is a crucial aspect of designing a robust and user-friendly web service. Sorting REST API results empowers developers and end-users alike by providing a systematic and organized way…

  • REST API Delete Resource

    REST API Delete Resource

    In this article we will look at REST API Delete operation. Compared to Create and Update, Delete operation is fairly easy and straightforward. REST API Delete Implementation Below, we will outline the basic steps of Delete operation implementation. Please, watch our video for more in depth explanation of this concept. Route and Controller In routes/v1/travels…

  • REST API Update Resource

    REST API Update Resource

    In the previous article REST API Request Validation we looked at how to create a resource using POST request and Joi validation. In this article we will look at how to use REST API Update operation to modify a resource. We will also be using Joi validation to ensure security and consistency. Compared to creation,…

  • REST API Request Validation

    In this article we will look at how to validate POST requests to the REST API using Joi library. Joi lets you describe your data using a simple, intuitive, and readable language. We will also look at how to turn Joi errors into 422 Validation Error API responses. Describe REST API Request Shema with Joi…