title: How to access the GitLab API?
body: <p>After reading the documentation on GitLab's API I could only find the following example URL:</p>
  
  <pre><code>https://gitlab.example.com/api/v4/
  </code></pre>
  
  <p>But I'm wondering what the root URL of the API of my projects on GitLab is?
  I've tried <code>https://gitlab.com/api/v4/</code> with the <code>Private-Token</code> header set to a Personal Access Token I've created for myself, but it always returns <code>401: Unauthorized</code>.</p>
  
  <p>What is the correct URL and method to connect to GitLab's API?</p>