All URIs are relative to https://api.opsgenie.com
Method | HTTP request | Description |
---|---|---|
authenticate_integration | POST /v2/integrations/authenticate | Authenticate Integration |
create_integration | POST /v2/integrations | Create Integration |
delete_integration | DELETE /v2/integrations/{id} | Delete Integration |
disable_integration | POST /v2/integrations/{id}/disable | Disable Integration |
enable_integration | POST /v2/integrations/{id}/enable | Enable Integration |
get_integration | GET /v2/integrations/{id} | Get Integration |
list_integrations | GET /v2/integrations | List Integrations |
update_integration | PUT /v2/integrations/{id} | Update Integration |
SuccessResponse authenticate_integration(body)
Authenticate Integration
Authenticates integration with given type
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
body = swagger_client.AuthenticateIntegrationPayload() # AuthenticateIntegrationPayload | Request payload to authenticate integration
try:
# Authenticate Integration
api_response = api_instance.authenticate_integration(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->authenticate_integration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | AuthenticateIntegrationPayload | Request payload to authenticate integration |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateIntegrationResponse create_integration(body)
Create Integration
Creates a new integration
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
body = swagger_client.Integration() # Integration | Request payload of created integration
try:
# Create Integration
api_response = api_instance.create_integration(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->create_integration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Integration | Request payload of created integration |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse delete_integration(id)
Delete Integration
Delete integration with given id
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | Integration Id
try:
# Delete Integration
api_response = api_instance.delete_integration(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->delete_integration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Integration Id |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DisableIntegrationResponse disable_integration(id)
Disable Integration
Disable integration with given ID
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | Integration Id
try:
# Disable Integration
api_response = api_instance.disable_integration(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->disable_integration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Integration Id |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnableIntegrationResponse enable_integration(id)
Enable Integration
Enable integration with given ID
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | Integration Id
try:
# Enable Integration
api_response = api_instance.enable_integration(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->enable_integration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Integration Id |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetIntegrationResponse get_integration(id)
Get Integration
Returns integration with given id
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | Integration Id
try:
# Get Integration
api_response = api_instance.get_integration(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->get_integration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Integration Id |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListIntegrationsResponse list_integrations(type=type, team_id=team_id, team_name=team_name)
List Integrations
Returns list of integrations with given parameters
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
type = 'type_example' # str | Type of the integration (For instance, \"API\" for API Integration). If type parameter is given, the result will be filtered by type (optional)
team_id = 'team_id_example' # str | The ID of the team. If the team ID parameter is given, the result will be filtered by teamId (optional)
team_name = 'team_name_example' # str | The name of the team. If the team name parameter is given, the result will be filtered by teamName (optional)
try:
# List Integrations
api_response = api_instance.list_integrations(type=type, team_id=team_id, team_name=team_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->list_integrations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
type | str | Type of the integration (For instance, "API" for API Integration). If type parameter is given, the result will be filtered by type | [optional] |
team_id | str | The ID of the team. If the team ID parameter is given, the result will be filtered by teamId | [optional] |
team_name | str | The name of the team. If the team name parameter is given, the result will be filtered by teamName | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateIntegrationResponse update_integration(id, body)
Update Integration
Update integration with given id
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: GenieKey
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.IntegrationApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | Integration Id
body = swagger_client.Integration() # Integration | Request payload of update integration action
try:
# Update Integration
api_response = api_instance.update_integration(id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling IntegrationApi->update_integration: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Integration Id | |
body | Integration | Request payload of update integration action |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]