API Quick Start Guide
Last updated: November 25th 2020
The Webdock API is available for free for all Webdock customers and is a powerful way of automating your servers and workflows.
The API is in its current form quite flexible and workable and over time it is our intention to expand our API to encompass all the functionality you have in your Webdock dashboard.
In this article we go through how you can get started with the Webdock API and make your first API request. If you want to test the API, we can recommend something like Postman for inspecting all aspects of your API requests.
Start with grabbing an API key
To get started, log in to your Webdock Account and go to your Account Area. Scroll down to the card titled API & Integrations. In the small context menu below the card, you can click to generate a new API key.
You can choose which permissions your key should have and give it a label. Once you have generated your key it will be shown only once so make sure you save it in a secure place in your application as soon as you have generated it.
Once you have your API key you can now start interacting with the Webdock API. For a quick test you can use something like Postman or if you have access to wget on your computer, you can execute a request similar to the following:
# wget --method GET --timeout=0 --header 'Authorization: Bearer c3770736449ad85de9df27b1432845792345b47dfe8e77c7fdfae0525308b1c7' 'https://api.webdock.io/v1/ping'
This simply calls the Webdock API ping endpoint with an API key set in the Authorization: Bearer header.
For more information on authentication, please see the relevant section in our API documentation.
You can use one of our SDK Libraries to get started
For anything more complex than simple requests, it can be beneficial to take advantage of our official SDK libraries. Essentially what these libraries do is wrap common functionality and the nitty gritty of making HTTP requests in a nice interface for your programming language of choice.
Make good use of the API Event Log
As you may have noticed when you generated your API key in the small context menu there is an option to access the API Event Log as well. The API Event Log is also linked to from the main Event Log in your account.
This Event Log can be used to get an overview of all API requests made in your account as well as details showing what Webdock received in your request, the status code as well as what the exact response was.
We want your feedback!
We need your help with prioritizing what features and changes you want in the API. If you have any feature ideas or changes you'd like to see made, please send your request to Webdock Support and this will help inform us of how we want to handle future updates.