Testing with Postman
The Control API is designed for programmatic access to your account. However, you can test individual requests using either a command line tool such as Curl or HTTPie, or a graphical tool such as Postman or Paw. This topic shows you how to make requests using Postman.
Control API is currently in Beta.
Importing the OAS3 document into Postman
A convenient way to try out the REST APIs is by importing the OAS3 document into Postman. To do this, perform the following steps:
1. Make sure you have Postman installed.
2. Start Postman and select File > Import from the main menu. The import dialog displays:
3. Drag and drop the OAS3 document you want to test, or use the “Upload file” button to select and import an OAS3 document. Alternatively, if you haven’t already downloaded the document, you can provide a link to it in the Ably OpenAPI documents GitHub repository.
4. In the Import dialog use the default settings and click “Import”.
5. The imported document will now appear in your Postman collections:
You are now ready to test out the API.
Sending a request
You have now imported the OAS3 document into Postman. You now need to configure a token to authenticate any requests you make to the Control API.
For many Control API requests you will also need to specify your Account ID or Application ID. You can see the documentation for details on how to obtain these.
Now that you understand where to obtain these items, you will learn how to create and execute a request in Postman.
1. The following screenshot shows the required parameters for the “List account apps” request:
This is an account-level operation and therefore requires your Account ID in the `account_id` request parameter.
2. You also need to configure your token as a `Bearer Token` in the Authorization tab:
If you don’t supply this token your request will fail to authenticate.
3. Now that everything is configured, you can send the request:
4. The server returns a response: