REST API with APIkit
home
Learn how to implement a REST API with RAML using APIkit.
Screenshot of the main flow in Anypoint Studio, view full image here
Description
This application illustrates an API implementation using Anypointâ„¢ Studio's tooling for building REST APIs with RAML interfaces: APIkit. The application takes a RAML file and maps it to an implementation of an API in Mule. This example implementation mocks a Spring backend, but you can replace these placeholders with a full implementation of your choice.
APIkit
APIkit is an open-source, declarative toolkit specially created to facilitate REST API implementation with RAML definitions. As a simple framework that caters to API-first development, it enforces good API implementation practices.
Example Use Case
This API allows you to add, remove, and retrieve information about sports teams participating in a league tournament.
Set Up and Run the Example
Follow the procedure below to run and test the functionality of this example application in Anypoint Studio.
- Create, then run the example application in Anypoint Studio.
- Anypoint Studio starts the application and automatically opens an API console below the canvas.
- Click GET for the /teams resource.The console opens a details panel for the GET method for this resource that allows you to view details about the request format and expected responses, as well as a Try It option.
- Click Try It. Enter Madrid in the city field, then click GET.
- Scroll down to view the response. The API returned a list of teams associated with the city Madrid.
- Click through the other resources and methods to test out other API calls.