API Docs

API Docs

Testing with Postman

Our API docs are manged with Postman. Postman can be a great way to get familiar with an API and to make API calls outside the regular context of your application. Below is a tutorial on getting started testing the Asset Layer API using Postman.

Open the Docs and Run in Postman

To get started with Postman, first open the API docs in a new tab using the link above. On that webpage, you'll see a button in the top right-hand corner, "Run on Postman". You'll have two choices, Postman for Web, and a desktop application (assuming you are accessing via desktop). Both choices will work, but this guide will be geared towards Postman for Web.

If you don't have a Postman account, you'll need to register with your email. Using Postman to test the Asset Layer API is free, and signing up is fast!

Import to My Workspace

Once you are logged in, you'll be prompted to select a workspace to import the collection. Either choose the default, "My Workspace", or if you prefer to import to an existing or dedicated workspace, then you can do so as well.

Once you've imported the collection. You'll see the API docs as well as a file explorer with all of the endpoints.

Add Your App Secret and DID Token

In order to start making calls, you'll first need to add your App Secret and DID Token to your environment variables. On the left hand side of the page, you'll see a button "Environments". Click on Environments and then Globals. That will take you to a page with a section like this.

You'll create two variables - {{v2appsecret}} and {{v2didtoken}}. You can optionally set them to secret. Then, enter your app's app secret and a valid did token for testing. You can get both from the App Info section of your application dashboard. When you've entered your values, your globals section should look like this. Remember to press save!

Please Note: DID tokens will expire. You can always get a new DID token from your app info page and paste the new value into your globals. Remember to save!

Making API Calls

Now that you've added the Asset Layer collection to your Postman workspace and added your app secret and DID token to your environment globals, you are ready to start making API calls.

The Postman collection is populated with all of the endpoints including the needed parameters for GET requests as well as example bodies for POST requests. To make a call, simply fill in the parameters or add your values into the request body and then press send. The response will be appear below.

Last updated