Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gitlab Cookbook

You're reading from   Gitlab Cookbook Over 60 hands-on recipes to efficiently self-host your own Git repository using GitLab

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783986842
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jeroen van Baarsen Jeroen van Baarsen
Author Profile Icon Jeroen van Baarsen
Jeroen van Baarsen
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction and Installation 2. Explaining Git FREE CHAPTER 3. Managing Users, Groups, and Permissions 4. Issue Tracker and Wiki 5. Maintaining Your GitLab Instance 6. Webhooks, External Services, and the API 7. Using LDAP and OmniAuth Providers 8. GitLab CI A. Tips and Tricks Index

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…

  1. Let's start by retrieving all the projects we currently have in our GitLab server.

  2. Open the Postman app and enter your GitLab URL followed by /api/v3/projects?secret_token=YOUR_TOKEN.

  3. 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.

  4. Next...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime