Jira कनेक्टर
customer-facing issue tracking, support ticket visibility, और project milestone notifications के लिए अपने Jira Cloud instance को Tajo के माध्यम से Brevo से कनेक्ट करें।
अवलोकन
| Property | Value |
|---|---|
| Platform | Jira Cloud |
| Category | Custom |
| Setup Complexity | Moderate |
| Official Integration | No |
| Data Synced | Issues, Projects, Users, Events |
| API Type | REST API v3 |
| Authentication | OAuth 2.0 (3LO) / API Token (Basic Auth) |
| Base URL | https://your-domain.atlassian.net/rest/api/3/ |
विशेषताएं
- Issue event sync - issue create, update, और resolve events को Brevo contact timelines में forward करें
- Customer ticket tracking - support visibility के लिए Jira issues को Brevo contacts से link करें
- Project milestone alerts - version releases और sprint completions पर Brevo campaigns trigger करें
- Team capacity data - operational dashboards के लिए workload metrics sync करें
- Status change events - issue workflow transitions को Brevo events के रूप में ट्रैक करें
- Comment sync - customer-facing comments को Brevo activity logs में forward करें
पूर्वावश्यकताएं
शुरू करने से पहले, सुनिश्चित करें कि आपके पास हैं:
- एक Jira Cloud instance (Jira Software, Jira Service Management, या Jira Work Management)
- OAuth apps बनाने या API tokens generate करने के लिए admin access
- आपके API token से जुड़ा Atlassian account email
- API access वाला एक Brevo account
- सक्रिय subscription वाला एक Tajo account
प्रमाणीकरण
Jira Cloud कई authentication methods को support करता है।
विकल्प 1: OAuth 2.0 (3LO) - अनुशंसित
- developer.atlassian.com पर जाएं
- Create > OAuth 2.0 integration पर क्लिक करें
- callback URL कॉन्फ़िगर करें:
https://app.tajo.io/callbacks/jira - ये scopes जोड़ें:
read:jira-workread:jira-userwrite:jira-workread:meOAuth 2.0 के लिए API URL structure:
https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/{resource}विकल्प 2: API Token (Basic Auth)
- id.atlassian.com/manage/api-tokens पर जाएं
- Create API token पर क्लिक करें
- इसे “Tajo Integration” नाम दें
# Basic Auth: username के रूप में email, password के रूप में API tokencurl -X GET "https://your-domain.atlassian.net/rest/api/3/myself" \ -H "Accept: application/json"API Token सीमाएं
API tokens व्यक्तिगत user accounts से जुड़े होते हैं। यदि user deactivate हो जाता है, तो integration टूट जाता है। production deployments के लिए OAuth 2.0 का उपयोग करें।
Tajo से कनेक्ट करना
# OAuth 2.0 का उपयोगtajo connectors install jira \ --client-id $JIRA_CLIENT_ID \ --client-secret $JIRA_CLIENT_SECRET \ --cloud-id $JIRA_CLOUD_ID
# API Token का उपयोगtajo connectors install jira \ --site-url your-domain.atlassian.net \ --api-token $JIRA_API_TOKENकॉन्फ़िगरेशन
बेसिक सेटअप
connectors: jira: enabled: true site_url: "your-domain.atlassian.net" auth_type: "oauth2" # or "basic"
sync: issues: true projects: true users: true comments: true worklogs: false
projects: - key: "SUPPORT" sync_to_list: 22 - key: "PRODUCT" sync_to_list: 23
issue_types: - Bug - Story - Task - Support RequestField Mapping
Jira issue और user fields को Brevo attributes से map करें:
field_mapping: # User fields accountId: JIRA_ACCOUNT_ID emailAddress: email displayName: FIRSTNAME
# contact events से mapped issue fields issue_key: LAST_TICKET_KEY issue_status: LAST_TICKET_STATUS issue_priority: LAST_TICKET_PRIORITY issue_created: LAST_TICKET_DATE resolution: LAST_TICKET_RESOLUTIONAPI Endpoints
Tajo निम्नलिखित Jira Cloud REST API v3 endpoints के साथ integrate करता है:
| Endpoint | Method | उद्देश्य |
|---|---|---|
/rest/api/3/search | POST | JQL का उपयोग करके issues खोजें |
/rest/api/3/issue/{issueIdOrKey} | GET | issue विवरण प्राप्त करें |
/rest/api/3/issue | POST | एक issue बनाएं |
/rest/api/3/project | GET | सभी projects list करें |
/rest/api/3/project/{projectIdOrKey} | GET | project विवरण प्राप्त करें |
/rest/api/3/user/search | GET | users खोजें |
/rest/api/3/myself | GET | वर्तमान user प्राप्त करें |
/rest/api/3/issue/{issueIdOrKey}/comment | GET | issue comments प्राप्त करें |
/rest/api/3/webhook | POST | webhooks register करें |
/rest/api/3/status | GET | सभी statuses प्राप्त करें |
/rest/api/3/priority | GET | सभी priorities प्राप्त करें |
कोड उदाहरण
कनेक्टर शुरू करें
import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({ apiKey: process.env.TAJO_API_KEY, brevoApiKey: process.env.BREVO_API_KEY});
await tajo.connectors.connect('jira', { clientId: process.env.JIRA_CLIENT_ID, clientSecret: process.env.JIRA_CLIENT_SECRET, cloudId: process.env.JIRA_CLOUD_ID});Support Issues Sync करें
// Jira support issues को Brevo contacts से sync करेंawait tajo.connectors.sync('jira', { type: 'incremental', resources: ['issues'], jql: 'project = SUPPORT AND updated >= -24h', batchSize: 50});
const status = await tajo.connectors.status('jira');console.log(status);// {// connected: true,// lastSync: '2024-03-15T12:00:00Z',// issuesTracked: 4560,// projectsMonitored: 3,// usersLinked: 890// }Jira Webhooks हैंडल करें
app.post('/webhooks/jira', async (req, res) => { const event = req.body;
await tajo.connectors.handleWebhook('jira', { event: event.webhookEvent, payload: { issueKey: event.issue?.key, issueType: event.issue?.fields?.issuetype?.name, status: event.issue?.fields?.status?.name, reporter: event.issue?.fields?.reporter?.emailAddress, assignee: event.issue?.fields?.assignee?.emailAddress } });
res.status(200).send('OK');});Customer द्वारा Issues खोजें
// किसी विशिष्ट customer द्वारा रिपोर्ट किए गए सभी issues खोजेंconst issues = await tajo.connectors.query('jira', { maxResults: 20, fields: ['summary', 'status', 'priority', 'created']});Rate Limits
Jira Cloud platform stability सुनिश्चित करने के लिए rate limits लागू करता है:
| Context | Rate Limit |
|---|---|
| REST API | प्रति user ~100 requests प्रति 10 सेकंड |
| Concurrent requests | 10 concurrent long-running requests |
| Bulk operations | endpoint के अनुसार भिन्न |
Pagination
Jira startAt और maxResults parameters के साथ offset-आधारित pagination का उपयोग करता है। डिफ़ॉल्ट page size 50 है, अधिकतम 100। Tajo pagination को स्वचालित रूप से संभालता है।
जब rate limits पार हो जाते हैं तो Jira 429 Too Many Requests response लौटाता है, जिसमें Retry-After header होता है जो दर्शाता है कि कब retry करना है।
समस्या निवारण
सामान्य समस्याएं
| समस्या | कारण | समाधान |
|---|---|---|
| 401 Unauthorized | अमान्य token या expired OAuth | OAuth token refresh करें या API token पुनः generate करें |
| 403 Forbidden | अपर्याप्त permissions | जांचें कि user की अनुरोधित project तक पहुंच है |
| JQL errors | अमान्य query syntax | पहले Jira के issue search में JQL validate करें |
| Webhook प्राप्त नहीं हुआ | Firewall blocking | सुनिश्चित करें कि webhook URL सार्वजनिक रूप से accessible है |
| गायब fields | Field response में नहीं | fields parameter में field जोड़ें या expand का उपयोग करें |
Debug Mode
connectors: jira: debug: true log_level: verbose log_api_calls: trueConnection Test करें
tajo connectors test jira# ✓ API authentication successful# ✓ Project access verified# ✓ Issue search operational# ✓ User lookup available# ✓ Webhook registration activeसर्वोत्तम प्रथाएं
- Production के लिए OAuth 2.0 का उपयोग करें - व्यक्तिगत user accounts पर निर्भरता से बचता है
- JQL के साथ filter करें - API calls कम करने के लिए केवल प्रासंगिक issues sync करें
- Real-time के लिए webhooks का उपयोग करें - polling से बचें; issue changes के लिए webhooks register करें
- ADF format का सम्मान करें - Jira v3 rich text fields के लिए Atlassian Document Format का उपयोग करता है
- Project-to-list map करें - प्रति Jira project अलग Brevo lists बनाएं
- Pagination संभालें - पूर्ण data के लिए हमेशा सभी pages के माध्यम से iterate करें
सुरक्षा
- OAuth 2.0 (3LO) - refresh tokens के साथ सुरक्षित token-आधारित authentication
- API Token + Basic Auth - HTTPS पर Base64-encoded credentials
- HTTPS Only - सभी API communication TLS 1.2+ के माध्यम से encrypted
- Scoped Access - OAuth scopes API access को आवश्यक संसाधनों तक सीमित करते हैं
- Atlassian Cloud Security - SOC 2 Type II certified infrastructure
- Encrypted Storage - Credentials Tajo में at rest encrypted