Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Gitlab Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Gitlab Cookbook

Gitlab Cookbook

By : van Baarsen
3.3 (3)
close
close
Gitlab Cookbook

Gitlab Cookbook

3.3 (3)
By: van Baarsen

Overview of this book

This book is aimed at developers and devops that have a GitLab server running, and want to be sure they use it to its full potential. This book will also be useful for people looking for a great Git platform, and learn how to set it up successfully. Some system administrating experience on a UNIX-based system would be useful, but is not required.
Table of Contents (11 chapters)
close
close
10
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...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Gitlab Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon