Circle Artifacts API Generating Errors When I Try To getData From A URL



Hi all.
My Circle CI endpoint to return artifacts in a JSON works fine.
It contains a first entry.
That entry has a URL to a code-coverage JSON file.
And it’s that data that i need returned via my axios, ajax or fetch API. I’ve tried all three. On Postman, via webserver or in the browser console… they all come back with “Not Logged In” sort of errors.

So this is an issue with tokens, access etc I guess?

[ Another person experiencing the same issue - Circle-token param ignored when using API URL to fetch latest artifact ]

Has anyone managed to resolve this yet?

Can anyone advise how I can get that data (not just the artifacts, but the JSON from the URL of the first element of the artifacts) returned if Circle CI’s endpoint only works in the browser? And if the URL for that one-level-deeper sort of information doesn’t accept tokens?

Ummmm. Help?


I’m pretty sure you need to specify a Cookie in your Request Header and include the “token” in that Cookie as a value. I am not 100% sure what the name of that cookie is but if you look in your browser’s dev console you can poke around and watch the request for the artifacts and look for the cookie that way. Then copy/paste it into Postman and try again.