Force mirror update through API?

Hi,

I have a git repository mirrored to gitlab and saw that the mirror gets updated once per hour and by clicking the update now buttons on the webfrontend https://docs.gitlab.com/ee/workflow/repository_mirroring.html#forcing-an-update

however, the project also has a CI which i want to trigger with curl through the api. it only makes sense to trigger the CI after an update, so at the moment i am either waiting an hour before triggering the CI with curl, or use a browser, click the update, go back to the command line, trigger the CI through the API.

Is it possible to do both through the API? i.e. can i do something like
curl -X POST -F token=XYZABCDEFG1234 https://gitlab.ourserver.domain/api/v3/projects/123456/trigger/update-mirror
?

2 Likes

+1, this would be really helpful