Execute raw Jira REST API requests with the jirac CLI.
Steps:
- Check that
jiracis available by runningjirac --version. If it is missing, tell the user to install it withcargo install jira-commands. - Extract from the user's request:
- HTTP method
- API path, for example
/rest/api/3/issue/PROJ-123 - JSON body when needed
- Run the matching command:
jirac api get <PATH>jirac api post <PATH> --body '<JSON>'jirac api put <PATH> --body '<JSON>'jirac api delete <PATH>jirac api patch <PATH> --body '<JSON>'
- Show the response clearly.
- If the user does not know the endpoint, help map their goal to the correct Jira REST path before running anything.
Examples:
- "get server info" →
jirac api get /rest/api/3/serverInfo - "get issue PROJ-123" →
jirac api get /rest/api/3/issue/PROJ-123 - "get all projects" →
jirac api get /rest/api/3/project - "post to /rest/api/3/issue with body {...}" →
jirac api post /rest/api/3/issue --body '{...}'