Set up our Postman collection
This guide will help you create a workspace for experimenting with MARCO APIs using Postman.
Prerequisites
To complete this guide, you will need to have created API Tokens to authenticate your calls. If you don't have them, see Get your API tokens.
1. Fork the MARCO Core API collection
We recommend Postman to make requests to our API from a graphical user interface.
If you have a Postman account, you can fork MARCO Core API by clicking the button below:
Alternatively, you can interact with MARCO Core API using one of our SDKs.
2. Set up your environment
Once you have forked the API, configure Postman to authenticate the requests:
On Postman, open the Environment tab and choose MARCO Environment.
Complete the following variables with the values you have obtained in Get your API tokens:
Save your changes with Ctrl + S.
Set MARCO Environment as the default environment.
Select the MARCO APIs collection, and make sure the Authorization Type is set to
Bearer
and Token to{{accessToken}}
.
3. Make your first API call
To test your setup, follow these steps to create your first request using an endpoint from the collection:
On Postman, open the endpoint MARCO APIs > MARCO Core > ledgernodes > ledgers > Get a list of all the active ledgers.
On the Params tab, configure the parameters as shown in the image below:
Most endpoints require passing an application token as a header parameter. Before making an API call, set
ApplicationToken
to{{applicationToken}}
on the Headers tab.Click the Send button to send the request. You will see the response under the Body tab.
In case of any errors, see the API Reference for troubleshooting tips.
4. Generate code snippets
Postman also lets you generate code snippets for your preferred programming language. To do so, click on the code icon in the right panel:
Next steps
You are all set! Now that you have your API keys and collection set up, let's make some API calls to learn how to retrieve data from an Ethereum-based ledger.