Project Variables and Library Variable Set variables used for a specific Project

(Sujesh Sasidharan) #1

Hi Team,
I am working on a feature where we need to get the list of variables used in project level and Library Variable set level for a specific project. Could you please suggest some method which is already available ? Our idea is to identify the variables which is not being used in any of the projects and remove it.

Sujesh Sasidharan

(Dalmiro Grañas) #2

Hi Sujesh,

Thanks for reaching out. You could use our API to inspect the Deployment Process of your project and look for variables that are being used in each step. The url to get a deployment process looks something like this: /api/deploymentprocesses/deploymentprocess-[Project Id]. Then you’d need to use the API to get the variables for that project + the library variable set and match them against the steps of your process.

But keep in mind that variables could also be used inside scripts/files that are stored inside of a package, and there’s no way to programatically look for these (at least not a straight-forward way).