Here’s a basic introduction about using the Backlog API and sending requests to it.
- Get your Backlog API key
- Compose the Backlog API path
- Use CURL with your API key to send to the API endpoint
In order to use the Backlog API, you need to generate an API key in your Backlog space personal settings. See How to generate Backlog API key & its function
The key is for authentication when making requests to the Backlog API, and it allows you to access information related to your Backlog space.
For authentication, there’s also OAuth 2.0 and Access Token, but we will be using only API key in this post.
The URL endpoint is made up of two parts:
Backlog space domain + URL path for API request
Note that the URL path will change depending on your API request.
For example, if we want to get information about your Space, we can use the Get Space API path:
So, the resulting URL is space domain + URL path, for example:
When we send the CURL request, we need to append our API key to the URL with ?apiKey= so that the system can authorize us successfully.
The resulting code for the Get Space curl command is:
Substitute the space domain and YourAPIKey with your own details and give it a try. You should get a response with your space information.
Congratulations! You have successfully made a request to the Backlog API.
By default, our curl command is a GET request, which means it gets information from the system.
If we want to add information, for e.g. add a new issue, we will need to send a curl POST request (to post information).
Want to learn more about using the Backlog API? Check out How to add issues using Backlog API