Postman is an API platform that makes it easier to explore, test and consume APIs. In this guide we will see how to use Postman as the API client to work with Metadata Service REST API.
To use Metadata REST API with Postman, the first thing you would need is to import the API definition. You can
first download it from Swagger UI by
clicking on the metadata/v1/api.yml
link that appears just below the header.
Once you have downloaded the definition, follow these steps to import it into Postman.
This section assumes that you already have a user account with access to Application Collection.
If you configure authentication per-collection and let the individual requests inherit the configuration, you will avoid having to manually configure it for each request.
You can configure your Metadata Service collection to use tokens and send them through Basic
authentication. This
section assumes you already have a valid access token. If this is not the case, you can check how to get one
here.
Once you have a valid access token, follow these steps:
Make sure you save ctrl+s
to store the configuration. Postman will include in your requests an
Authorization header with a Base64 encoded string representing your username and password values, appended to the
text Basic
.
Once you have imported the Metadata REST API definition as a collection, you will find all the requests you can do with it, organized in folders.
Sending a request is as easy as clicking on the Send button that you will find on the top right corner of the request. If your request needs to input any param or request body, you can do it in the corresponding tabs.
Postman will display the response data sent from the server in the lower pane.