How to fetch Jira projects that have a certain project property set?

Does anyone know a Jira Cloud API endpoint that allows me to fetch a list of Jira projects that have a certain project property set?

It seems that there is no way to do this directly and the only way I found so far is to use the deprecated Get all projects endpoint with the properties parameter. Then filter the results server-side.

Some insights from my investigation:

  • The newer Get projects paginated endpoint to search projects does not support the properties parameter. Strangely though the response JSON does contain the properties property - it seems to be always empty though.
  • Jira expressions do not seem to help in this case. They only allow querying in the context of a single project.

I hope I missed something. If not, changing our implementation to the deprecated endpoint seems to be the only option for now.

@Atlassian any chance to get the properties parameter supported for the Get projects paginated endpoint?

2 Likes

@kkercz sorry if you are not the right person to ask (Would you mind forwarding this to the person in charge if it’s not you?). Any chance that Atlassian can add support for the properties parameter for the paginated projects endpoint? I couldn’t find any open issue for this.

This definitely sounds like something we would like to add, both returning properties in the response and requesting only projects that have a given property. Could you create a dedicated ACJIRA issue so that we can track it properly?

1 Like

Thanks for your reply @kkercz. I never realized we can create feature requests in ACJIRA. Somehow assumed all projects are locked. Anyways, I created [ACJIRA-2087] - Ecosystem Jira

1 Like

@kkercz who should we talk to to get an idea of when this feature could land in the API? Our app development is blocked by this the alternative with using deprecated endpoints just does not sound future proof.

Thanks,
Tobias

Hey @mszerszynski just saw that you recently created ACJIRA-2227. I do not have permission to view that new issue so I am wondering if it is related to ACJIRA-2087 or if ACJIRA-2087 is being worked on?

@kkercz is there any way to process such a query with multiple propoerties?

As documented, the properties query param:

accepts a comma-separated list.

sorry for the conusion, It’s not about the properties but instead propertyQuery
for ex: Assuming i have 2 properties set on many projects
prop1 = {nested: {value: yes}} and prop2 = {isTest: yes}

I know to display these props on result I need to set properties=prop1,prop2
but the goal is to make a query that fetch only projects having these properties above

doing them separatedly with propertyQuery=[prop1].nested.value=yes OR propertyQuery=[prop2].isTest=yes, now I’d like to combine both

Ah, gotcha. No, unfortunately we support only searching by one property at a time.

One workaround I can think of is for your app to maintain a special project property that will combine your complex search criteria into one value and search by that.

thank you for that idea, need to figure it out.

I was wondering if there isn’t a plan to implement this support for multiple property query from your end

Not that I know of. Feel free to create a feature request in the ACJIRA project.