# Define SonarQube tag in the pipeline or using API

**URL:** <https://community.sonarsource.com/t/define-sonarqube-tag-in-the-pipeline-or-using-api/83549>\
**Category:** SonarQube Server / Community Build\
**Created:** [February 9, 2023, 9:29pm UTC](https://community.sonarsource.com/t/define-sonarqube-tag-in-the-pipeline-or-using-api/83549 "2023-02-09T21:29:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peapodsec](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@Peapodsec](https://community.sonarsource.com/u/Peapodsec)\
**Post date:** [February 9, 2023, 9:29pm UTC](https://community.sonarsource.com/t/define-sonarqube-tag-in-the-pipeline-or-using-api/83549/1 "2023-02-09T21:29:27Z")

</div>

Hi,

We’re using SonarQube – EE 9.4

Is there a way to define SQ tag variables in the pipeline? We are using BitBucket, Jenkins as well as GitHub actions. We have multiple teams in our org and we’re trying to differentiate projects using tags in SQ. Please let me know if you have any questions.

Thank you

---

<div class="post-metadata">

**Author:** ![anon67236913](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@anon67236913](https://community.sonarsource.com/u/anon67236913)\
**Post date:** [February 10, 2023, 6:21am UTC](https://community.sonarsource.com/t/define-sonarqube-tag-in-the-pipeline-or-using-api/83549/2 "2023-02-10T06:21:37Z")

</div>

Hi,

it seems it’s not possible to set a project tag via analysis property.  
As your pipelines will use a technical user with Sonarqube admin permissions you may use  
the web api `POST api/project_tags/set` to set project tags.

see `http(s)://yoursonarhost/web_api/api/project_tags`

Gilbert
