Consume API

This guide provides on how to consume API that was created before creating APIs section

Fireapis provides a

cURL client code snippet
for every APIs created, you can use that to test your APIs

To begin testing APIs, navigate into specific API resources that were created in a specific environment and go to the

Endpoint tab
. You can refer to the guide on creating APIs .

Consuming API introduction

There you can see a code snippet for the cURL client. There are two code snippet:

  1. 1. Without authorization
  2. 2. With authorization
API code snippet

Consume without authorization

Usage for POST request

Guide for creating a new record

Go to

POST Single
,Click the
icon in
code snippet without athorization

POST API details

Edit the input data in the cURL command

POST API Curl command

Open your terminal, past the edited cURL command

POST cURL code snippet

Now you have created a new record

Usage for GET single record request

Guide for getting single record using their id

Go to

GET Single
tab,Click the
icon in
code snippet without athorization
.

GET API snippet

Replace the URL from

{{id}}
to real Id in cURL command

GET API code edited

Open your terminal, past the edited cURL command

GET cURL command

Now you can get the record using their Id

Usage for GET all records request
Pagination
Get all API requests will have pagination by default.

Guide for getting all the record of that API resources

Go to

GET All
tab,Click the
icon in
code snippet without athorization
.

GET All code snippet

Open your terminal, past the edited cURL command

cURL command for GET All

Now you can see all the records of that API resources with paginated

Previous - Create APIs
Next - Monitor APIs