5. Create APIs

APIs are the most basic building blocks of any backend layer and allows external systems (frontend, clients, etc) to interact with your system to fetch, insert or modify data.

You can start by creating your first APIs by -

  1. Visit the APIs page via Application Layer -> APIs from the Cosmocloud project's dashboard.

  2. Click on Create API button. It will ask you which way to create the APIs.

    • Using Templates: API templates are a fast way to create the skeletons of your APIs and then later you can customise and tweak the logic.

    • Building from Scratch: This method allows you to create your APIs from scratch, allowing you to customise your endpoint, request method, and then starting to design the same from scratch.

  3. For starting, you can select Using Templates to start building your first APIs.

  4. Let's start using the CRUD APIs template for now.

    1. Select the template - CRUD APIs and click Next.

    2. On the second step, chose the Database Collection model you had created in Step 4 and click Next.

    3. On the final step, Cosmocloud will suggest you which all APIs and corresponding models would be created for you.

    4. You can either select all, or select only the ones you would require -- Don't forget to select / unselect the corresponding request body models as well.

  5. Click on Create to create all these APIs into the system and Voila! All of them are ready to use.

You can now try hitting these APIs with Postman or similar tools (like curl). Checkout the next step on how to hit and test the APIs.

To customise and tweak the logic of these APIs, checkout creating API flows.

Last updated