Unable to get response from Codecov API call

Description

I’m trying to retrieve repository upload token through the Codecov API. I’m not sure if I’m calling the Codecov API correctly, but I get an empty response from the following curl command:

curl --max-time 5 --retry 10 -X GET https://codecov.io/api/pub/gh/<org-name>/<repo-name>/settings -H 'Authorization: token <my-token>'

Repository

CI/CD

N/A as this is not in a CI/CD environment

Uploader

N/A because I’m not using an uploader

Commit SHAs

N/A because the repository has been created but not initialized

Codecov YAML

N/A

Codecov Output

curl command returns an empty reponse

Additional Information

If I understand the docs correctly, the curl command should return the settings of the given repo in a json dictionary. This is weird because the same command worked a few months ago – I was able to grab the upload token from the returned dictionary by indexing into “repo” → “upload_token”. Is there a recent change in API specifications, or is this some other issue?

Nvm I figured out the working URL should be

curl --max-time 5 --retry 10 -X GET https://codecov.io/api/gh/<org-name>/<repo-name> -H 'Authorization: token <my-token>'
1 Like