# opsgenie-sdk

> Python SDK for Opsgenie REST API

- **URL**: https://www.freshcrate.ai/projects/opsgenie-sdk
- **Author**: OpsGenie
- **Category**: Developer Tools
- **Latest version**: `2.1.5` (2026-04-21)
- **License**: Unknown
- **Source**: https://github.com/opsgenie/opsgenie-python-sdk
- **Language**: Python
- **GitHub**: 49 stars, 41 forks
- **Registry**: pypi (`opsgenie-sdk`)
- **Tags**: `api`, `for`, `openapi`, `openapi-generator`, `opsgenie`, `pypi`, `python`, `rest`, `sdk`

## Description

# Python SDK for Opsgenie REST API

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.0.0
- Package version: 2.1.5
- Build package: com.atlassian.opsgenie.codegen.geniepy.GeniepyGenerator

For more information, please visit [https://www.opsgenie.com/contact-us](https://www.opsgenie.com/contact-us)

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install opsgenie-sdk
```
(you may need to run `pip` with root permission: `sudo pip install opsgenie-sdk`)

Then import the package:
```python
import opsgenie_sdk 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import opsgenie_sdk
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import opsgenie_sdk
from opsgenie_sdk.rest import ApiException
from pprint import pprint

configuration = opsgenie_sdk.Configuration()
# Configure API key authorization: GenieKey
configuration.api_key['Authorization'] = 'YOUR_API_KEY'

# create an instance of the API class
api_instance = opsgenie_sdk.AccountApi(opsgenie_sdk.ApiClient(configuration))

try:
    # Get Account Info
    api_response = api_instance.get_info()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->get_info: %s\n" % e)

```
Note: if you have an european account please set attribute 'host'

```
configuration.host = 'https://api.eu.opsgenie.com'
```

## Documentation for API Endpoints

All URIs are relative to *https://api.opsgenie.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountApi* | [**get_info**](docs/AccountApi.md#get_info) | **GET** /v2/account | Get Account Info
*AlertApi* | [**acknowledge_alert**](docs/AlertApi.md#acknowledge_alert) | **POST** /v2/alerts/{identifier}/acknowledge | Acknowledge Alert
*AlertApi* | [**add_attachment**](docs/AlertApi.md#add_attachment) | **POST** /v2/alerts/{identifier}/attachments | Add Alert Attachment
*AlertApi* | [**add_details**](docs/AlertApi.md#add_details) | **POST** /v2/alerts/{identifier}/details | Add Details
*AlertApi* | [**add_note**](docs/AlertApi.md#add_note) | **POST** /v2/alerts/{identifier}/notes | Add Note
*AlertApi* | [**add_responder**](docs/AlertApi.md#add_responder) | **POST** /v2/alerts/{identifier}/responders | Add Responder
*AlertApi* | [**add_tags**](docs/AlertApi.md#add_tags) | **POST** /v2/alerts/{identifier}/tags | Add Tags
*AlertApi* | [**add_team**](docs/AlertApi.md#add_team) | **POST** /v2/alerts/{identifier}/teams | Add Team
*AlertApi* | [**assign_alert**](docs/AlertApi.md#assign_alert) | **POST** /v2/alerts/{identifier}/assign | Assign Alert
*AlertApi* | [**close_alert**](docs/AlertApi.md#close_alert) | **POST** /v2/alerts/{identifier}/close | Close Alert
*AlertApi* | [**count_alerts**](docs/AlertApi.md#count_alerts) | **GET** /v2/alerts/count | Count Alerts
*AlertApi* | [**create_alert**](docs/AlertApi.md#create_alert) | **POST** /v2/alerts | Create Alert
*AlertApi* | [**create_saved_searches**](docs/AlertApi.md#create_saved_searches) | **POST** /v2/alerts/saved-searches | Create Saved Search
*AlertApi* | [**delete_alert**](docs/AlertApi.md#delete_alert) | **DELETE** /v2/alerts/{identifier} | Delete Alert
*AlertApi* | [**delete_saved_search**](docs/AlertApi.md#delete_saved_search) | **DELETE** /v2/alerts/saved-searches/{identifier} | Delete Saved Search
*AlertApi* | [**escalate_alert**](docs/AlertApi.md#escalate_alert) | **POST** /v2/alerts/{identifier}/escalate | Escalate Alert
*AlertApi* | [**execute_custom_alert_action**](docs/AlertApi.md#execute_custom_alert_action) | **POST** /v2/alerts/{identifier}/actions/{actionName} | Custom Alert Action
*AlertApi* | [**get_alert**](docs/AlertApi.md#get_alert) | **GET** /v2/alerts/{identifier} | Get Alert
*AlertApi* | [**get_attachment**](docs/AlertApi.md#get_attachment) | **GET** /v2/alerts/{identifier}/attachments/{attachmentId} | Get Alert Attachment
*AlertApi* | [**get_request_status**](docs/AlertApi.md#get_request_status) | **GET** /v2/alerts/requests/{requestId} | Get Request Status of Alert
*AlertApi* | [**get_saved_search**](docs/AlertApi.md#get_saved_search) | **GET** /v2/alerts/saved-searches/{identifier} | Get Saved Search
*AlertApi* | [**list_alerts**](docs/AlertApi.md#list_alerts) | **GET** /v2/alerts | List Alerts
*AlertApi* | [**list_attachments**](docs/AlertApi.md#list_attachments) | **GET** /v2/alerts/{identifier}/attachments | List Alert Attachments
*AlertApi* | [**list_logs**](docs/AlertApi.md#list_logs) | **GET** /v2/alerts/{identifier}/logs | List Alert Lo

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `2.1.5` | 2026-04-21 | Low | Imported from PyPI (2.1.5) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |
| `v2.1.5` | 2021-08-02 | Low | Fix a vulnerability issue that effects urllib3 library: urllib3 (below 1.26.5) is vulnerable to Denial Of Service (DoS) |

## Citation

- HTML: https://www.freshcrate.ai/projects/opsgenie-sdk
- Markdown: https://www.freshcrate.ai/projects/opsgenie-sdk.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/opsgenie-sdk/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
