Adapt to the atlassian.net API change effective 2025-05-01
What changed in the API
Notice jira-cloud-change-2046-search-jql about atlassian.net's API describes this change, published 2024-10-31 and effective 2025-05-01. It is not signed by atlassian.net: it was read from a file the person running Tiltmeter trusts.
The notice's summary:
Jira Cloud removed GET and POST /rest/api/3/search, which now answer 410 Gone, in favor of
/rest/api/3/search/jql. The new endpoint pages with nextPageToken instead of startAt, returns no
total, and returns only issue ids unless the request names the fields it needs. Source:
https://developer.atlassian.com/changelog/#CHANGE-2046
GET https://your-domain.atlassian.net/rest/api/3/search
| Severity | Change | Path | Before | After |
|---|---|---|---|---|
| breaking | endpoint_removed | $ | — | (gone), moved to GET https://your-domain.atlassian.net/rest/api/3/search/jql |
| breaking | field_removed | $.startAt | — | (absent) |
| breaking | field_removed | $.total | — | (absent) |
| breaking | field_removed | $.maxResults | — | (absent) |
POST https://your-domain.atlassian.net/rest/api/3/search
| Severity | Change | Path | Before | After |
|---|---|---|---|---|
| breaking | endpoint_removed | $ | — | (gone), moved to POST https://your-domain.atlassian.net/rest/api/3/search/jql |
| breaking | field_removed | $.startAt | — | (absent) |
| breaking | field_removed | $.total | — | (absent) |
| breaking | field_removed | $.maxResults | — | (absent) |
The notice's notes:
GET /rest/api/3/search: Query parameters: jql, nextPageToken instead of startAt, maxResults, fields,
expand. fields defaults to id only: pass the fields the code reads, such as fields=*navigable.
$.startAt: Pages are fetched with nextPageToken: pass the nextPageToken of the previous page; isLast
is true on the last page.
$.total: To count matching issues, POST /rest/api/3/search/approximate-count with body {"jql":
"..."}; it returns {"count": n}.
POST /rest/api/3/search: Body: jql, nextPageToken instead of startAt, maxResults, fields (a list),
expand (a string). fields defaults to id only: send the fields the code reads, such as
["*navigable"].
What this pull request changes
Moved all Jira Cloud JQL searches from the removed /rest/api/3/search to /rest/api/3/search/jql. Pagination now uses nextPageToken/isLast instead of startAt/total, and requests ask for fields=*navigable because the new endpoint returns only ids by default. I updated the jira-cloud router test and its stub to match; I didn't run any tests.
suite-api/apps/api/jira_cloud_router.pysuite-core/connectors/bidirectional_sync.pysuite-core/connectors/sdlc_connectors.pysuite-core/core/connectors.pysuite-core/core/jira_cloud_engine.pysuite-core/core/jira_sync.pytests/test_jira_cloud_router.py
Left for a human
- The total count is gone. connectors.py now reports the number of issues fetched as
total(search_issues: this page only; bulk_search: all pages). A true count needs POST /rest/api/3/search/approximate-count, which I didn't add. - bidirectional_sync.py pulls only the first page (no pagination before or after), so results beyond maxResults=100 are still not fetched.
- The router's public SearchRequest now takes nextPageToken instead of startAt, so API clients that send startAt need updating.
- The internal route /rest/api/3/search in jira_cloud_router.py and the endpoint catalog in jira_cloud_engine.py still use the old path. That path is this app's own proxy route, so I left it. Rename it if you want it to match upstream.
- The shell scripts under scripts/ had no matches for the old search path or startAt, so I didn't change them.
This pull request was generated automatically by Tiltmeter from the unsigned notice jira-cloud-change-2046-search-jql about atlassian.net's API. An AI agent (Claude Code with claude-sonnet-5-5) wrote these edits; review them like any other change.