Managing issues via the API
One of the most used features in the GitLab API is the creation and listing of issues for a given project. In this recipe, we will take a look at how you can incorporate this into your own workflow.
Getting ready
You need to have your own private_token
present, as every call needs this. We will be creating issues for a project, which means that you also need to have at least one project in your GitLab instance.
How to do it…
- Let's start by getting the
project_id
field for which we want to create the issue. You can do this by entering thehttp://example.com/api/v3/projects?private_token=your_token
endpoint in Postman. This will give you a JSON output of all your projects. Just pick one for which you want to create some issues ...
Get GitLab Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.