title: Getting 404 while hitting inhouse gitlab repo through rest api for getting all the branches of a project
body: <p>We have an inhouse gitlab hosted repo in our organization and I am developer who does not have admin access to it. </p>
  
  <p>However, I am the creator of this repository (<code>https://gitlab.gspt.net/payments/dss</code>) in <code>gitlab</code> and what I am trying to do is get all the branches within this repo through the rest api.</p>
  
  <p>After doing some research online and going through this documentation (<code>https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch</code>) I found that I can get all the branches of a repo using this command.</p>
  
  <pre><code>GET /projects/:id/repository/branches
  </code></pre>
  
  <p><strong>Example</strong></p>
  
  <pre><code>curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches
  </code></pre>
  
  <p>Here the PRIVATE-TOKEN in the header needs to be replaced with my private token, which I have already done, and now I am trying to access my inhouse gitlab repo using following command in Postman and I am getting <code>404</code>.</p>
  
  <pre><code>https://gitlab.gspt.net/api/v4/projects/payments/dss/repository/branches
  </code></pre>
  
  <p>Two problems here:</p>
  
  <ol>
  <li>Not sure if my rest url is correct or not. I could not find the <code>id</code> of my project. I scanned through entire <code>gitlab</code> UI and could not find a trace of <code>id</code> anywhere. Hence using <code>NAMESPACE/PROJECT_NAME</code> in the http url which I happen to find somewhere in the documentation. Not sure if that is also correct though.</li>
  <li>Not sure if my inhouse gilab admins have disable http rest api feature altogether. Never installed and administered a git repo ever, so no idea here as well.</li>
  </ol>
  
  <p>Any guidance on this?</p>