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

Understanding the API status codes


When you start working with the GitLab API, it's good to be aware of the different status codes that can be returned. In this recipe, I'll explain what each status code means and, if possible, how to solve it. The status codes GitLab uses are equivalent to the HTTP standard status codes.

How it works…

GitLab has the following API status codes:

  • 200 – OK: This means that the GET, PUT, or DELETE request was successful. When you request a resource, it will be returned in JSON format.

  • 201 – Created: This means that the POST request was successful. This status code is only returned when you try to create a new resource. The resource will also be returned to you.

  • 400 – Bad Request: This means you have missed a required attribute for this request. For example, the title for a merge request was not given.

  • 401 – Unauthorized: This means that you are not authenticated. If you don't send a secret token with your request or send an invalid token, this status is returned...

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 AU $24.99/month. Cancel anytime