Managing your projects via the API
GitLab has a very powerful API. You can manage almost your entire GitLab instance with the API. In this chapter, we are going to take a look at how you can create projects and manage them via the API.
Getting ready
As we won't be writing any real code but just testing the API endpoints, you need a program to test these endpoints. I'll be using Postman for Google Chrome. You can download it from http://goo.gl/SmDU3j.
When using the API in production, you don't need to use Postman. I'm only using this to easily test the API. In production, you would use your own application to consume the API.
How to do it…
Let's start by retrieving all the projects we currently have in our GitLab server.
Open the Postman app and enter your GitLab URL followed by
/api/v3/projects?secret_token=YOUR_TOKEN
.When you click on Send, the API will be triggered, and you see the response that GitLab is giving you. In this case, you will see a JSON string with all your project data.
Next...