Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

jmartasek
Copy link

What changed

This PR adds a new api command to the Jira CLI that allows users to make authenticated API requests to arbitrary endpoints in the Jira REST API. This feature enables users to interact with any Jira API endpoint directly through the CLI using their current authentication.

Key features:

  • Support for different HTTP methods (GET, POST, PUT, DELETE)
  • JSON payload input either directly via command line or from a file
  • Pretty-printing of JSON responses
  • Option to translate custom field IDs to friendly names based on the config

Why this change

While the Jira CLI provides targeted commands for common operations, there are many specialized Jira API endpoints that don't have specific commands. This API command serves as a power-user feature that provides full access to the Jira API without having to manually set up authentication and headers.

Use cases include:

  • Accessing newer API endpoints not yet supported by dedicated commands
  • Creating custom scripts that need to access specific Jira data
  • Testing and exploring the Jira API
  • Advanced workflow automation

Testing done

  • Tested all examples with a custom project
  • Tested custom field translation
  • Ensured the command correctly integrates with the existing authentication system
  • All examples in the help text have been verified to work correctly with a custom project.

Limitations and considerations

  • The endpoint path provided is appended to the configured Jira server URL
  • Authentication is always sent with the request using the current CLI configuration
  • For larger/binary files, the file upload API would be more appropriate than this command
  • This was developed with huge help of Copilot
  • Equivalent to gh api - making authenticated calls to REST / API endpoints #770 - is the request discussion

@jmartasek jmartasek changed the title Add API command for direct Jira API access feat: Add API command for direct Jira API access Aug 19, 2025
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.