Skip to main content

Python SDK for Opsgenie REST API

Project description

Python SDK for Opsgenie REST API

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • Package version: 2.1.2
  • Build package: com.atlassian.opsgenie.codegen.geniepy.GeniepyGenerator

For more information, please visit 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

pip install opsgenie-sdk

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

Then import the package:

import opsgenie_sdk 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import opsgenie_sdk

Getting Started

Please follow the installation procedure and then run the following:

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 GET /v2/account Get Account Info
AlertApi acknowledge_alert POST /v2/alerts/{identifier}/acknowledge Acknowledge Alert
AlertApi add_attachment POST /v2/alerts/{identifier}/attachments Add Alert Attachment
AlertApi add_details POST /v2/alerts/{identifier}/details Add Details
AlertApi add_note POST /v2/alerts/{identifier}/notes Add Note
AlertApi add_responder POST /v2/alerts/{identifier}/responders Add Responder
AlertApi add_tags POST /v2/alerts/{identifier}/tags Add Tags
AlertApi add_team POST /v2/alerts/{identifier}/teams Add Team
AlertApi assign_alert POST /v2/alerts/{identifier}/assign Assign Alert
AlertApi close_alert POST /v2/alerts/{identifier}/close Close Alert
AlertApi count_alerts GET /v2/alerts/count Count Alerts
AlertApi create_alert POST /v2/alerts Create Alert
AlertApi create_saved_searches POST /v2/alerts/saved-searches Create Saved Search
AlertApi delete_alert DELETE /v2/alerts/{identifier} Delete Alert
AlertApi delete_saved_search DELETE /v2/alerts/saved-searches/{identifier} Delete Saved Search
AlertApi escalate_alert POST /v2/alerts/{identifier}/escalate Escalate Alert
AlertApi execute_custom_alert_action POST /v2/alerts/{identifier}/actions/{actionName} Custom Alert Action
AlertApi get_alert GET /v2/alerts/{identifier} Get Alert
AlertApi get_attachment GET /v2/alerts/{identifier}/attachments/{attachmentId} Get Alert Attachment
AlertApi get_request_status GET /v2/alerts/requests/{requestId} Get Request Status of Alert
AlertApi get_saved_search GET /v2/alerts/saved-searches/{identifier} Get Saved Search
AlertApi list_alerts GET /v2/alerts List Alerts
AlertApi list_attachments GET /v2/alerts/{identifier}/attachments List Alert Attachments
AlertApi list_logs GET /v2/alerts/{identifier}/logs List Alert Logs
AlertApi list_notes GET /v2/alerts/{identifier}/notes List Alert Notes
AlertApi list_recipients GET /v2/alerts/{identifier}/recipients List Alert Recipients
AlertApi list_saved_searches GET /v2/alerts/saved-searches Lists Saved Searches
AlertApi remove_attachment DELETE /v2/alerts/{identifier}/attachments/{attachmentId} Remove Alert Attachment
AlertApi remove_details DELETE /v2/alerts/{identifier}/details Remove Details
AlertApi remove_tags DELETE /v2/alerts/{identifier}/tags Remove Tags
AlertApi snooze_alert POST /v2/alerts/{identifier}/snooze Snooze Alert
AlertApi un_acknowledge_alert POST /v2/alerts/{identifier}/unacknowledge UnAcknowledge Alert
AlertApi update_alert_description PUT /v2/alerts/{identifier}/description Update Alert Description
AlertApi update_alert_message PUT /v2/alerts/{identifier}/message Update Alert Message
AlertApi update_alert_priority PUT /v2/alerts/{identifier}/priority Update Alert Priority
AlertApi update_saved_search PATCH /v2/alerts/saved-searches/{identifier} Update Saved Search
HeartbeatApi create_heartbeat POST /v2/heartbeats Create Heartbeat
HeartbeatApi delete_heartbeat DELETE /v2/heartbeats/{name} Delete Heartbeat
HeartbeatApi disable_heartbeat POST /v2/heartbeats/{name}/disable Disable Heartbeat
HeartbeatApi enable_heartbeat POST /v2/heartbeats/{name}/enable Enable Heartbeat
HeartbeatApi get_heartbeat GET /v2/heartbeats/{name} Get Heartbeat
HeartbeatApi list_heart_beats GET /v2/heartbeats List Heartbeats
HeartbeatApi ping GET /v2/heartbeats/{name}/ping Ping Heartbeat
HeartbeatApi update_heartbeat PATCH /v2/heartbeats/{name} Update Heartbeat (Partial)
IncidentApi close_incident POST /v1/incidents/{identifier}/close Close Incident
IncidentApi create_incident POST /v1/incidents/create Create Incident
IncidentApi delete_incident DELETE /v1/incidents/{identifier} Delete Incident
IncidentApi get_incident GET /v1/incidents/{identifier} Get Incident
IncidentApi get_incident_request_status GET /v1/incidents/requests/{requestId} Get Request Status of Incident
IncidentApi list_incidents GET /v1/incidents/ List incidents

Documentation For Models

Documentation For Authorization

GenieKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

support@opsgenie.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opsgenie-sdk-2.1.2.tar.gz (86.2 kB view details)

Uploaded Source

Built Distribution

opsgenie_sdk-2.1.2-py3-none-any.whl (247.8 kB view details)

Uploaded Python 3

File details

Details for the file opsgenie-sdk-2.1.2.tar.gz.

File metadata

  • Download URL: opsgenie-sdk-2.1.2.tar.gz
  • Upload date:
  • Size: 86.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for opsgenie-sdk-2.1.2.tar.gz
Algorithm Hash digest
SHA256 b09b6560ed131ec48016573a128c63a3bf1cf39693550c60f8917c09d2ae1eaa
MD5 9af1160f9683780e0ebf405babf1b883
BLAKE2b-256 d0087036ecaab585e53adab79d50deb3a7773ddeebafe4a30c56d5501ed3864d

See more details on using hashes here.

File details

Details for the file opsgenie_sdk-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: opsgenie_sdk-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 247.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for opsgenie_sdk-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0aa30bedd1120f9ec3a7e8fca649185a06a0e0d0b0142e79bca84de9ebe5b68
MD5 491682d63c90fdf3dfa05d854f814c2e
BLAKE2b-256 75ed744e36c7d62f5d084596429fb7ac778007154550435f60348b21a7d0dc6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page