Skip to content

Conversation

@sooperset
Copy link
Owner

Summary

The Jira Cloud v2 search API (/rest/api/*/search) has been deprecated and is now returning errors indicating users should migrate to the v3 API.

This PR migrates Cloud deployments to the new v3 search endpoint.

Changes

  • Cloud: Use POST /rest/api/3/search/jql with nextPageToken pagination
  • Server/DC: Continue using the v2 /rest/api/2/search endpoint unchanged
  • Updated tests to mock the new v3 API calls for Cloud scenarios

v3 API Differences

Aspect v2 (deprecated) v3 (new)
Method GET with query params POST with JSON body
Pagination startAt offset nextPageToken token
Total count Returns actual count Returns -1
Max per request 50 100

Test Plan

  • Tested against live Jira Cloud
  • All 24 search unit tests pass
  • All 1016 unit tests pass
  • Pre-commit hooks pass

Related

The Jira Cloud v2 search API (/rest/api/*/search) has been deprecated and
is now returning errors. This commit migrates Cloud deployments to the new
v3 search endpoint (POST /rest/api/3/search/jql).

Changes:
- Cloud: Use POST /rest/api/3/search/jql with nextPageToken pagination
- Server/DC: Continue using the v2 /rest/api/2/search endpoint unchanged
- Updated tests to mock the new v3 API calls for Cloud scenarios

The v3 API has some differences:
- Uses JSON body instead of query parameters
- Uses nextPageToken for pagination instead of startAt
- Does not return total count (returns -1)
- Max 100 results per request (was 50 for Server/DC)

Fixes #720

Github-Issue:#720
@sooperset sooperset merged commit ca05d51 into main Nov 26, 2025
5 checks passed
@sooperset sooperset deleted the fix/jira-search-v3-api branch November 26, 2025 16:17
jfugalde added a commit to jfugalde/mcp-atlassian that referenced this pull request Dec 3, 2025
Updated the JiraConfig class to support optional prefixes for environment variables, allowing for more flexible configuration. This change includes:

- Added a `prefix` argument to the `from_env` method to customize environment variable names.
- Updated environment variable retrieval to use the specified prefix where applicable.
- Improved error messages for missing required variables, ensuring clarity on which variables are needed.

This enhancement facilitates better integration in environments with multiple configurations, such as testing or deployment scenarios.

Fixes sooperset#769
nszceta pushed a commit to nszceta/mcp-atlassian that referenced this pull request Dec 4, 2025
The Jira Cloud v2 search API (/rest/api/*/search) has been deprecated and
is now returning errors. This commit migrates Cloud deployments to the new
v3 search endpoint (POST /rest/api/3/search/jql).

Changes:
- Cloud: Use POST /rest/api/3/search/jql with nextPageToken pagination
- Server/DC: Continue using the v2 /rest/api/2/search endpoint unchanged
- Updated tests to mock the new v3 API calls for Cloud scenarios

The v3 API has some differences:
- Uses JSON body instead of query parameters
- Uses nextPageToken for pagination instead of startAt
- Does not return total count (returns -1)
- Max 100 results per request (was 50 for Server/DC)

Fixes sooperset#720

Github-Issue:sooperset#720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Jira search_issues cannot return the number of issues because it tries to use the v2 endpoint

2 participants