Hello community, im trying to do some automations and at some point I need to use the CircleCI API to see all the variables on my context and then add as needed. Looking at the documentation I see it talks about environment variables on a specific project but does not mention anything about context variables… can anyone share some light, a pointer or an example I can use to remove this blocker?
You’re right that there’s currently no way to use variables from Contexts via the API, but you’re not alone in wanting this functionality. We’ve got at least a couple posts on our Ideas board about this very feature, and I’d encourage you to add your vote(s), since we draw from the Ideas page when prioritizing future work.
There might be something you can try here in Discuss, in the meantime (here’s one such post).
At the moment, the context endpoint allows you list all variables but it doesn’t allow you to see the last four character of the variable values. Is there any plan for this being added in the near future ?
Is there a way to get last 4 characters of context variable values from api ?
We can get it for project environment variables but need same for context as well.
It would be risky to update the variable without checking its current value.