--- name: atlassianapi description: Atlassian API integration for Jira and Confluence automation. Activate for Atlassian REST APIs, webhooks, and platform integration. allowed-tools: - Bash - Read - Write - Edit - Glob - Grep --- # Atlassian API Skill Provides comprehensive Atlassian API integration capabilities for the Golden Armada AI Agent Fleet Platform. ## When to Use This Skill Activate this skill when working with: - Jira REST API integration - Confluence REST API integration - Atlassian webhooks - Automation and scripting - Cross-platform synchronization ## Authentication ### API Token (Cloud) \`\`\`python import requests from requests.auth import HTTPBasicAuth auth = HTTPBasicAuth('email@example.com', 'API_TOKEN') headers = { 'Accept': 'application/json', 'Content-Type': 'application/json' } base_url = 'https://your-domain.atlassian.net' \`\`\` ### Python Client Library \`\`\`python from atlassian import Jira, Confluence jira = Jira( url='https://your-domain.atlassian.net', username='email@example.com', password='API_TOKEN', cloud=True ) confluence = Confluence( url='https://your-domain.atlassian.net', username='email@example.com', password='API_TOKEN', cloud=True ) \`\`\` ## Jira REST API ### Issues \`\`\`python # Create issue response = requests.post( f'{base_url}/rest/api/3/issue', auth=auth, headers=headers, json={ 'fields': { 'project': {'key': 'GA'}, 'summary': 'Implement agent monitoring', 'description': { 'type': 'doc', 'version': 1, 'content': [ { 'type': 'paragraph', 'content': [ {'type': 'text', 'text': 'Description text'} ] } ] }, 'issuetype': {'name': 'Story'}, 'priority': {'name': 'High'}, 'labels': ['backend', 'monitoring'] } } ) # Get issue response = requests.get( f'{base_url}/rest/api/3/issue/GA-123', auth=auth, headers=headers ) issue = response.json() # Update issue response = requests.put( f'{base_url}/rest/api/3/issue/GA-123', auth=auth, headers=headers, json={ 'fields': { 'summary': 'Updated summary' } } ) # Transition issue # First, get available transitions transitions = requests.get( f'{base_url}/rest/api/3/issue/GA-123/transitions', auth=auth, headers=headers ).json() # Then transition requests.post( f'{base_url}/rest/api/3/issue/GA-123/transitions', auth=auth, headers=headers, json={'transition': {'id': '31'}} # ID from available transitions ) # Add comment requests.post( f'{base_url}/rest/api/3/issue/GA-123/comment', auth=auth, headers=headers, json={ 'body': { 'type': 'doc', 'version': 1, 'content': [ { 'type': 'paragraph', 'content': [ {'type': 'text', 'text': 'Comment text'} ] } ] } } ) \`\`\` ### JQL Search \`\`\`python # Search issues jql = 'project = GA AND status = "In Progress" ORDER BY created DESC' response = requests.get( f'{base_url}/rest/api/3/search', auth=auth, headers=headers, params={ 'jql': jql, 'maxResults': 50, 'fields': 'summary,status,assignee,priority' } ) results = response.json() for issue in results['issues']: print(f"{issue['key']}: {issue['fields']['summary']}") \`\`\` ### Sprints and Boards \`\`\`python # Get boards boards = requests.get( f'{base_url}/rest/agile/1.0/board', auth=auth, headers=headers ).json() # Get sprints for a board board_id = 1 sprints = requests.get( f'{base_url}/rest/agile/1.0/board/{board_id}/sprint', auth=auth, headers=headers ).json() # Get issues in sprint sprint_id = 10 issues = requests.get( f'{base_url}/rest/agile/1.0/sprint/{sprint_id}/issue', auth=auth, headers=headers ).json() # Move issues to sprint requests.post( f'{base_url}/rest/agile/1.0/sprint/{sprint_id}/issue', auth=auth, headers=headers, json={'issues': ['GA-123', 'GA-124']} ) \`\`\` ## Confluence REST API ### Pages \`\`\`python # Create page response = requests.post( f'{base_url}/wiki/rest/api/content', auth=auth, headers=headers, json={ 'type': 'page', 'title': 'Agent Architecture', 'space': {'key': 'GA'}, 'body': { 'storage': { 'value': '
Content here...
', 'representation': 'storage' } } } ) # Get page page = requests.get( f'{base_url}/wiki/rest/api/content/12345', auth=auth, headers=headers, params={'expand': 'body.storage,version'} ).json() # Update page requests.put( f'{base_url}/wiki/rest/api/content/12345', auth=auth, headers=headers, json={ 'type': 'page', 'title': 'Updated Title', 'body': { 'storage': { 'value': '