I have a current Python code that makes API call to Opsgenie for alerting the user on an event occurance
Is there a Python API for Compass or the JIRA service management ?
Thanks
Hello @Sarath Kottur
Yes, both Compass and Jira Service Management (JSM) have REST APIs you can access from Python.
For Compass:Compass is part of Atlassian's developer experience platform. It exposes a REST API that allows you to interact with components, scorecards, metrics, etc.
API reference: https://developer.atlassian.com/cloud/compass/rest/
You can use requests in Python to call it:
import requests
url = "https://api.atlassian.com/compass/v1/components"headers = {"Authorization": "Bearer <your-access-token>","Accept": "application/json"}
response = requests.get(url, headers=headers)print(response.json())
Note: Compass APIs require an Atlassian Connect or OAuth 2.0 token.
For Jira Service Management (JSM):JSM uses the same Jira Cloud REST API, with some additional endpoints specific to service management (like SLAs, queues, and requests).
API reference: https://developer.atlassian.com/cloud/jira/service-desk/rest/
Example (getting a request):
url = "https://your-domain.atlassian.net/rest/servicedeskapi/request"headers = {"Authorization": "Basic <base64-user:api-token>","Accept": "application/json"}
If you're already working with Opsgenie’s API in Python, you’ll feel right at home using these.
I hope help!!
It looks like you're new here. Sign in or register to get started.