Skip to content

Comments

fix: Update to 2025 Atlassian Cloud API - migrate to /search/jql endpoints#3

Open
kalifg wants to merge 1 commit intotom28881:mainfrom
kalifg:feature/update-api
Open

fix: Update to 2025 Atlassian Cloud API - migrate to /search/jql endpoints#3
kalifg wants to merge 1 commit intotom28881:mainfrom
kalifg:feature/update-api

Conversation

@kalifg
Copy link

@kalifg kalifg commented Sep 9, 2025

🚨 Problem

The MCP Jira server was failing with "The requested API has been removed" errors when trying to retrieve assigned issues or perform searches. This was caused by Atlassian's deprecation and removal of the legacy /rest/api/3/search endpoint in 2025.

✅ Solution

This PR addresses the breaking changes in Atlassian's Jira Cloud API by migrating from the deprecated /rest/api/3/search endpoint to the new /rest/api/3/search/jql endpoint, ensuring compatibility with current API requirements.

🔧 API Updates Made

Core Search Endpoint Migration

  • FROM: /rest/api/3/search (deprecated/removed)
  • TO: /rest/api/3/search/jql (current 2025 API)
  • Added fallback mechanism (GET → POST) for complex JQL queries
  • Implemented proper URL encoding for JQL parameters

Enhanced Error Handling

  • Added context-specific error messages for 401, 403, 404 responses
  • Better debugging information for API migration issues
  • Improved logging for troubleshooting API interactions

JQL Query Construction Improvements

  • Enhanced assignee parameter handling (email vs account ID)
  • Case-insensitive currentUser support
  • Better parameter validation and encoding

🆕 New Features

New get-my-issues Tool

  • Dedicated endpoint for user-assigned issues
  • Optimized JQL query: assignee = currentUser() ORDER BY updated DESC
  • Provides faster, more reliable access to personal issue lists

New getMyAssignedIssues() Method

  • Helper method in JiraClient class
  • Encapsulates best practice for getting assigned issues
  • Used by both the new tool and existing search functionality

📋 Files Changed

  • src/utils/jira-client.ts - Updated search endpoint and error handling
  • src/tools/issue-tools.ts - Added new tool and improved JQL construction
  • README.md - Updated documentation with 2025 API changes and new features
  • package-lock.json - Version bump to reflect API compatibility updates

🧪 Testing

  • ✅ All TypeScript compilation passes
  • ✅ Build completes successfully
  • ✅ Tested with live Jira instance (chesscom.atlassian.net)
  • ✅ Verified assigned issue retrieval works correctly
  • ✅ Confirmed backward compatibility for existing JQL queries

📚 Documentation Updates

  • Added "Recent Updates (2025)" section to README
  • Updated tool count (12 → 13 tools)
  • New usage examples for get-my-issues
  • Enhanced troubleshooting section

🔄 Backward Compatibility

  • ✅ All existing tools continue to work
  • ✅ Existing JQL queries remain valid
  • ✅ No breaking changes for users
  • ✅ Graceful fallback for edge cases

🚀 Impact

This update ensures the MCP Jira server continues to work reliably with Atlassian's evolving API while adding valuable new functionality. Users will no longer experience "API has been removed" errors and will have access to improved assigned issue retrieval.

🔗 References


🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

…oints

This commit addresses the breaking changes in Atlassian's Jira Cloud API where
the legacy /rest/api/3/search endpoint has been removed and replaced with
/rest/api/3/search/jql. These changes ensure compatibility with current API.

API Updates Made:
- Replace deprecated /rest/api/3/search with /rest/api/3/search/jql
- Add fallback mechanism (GET → POST) for complex JQL queries
- Implement proper URL encoding for JQL parameters
- Enhanced error handling with API-specific context messages
- Improve assignee parameter handling (email vs account ID)

New Features:
- Add get-my-issues tool for dedicated user-assigned issue retrieval
- Add getMyAssignedIssues() method in JiraClient class
- Enhanced JQL query construction with case-insensitive currentUser support

Breaking Changes Fixed:
- Resolves "The requested API has been removed" errors
- Fixes assigned issue search functionality
- Maintains backward compatibility for existing JQL queries

Technical Details:
- Updated searchIssues() method in jira-client.ts to use /search/jql
- Added robust error handling for 401, 403, 404 HTTP responses
- Enhanced logging for API debugging and troubleshooting
- Updated documentation with 2025 API changes and new tool usage

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant