INFORMATION
- Link to our environment - Qovery
ISSUE
I have a problem with the REST API, today all my requests ended with a 401. I tried to generate a new token but nothing changed.
I’ve been using the API from gitlab-ci for months to deploy new versions of our applications, it always worked perfectly. The request is :
curl -f -X POST \
-H "content-type: application/json" \
-H "Authorization: Token $QOVERY_API_TOKEN" \
-d "{\"image_tag\":\"$CI_COMMIT_TAG\"}" \
"https://api.qovery.com/container/$QOVERY_SERVICE_ID/deploy"
I tried the same command in terminal, replacing env. variables, but same problem.
Then I tried a different request, /organization/{organizationId}/project
, same problem.
A few days ago I was curious about the playground so I tried it. I’m wondering if it could have caused a problem with our organization account.
HOW TO REPRODUCE
Any request to the REST API with a token from our organization ends with a 401 error.
Hello @Mathieu_Haage ,
Could you send me in private the token you are using?
Thank you
Hello @Mathieu_Haage ,
I’ve tried to get https://api.qovery.com/organization/{organizationId}/project with the token you sent me. And it is working.
Does the service you try to deploy is still existing?
Thank you
Thank you Pierre for your help.
I’m sorry it was my fault, I made a mistake in the endpoint, I added an s
to project
and the response for that was a 401 :
/organization/{organizationId}/projects
And I was wrong in my first post, we receive a 404 for the POST request in the CI, not a 401, but today the request works well in the terminal.
I checked the service ID, it’s the good one.
I think I lost my way yesterday… 
So I’ll go check our gitlab-ci.yml again. Strangely, this config used to work and we didn’t change it.
I’ll close this ticket.
Thanks again.
Thank you Mathieu for your feedback.
Happy to help.
I’m truly sorry, as I said earlier the project gitlab-ci.yml didn’t change, but one included template changed and caused the error. 