Cameleer

Jira component

The jira component creates, updates, transitions, comments and searches Jira issues over the Jira REST API v2, and polls for new issues, new comments and field changes.

Scheme: jira: · Crate: cameleer-saas · Cargo feature: saas · Consumer: yes · Producer: yes · Apache Camel: Jira

When to use it

  • Open a ticket automatically when monitoring, a failed job or an AI agent detects a problem.
  • Forward new issues or comments to Slack, Teams or e-mail.
  • React to status or priority changes (escalate when an issue becomes Blocker).
  • Attach logs, add work logs, link related issues from an integration flow.

URI format

text
jira:type?jiraUrl=https://your-site.atlassian.net&username=...&password=...[&options]

Producer types: addIssue, updateIssue, addComment, deleteIssue, fetchIssue, fetchComments, searchIssues, transitionIssue, attach, watchers, addIssueLink, addWorkLog. Consumer types: newIssues, newComments, watchUpdates.

Example

An agent that turns an incident into a ticket. The body becomes the issue description; project, type and summary come from headers. After the call the body is the created issue (id, key, self) and the IssueKey header holds its key.

yaml example: jira-agent-ticket
- route:
    id: incident-to-jira
    from:
      uri: "direct:incident"
      steps:
        - setHeader:
            name: ProjectKey
            constant: "OPS"
        - setHeader:
            name: IssueTypeName
            constant: "Bug"
        - setHeader:
            name: IssueSummary
            simple: "Incident on ${header.service}"
        - setHeader:
            name: IssuePriorityName
            constant: "High"
        - to: "jira:addIssue?jiraUrl={{env:JIRA_URL:https://your-site.atlassian.net}}&username={{env:JIRA_USER}}&password={{env:JIRA_API_TOKEN}}"
        - log: "created ${header.IssueKey}"

Announce every new issue of a project in Slack. The consumer's first poll records the issues that already exist; after that each new issue is delivered once, with the IssueKey header.

yaml example: jira-new-issues-to-slack
- route:
    id: new-issues-to-slack
    from:
      uri: "jira:newIssues?jiraUrl={{env:JIRA_URL:https://your-site.atlassian.net}}&username={{env:JIRA_USER}}&password={{env:JIRA_API_TOKEN}}&jql=project=OPS&delay=60000"
      steps:
        - setBody:
            simple: "New Jira issue ${header.IssueKey}: ${body[fields][summary]}"
        - to: "slack:#ops?webhookUrl={{env:SLACK_WEBHOOK_URL}}"

Rust DSL

rust
ctx.add_routes(|b| {
    b.from("direct:incident")
        .set_header("ProjectKey", constant("OPS"))
        .set_header("IssueTypeName", constant("Bug"))
        .set_header("IssueSummary", simple("Incident on ${header.service}"))
        .to("jira:addIssue?jiraUrl={{env:JIRA_URL:https://your-site.atlassian.net}}&username={{env:JIRA_USER}}&password={{env:JIRA_API_TOKEN}}");
})?;

Options

optiondefaultdescription
jiraUrlBase URL of the Jira site (required).
usernameUser (e-mail on Jira Cloud) for Basic authentication.
passwordPassword or API token for Basic authentication.
accessTokenPersonal access token (Bearer). Used instead of username/password when set.
jqlJQL query: required by the consumers, optional for searchIssues. ORDER BY key desc is appended when the query has no ORDER BY.
maxResults50Maximum issues per search.
watchedFieldsStatus,PrioritywatchUpdates: fields to watch (case-insensitive).
sendOnlyUpdatedFieldtruewatchUpdates: send only the new field value (false sends the whole issue).
delay, initialDelay, ...delay=6000Consumers: the standard scheduled-poll options.

consumerKey, privateKey and verificationCode (OAuth 1.0a) are accepted for Camel compatibility but not used: authenticate with an API token or a personal access token.

Message headers

headerdirectiondescription
ProjectKeyinaddIssue: project key (required).
IssueTypeName / IssueTypeIdinaddIssue (one required), updateIssue.
IssueSummaryinaddIssue (required), updateIssue.
IssueAssignee / IssueAssigneeIdinAssignee name or account id.
IssuePriorityName / IssuePriorityIdinPriority.
IssueComponentsinComma-separated component names.
IssueKeyin / outTarget issue of most producers; set by addIssue and by the consumers.
CamelJiraJqlinsearchIssues: JQL (else the jql option, else the body).
IssueTransitionIdintransitionIssue: transition id; a non-null body is added as a comment.
IssueWatchersAdd / IssueWatchersRemoveinwatchers: comma-separated text or a list of user names.
ParentIssueKey, ChildIssueKey, linkTypeinaddIssueLink.
minutesSpentinaddWorkLog; the body is the work log comment.
CamelFileNameinattach: file name (default attachment); the body is the content.
IssueChanged, IssueWatchedIssuesoutwatchUpdates: the changed field and the keys of the watched issues.

Run it with Docker

sh
export JIRA_URL=https://your-site.atlassian.net JIRA_USER=bot@example.com JIRA_API_TOKEN=... SLACK_WEBHOOK_URL=...
docker run --rm -e JIRA_URL -e JIRA_USER -e JIRA_API_TOKEN -e SLACK_WEBHOOK_URL \
  -v "$PWD:/routes:ro" pmsudhi/cameleer run /routes/new-issues-to-slack.camel.yaml

Common questions

How do I authenticate with Jira Cloud?

Use your account e-mail as username and an API token (from id.atlassian.com) as password. For Jira Data Center, a personal access token in accessToken works too.

How do I let an LLM write the ticket?

Call openai first with a system message such as "Write a one-line Jira summary", store the answer in the IssueSummary header (setHeader with ${body}), restore the original text as the body, then call jira:addIssue. The AI components guide shows the pattern.

How do I search issues?

jira:searchIssues?jql=project=OPS AND status=Open (or the JQL in the body or the CamelJiraJql header); the body becomes the list of issues.

Does it use Jira REST API v3?

No, v2 (/rest/api/2), which Jira Cloud and Data Center both still serve. Descriptions and comments are plain text, not Atlassian Document Format.

Found a problem?

If something on this page doesn't match what Cameleer does, or you hit a bug while building with it, please help fix it, whether you are a person or a coding agent: open an issue that describes what you saw, then fork the repository, fix it, add or update a test, run cargo test --workspace, and open a pull request. CONTRIBUTING.md explains the ground rules.

Edit this page on GitHub