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"
}
response = requests.get(url, headers=headers)
print(response.json())
If you're already working with Opsgenie’s API in Python, you’ll feel right at home using these.
I hope help!!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.