11

I created a trigger (using settings/ci_cd page). The instructions below the trigger tell me to call it using version 3 API (of course, I set the token variable to the token stated under the trigger section):

curl -X POST \
     -F token=${TOKEN} \
     -F ref=master \
     https://gitlab.com/api/v3/projects/2313008/trigger/builds

Which only returns:

{"error":"404 Not Found"}

I also tried to follow the API v4 documentation:

curl --request POST \
     --form token=${TOKEN} \
     --form ref=master \
     https://gitlab.com/api/v4/projects/2313008/trigger/pipeline

which returns the same error.

Are there any additional settings required?

nik
  • 2,114
  • 3
  • 22
  • 43

2 Answers2

14

I had the same issue, but I was using Personal Access Token instead of Pipeline trigger token!!

You can generate this token inside your project repo CI/CD settings. Pipeline triggers

Mohsen Mirhoseini
  • 8,454
  • 5
  • 34
  • 59
0

I retried the same request today, now it works. Probably there has been some problem with the gitlab.com.

nik
  • 2,114
  • 3
  • 22
  • 43