How to filter by title containing apostrophes using the Jira Align REST API 2 GET

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Trying to use the Jira Align REST API 2 to get a capability (or other work item) containing an apostrophe in the title, it fails with a syntax error such as:

Cannot find capabilities. Syntax error at position X in 'title eq 'title_with_apostrophe''

Environment

Jira Align

Solution

In order to successfully use the filter function from a GET call (and avoid the syntax error), you should place a single quote in front of the apostrophe to escape it (in other words, having two single quotes consecutively).

As a result, if you have a title such as: 'It’s a test', you need to use the filter criteria: 'It''s a test'

Here is an example:

https://<site-host>/rest/align/api/2/capabilities?$filter=title%20eq%20%27it%27%27s%20a%20test%27

or

https://<site-host>/rest/align/api/2/capabilities?$filter=title eq 'It''s a test'

Updated on April 14, 2025

Still need help?

The Atlassian Community is here for you.