Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Python API to JIRA service management or Compass

Sarath Kottur
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2025

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

1 answer

1 accepted

3 votes
Answer accepted
Raphael Lopes
Contributor
April 9, 2025

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!!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events