Making the most of the new API Console
The updated Developer Network sports a host of features, including a brand-new API Console. This new console is powered by Swagger tools and is made possible by our new support for the OpenAPI standard.
A general overview of how to use the API Console is available in the Getting Started Guide. In this blog post we’ll review a few features to show you how to get the most out of the new console.
You can get to the console via one of these links:
From the top menu bar:
From the API listing:
Or from a particular API’s documentation:
Once you arrive at the console, at the top you will see options for the API server and API Key. If you are logged in to the Developer Network, your recommended API server will be automatically selected and you will see a list of your available API keys which have permissions for the specified API area. If you are not logged in, or if you’re using a guest account, you will see an option for a guest API key. The list of APIs will be filtered to the GET APIs only, as guest accounts are limited to readonly access.
Next you can select a particular API that you’re interested in running. You’ll see a list of the available parameters along with their default values. To run the API, click the “Try it out” button. Enter the required parameters, if any, and select the desired response type (either XML or JSON). When you’re ready, click the “Execute” button.
Once the API has been run, you will see the output in the Responses section. You can view the CURL syntax for the API as it was just executed including any data, parameters, and the API key. You can copy and paste the command into a terminal and run it as-is.
In the server response section, you’ll see the response body in the requested format. You can use the buttons to copy the response to the clipboard or download it to a file.
From here you can tweak your parameters and click “Execute” again until the API performs as you’d expect. When you’re ready, you can copy the command into your application. This learn-by-playing approach is a great way to explore the Ex Libris APIs.
We’ll be releasing additional support for the OpenAPI standard in the coming months which will enable additional development process improvements. So keep an eye out for additional blog posts.