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.5
- 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
- AccountInfo
- AccountPlan
- AcknowledgeAlertPayload
- AddDetailsToAlertPayload
- AddDetailsToAlertPayloadAllOf
- AddNoteToAlertPayload
- AddResponderToAlertPayload
- AddResponderToAlertPayloadAllOf
- AddTagsToAlertPayload
- AddTagsToAlertPayloadAllOf
- AddTeamToAlertPayload
- AddTeamToAlertPayloadAllOf
- Alert
- AlertActionPayload
- AlertAllOf
- AlertAttachment
- AlertAttachmentMeta
- AlertIntegration
- AlertLog
- AlertNote
- AlertPaging
- AlertRecipient
- AlertReport
- AlertRequestStatus
- AlertTeamMeta
- AlertUserMeta
- AllRecipient
- AssignAlertPayload
- AssignAlertPayloadAllOf
- BaseAlert
- BaseIncident
- BaseResponse
- BaseResponseWithExpandable
- BaseResponseWithExpandableAllOf
- CloseAlertPayload
- CloseIncidentPayload
- Condition
- CreateAlertPayload
- CreateAlertPayloadAllOf
- CreateHeartbeatPayload
- CreateHeartbeatPayloadAllOf
- CreateHeartbeatPayloadAllOfOwnerTeam
- CreateHeartbeatResponse
- CreateHeartbeatResponseAllOf
- CreateIncidentPayload
- CreateIncidentPayloadAllOf
- CreateSavedSearchPayload
- CreateSavedSearchResponse
- CreateSavedSearchResponseAllOf
- DisableHeartbeatResponse
- DisableHeartbeatResponseAllOf
- Duration
- EnableHeartbeatResponse
- ErrorResponse
- ErrorResponseAllOf
- EscalateAlertToNextPayload
- EscalateAlertToNextPayloadAllOf
- EscalationRecipient
- ExecuteCustomAlertActionPayload
- Filter
- GetAccountInfoResponse
- GetAccountInfoResponseAllOf
- GetAlertAttachmentResponse
- GetAlertAttachmentResponseAllOf
- GetAlertResponse
- GetAlertResponseAllOf
- GetCountAlertsResponse
- GetCountAlertsResponseAllOf
- GetCountAlertsResponseAllOfData
- GetHeartbeatResponse
- GetIncidentRequestStatusResponse
- GetIncidentRequestStatusResponseAllOf
- GetIncidentResponse
- GetIncidentResponseAllOf
- GetRequestStatusResponse
- GetRequestStatusResponseAllOf
- GetSavedSearchResponse
- GetSavedSearchResponseAllOf
- GroupRecipient
- Heartbeat
- HeartbeatMeta
- Incident
- IncidentActionPayload
- IncidentAllOf
- IncidentRequestStatus
- ListAlertAttachmentsResponse
- ListAlertAttachmentsResponseAllOf
- ListAlertLogsResponse
- ListAlertLogsResponseAllOf
- ListAlertNotesResponse
- ListAlertNotesResponseAllOf
- ListAlertRecipientsResponse
- ListAlertRecipientsResponseAllOf
- ListAlertsResponse
- ListAlertsResponseAllOf
- ListHeartbeatResponse
- ListHeartbeatResponseAllOf
- ListHeartbeatResponseAllOfData
- ListIncidentsResponse
- ListIncidentsResponseAllOf
- ListSavedSearchesResponse
- ListSavedSearchesResponseAllOf
- MatchAll
- MatchAllConditions
- MatchAnyCondition
- MatchAnyConditionAllOf
- NoRecipient
- PageDetails
- Recipient
- Responder
- SavedSearch
- SavedSearchEntity
- SavedSearchMeta
- ScheduleRecipient
- SnoozeAlertPayload
- SnoozeAlertPayloadAllOf
- StatusPageEntry
- StatusPageEntryAllOf
- SuccessData
- SuccessResponse
- SuccessResponseAllOf
- TeamRecipient
- TeamRecipientAllOf
- TeamResponder
- TimeOfDayRestriction
- TimeOfDayRestrictionInterval
- TimeOfDayRestrictionIntervalAllOf
- TimeRestrictionInterval
- UnAcknowledgeAlertPayload
- UpdateAlertDescriptionPayload
- UpdateAlertMessagePayload
- UpdateAlertPriorityPayload
- UpdateHeartbeatPayload
- UpdateHeartbeatResponse
- UpdateSavedSearchPayload
- UserRecipient
- UserRecipientAllOf
- UserResponder
- UserResponderAllOf
- WeekdayTimeRestriction
- WeekdayTimeRestrictionInterval
- WeekdayTimeRestrictionIntervalAllOf
Documentation For Authorization
GenieKey
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file opsgenie-sdk-2.1.5.tar.gz
.
File metadata
- Download URL: opsgenie-sdk-2.1.5.tar.gz
- Upload date:
- Size: 86.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c38a2f0c7acbcbeb9202ced80ec857b5eda2d99919392fed4083bdfa7be32669 |
|
MD5 | 7cf191fa52c5f99807f93104aa0baac4 |
|
BLAKE2b-256 | 5d13ddaa92608384f64e8d0d22097e74c24e341f2b41096c52c872abfa35b63f |
File details
Details for the file opsgenie_sdk-2.1.5-py3-none-any.whl
.
File metadata
- Download URL: opsgenie_sdk-2.1.5-py3-none-any.whl
- Upload date:
- Size: 247.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe0af399030a91ec5755ecfb899965bf18fcb46e17fd2d3a4d71fa68999947e9 |
|
MD5 | 3d4525ebae8a49dbcef28f84d1db47ce |
|
BLAKE2b-256 | dcb94c0479fba19fabb00850e11dcb69d82471ed6b29fee1736594b4bedad2d3 |