All URIs are relative to https://api.opsgenie.com
Method | HTTP request | Description |
---|---|---|
create_schedule_rotation | POST /v2/schedules/{identifier}/rotations | Create Schedule Rotation |
delete_schedule_rotation | DELETE /v2/schedules/{identifier}/rotations/{id} | Delete Schedule Rotation |
get_schedule_rotation | GET /v2/schedules/{identifier}/rotations/{id} | Get Schedule Rotation |
list_schedule_rotations | GET /v2/schedules/{identifier}/rotations | List Schedule Rotations |
update_schedule_rotation | PATCH /v2/schedules/{identifier}/rotations/{id} | Update Schedule Rotation (Partial) |
SuccessResponse create_schedule_rotation(identifier, body, schedule_identifier_type=schedule_identifier_type)
Create Schedule Rotation
Creates a new schedule rotation
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.ScheduleRotationApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of schedule which could be id or name
body = swagger_client.CreateScheduleRotationPayload() # CreateScheduleRotationPayload | Request payload of created schedule rotation
schedule_identifier_type = 'id' # str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' (optional) (default to id)
try:
# Create Schedule Rotation
api_response = api_instance.create_schedule_rotation(identifier, body, schedule_identifier_type=schedule_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScheduleRotationApi->create_schedule_rotation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of schedule which could be id or name | |
body | CreateScheduleRotationPayload | Request payload of created schedule rotation | |
schedule_identifier_type | str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' | [optional] [default to id] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse delete_schedule_rotation(identifier, id, schedule_identifier_type=schedule_identifier_type)
Delete Schedule Rotation
Delete schedule rotation with given identifier
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.ScheduleRotationApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of schedule which could be id or name
id = 'id_example' # str | Identifier of schedule rotation
schedule_identifier_type = 'id' # str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' (optional) (default to id)
try:
# Delete Schedule Rotation
api_response = api_instance.delete_schedule_rotation(identifier, id, schedule_identifier_type=schedule_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScheduleRotationApi->delete_schedule_rotation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of schedule which could be id or name | |
id | str | Identifier of schedule rotation | |
schedule_identifier_type | str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' | [optional] [default to id] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetScheduleRotationResponse get_schedule_rotation(identifier, id, schedule_identifier_type=schedule_identifier_type)
Get Schedule Rotation
Returns schedule rotation 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.ScheduleRotationApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of schedule which could be id or name
id = 'id_example' # str | Identifier of schedule rotation
schedule_identifier_type = 'id' # str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' (optional) (default to id)
try:
# Get Schedule Rotation
api_response = api_instance.get_schedule_rotation(identifier, id, schedule_identifier_type=schedule_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScheduleRotationApi->get_schedule_rotation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of schedule which could be id or name | |
id | str | Identifier of schedule rotation | |
schedule_identifier_type | str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' | [optional] [default to id] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListScheduleRotationsResponse list_schedule_rotations(identifier, schedule_identifier_type=schedule_identifier_type)
List Schedule Rotations
Returns list of schedule rotations
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.ScheduleRotationApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of schedule which could be id or name
schedule_identifier_type = 'id' # str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' (optional) (default to id)
try:
# List Schedule Rotations
api_response = api_instance.list_schedule_rotations(identifier, schedule_identifier_type=schedule_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScheduleRotationApi->list_schedule_rotations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of schedule which could be id or name | |
schedule_identifier_type | str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' | [optional] [default to id] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessResponse update_schedule_rotation(identifier, id, body, schedule_identifier_type=schedule_identifier_type)
Update Schedule Rotation (Partial)
Update schedule rotation 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.ScheduleRotationApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of schedule which could be id or name
id = 'id_example' # str | Identifier of schedule rotation
body = swagger_client.UpdateScheduleRotationPayload() # UpdateScheduleRotationPayload | Request payload of update schedule rotation action
schedule_identifier_type = 'id' # str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' (optional) (default to id)
try:
# Update Schedule Rotation (Partial)
api_response = api_instance.update_schedule_rotation(identifier, id, body, schedule_identifier_type=schedule_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScheduleRotationApi->update_schedule_rotation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of schedule which could be id or name | |
id | str | Identifier of schedule rotation | |
body | UpdateScheduleRotationPayload | Request payload of update schedule rotation action | |
schedule_identifier_type | str | Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name' | [optional] [default to id] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]