Gitlab trigger API returns 404

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

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

Which returns only:

{"error": "404 Not Found"}

I also tried to execute the v4 API :

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

which returns the same error.

Are additional settings required?

+4
source share
2 answers

I repeated the same request today, now it works. There was probably a problem with gitlab.com.

0
source

, Personal Access Token Pipeline trigger token!!

CI/CD . Pipeline triggers

0

Source: https://habr.com/ru/post/1672087/


All Articles