0

I want to get pipelines of a project using this GET request:

https://my-company.com/api/v4/projects/2080/pipelines

The response is:

{
    "message": "404 Project Not Found"
}

Although the project exists and I definitely use the correct project id. We use GitLab Enterprise Edition 11.9.0-ee. Any hints?

EDIT: Project id is taken from this place: enter image description here

IKo
  • 4,998
  • 8
  • 34
  • 54
  • could you test to get single project detail using `GET https://my-company.com/api/v4/projects/2080` ? – Nicolas Pepinster Mar 20 '20 at 09:37
  • @NicolasPepinster I get same response (not found) – IKo Mar 20 '20 at 09:47
  • And searching with Search API `curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/search?scope=projects&search=PROJECTNAME` ? – Nicolas Pepinster Mar 20 '20 at 10:48
  • @NicolasPepinster response code 200, but the response body is empty array – IKo Mar 20 '20 at 10:54
  • could you add to your question a print screen of your project Name with Project ID below (check in `Project Overview` > `Details` ) ? – Nicolas Pepinster Mar 20 '20 at 10:56
  • Try checking the url in your browser, first login to company gitlab and go to project page, then paste in other tab the request `https://my-company.com/api/v4/projects/2080/pipelines`. If it displays correctly then it must be missing token/credentials in your request. – makozaki Mar 20 '20 at 11:27
  • @makozaki but shouldn't I get '401 unauthorized' in this case? – IKo Mar 20 '20 at 12:28
  • I get `404 Project Not Found` when I'm not logged in, and full data when I'm logged in. The same for curl request. – makozaki Mar 20 '20 at 12:38
  • Did you select `api` scope when you created your access token ? Are you member of the project ? Which are you rights ? – Nicolas Pepinster Mar 20 '20 at 13:02
  • @NicolasPepinster actually I'm the owner. – IKo Mar 20 '20 at 17:01
  • @makozaki you were right. I was using a technical user's token. and this user wasn't part of the project. I added him to the project group and it worked. Thanks everyone. – IKo Mar 20 '20 at 17:29

0 Answers0