All URIs are relative to https://api.opsgenie.com
Method | HTTP request | Description |
---|---|---|
change_team_routing_rule_order | POST /v2/teams/{identifier}/routing-rules/{id}/change-order | Change Team Routing Rule Order |
create_team_routing_rule | POST /v2/teams/{identifier}/routing-rules | Create Team Routing Rule |
delete_team_routing_rule | DELETE /v2/teams/{identifier}/routing-rules/{id} | Delete Team Routing Rule |
get_team_routing_rule | GET /v2/teams/{identifier}/routing-rules/{id} | Get Team Routing Rule |
list_team_routing_rules | GET /v2/teams/{identifier}/routing-rules | List Team Routing Rules |
update_team_routing_rule | PATCH /v2/teams/{identifier}/routing-rules/{id} | Update Team Routing Rule (Partial) |
SuccessResponse change_team_routing_rule_order(identifier, id, body, team_identifier_type=team_identifier_type)
Change Team Routing Rule Order
Change the order of team routing rule 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.TeamRoutingRuleApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the team
id = 'id_example' # str | Id of the team routing rule
body = swagger_client.ChangeTeamRoutingRuleOrderPayload() # ChangeTeamRoutingRuleOrderPayload | Request payload of change team routing rule order action
team_identifier_type = 'id' # str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' (optional) (default to id)
try:
# Change Team Routing Rule Order
api_response = api_instance.change_team_routing_rule_order(identifier, id, body, team_identifier_type=team_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TeamRoutingRuleApi->change_team_routing_rule_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the team | |
id | str | Id of the team routing rule | |
body | ChangeTeamRoutingRuleOrderPayload | Request payload of change team routing rule order action | |
team_identifier_type | str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' | [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 create_team_routing_rule(identifier, body, team_identifier_type=team_identifier_type)
Create Team Routing Rule
Creates a new team routing rule
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.TeamRoutingRuleApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the team
body = swagger_client.CreateTeamRoutingRulePayload() # CreateTeamRoutingRulePayload | Request payload of createTeamRoutingRule
team_identifier_type = 'id' # str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' (optional) (default to id)
try:
# Create Team Routing Rule
api_response = api_instance.create_team_routing_rule(identifier, body, team_identifier_type=team_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TeamRoutingRuleApi->create_team_routing_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the team | |
body | CreateTeamRoutingRulePayload | Request payload of createTeamRoutingRule | |
team_identifier_type | str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' | [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_team_routing_rule(identifier, id, team_identifier_type=team_identifier_type)
Delete Team Routing Rule
Delete team routing rule 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.TeamRoutingRuleApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the team
id = 'id_example' # str | Id of the team routing rule
team_identifier_type = 'id' # str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' (optional) (default to id)
try:
# Delete Team Routing Rule
api_response = api_instance.delete_team_routing_rule(identifier, id, team_identifier_type=team_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TeamRoutingRuleApi->delete_team_routing_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the team | |
id | str | Id of the team routing rule | |
team_identifier_type | str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' | [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]
GetTeamRoutingRuleResponse get_team_routing_rule(identifier, id, team_identifier_type=team_identifier_type)
Get Team Routing Rule
Returns team routing rule 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.TeamRoutingRuleApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the team
id = 'id_example' # str | Id of the team routing rule
team_identifier_type = 'id' # str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' (optional) (default to id)
try:
# Get Team Routing Rule
api_response = api_instance.get_team_routing_rule(identifier, id, team_identifier_type=team_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TeamRoutingRuleApi->get_team_routing_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the team | |
id | str | Id of the team routing rule | |
team_identifier_type | str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' | [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]
ListTeamRoutingRulesResponse list_team_routing_rules(identifier, team_identifier_type=team_identifier_type)
List Team Routing Rules
Returns list of team routing rules
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.TeamRoutingRuleApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the team
team_identifier_type = 'id' # str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' (optional) (default to id)
try:
# List Team Routing Rules
api_response = api_instance.list_team_routing_rules(identifier, team_identifier_type=team_identifier_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TeamRoutingRuleApi->list_team_routing_rules: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the team | |
team_identifier_type | str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' | [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_team_routing_rule(identifier, id, team_identifier_type=team_identifier_type, body=body)
Update Team Routing Rule (Partial)
Update routing rule of the team
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.TeamRoutingRuleApi(swagger_client.ApiClient(configuration))
identifier = 'identifier_example' # str | Identifier of the team
id = 'id_example' # str | Id of the team routing rule
team_identifier_type = 'id' # str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' (optional) (default to id)
body = swagger_client.UpdateTeamRoutingRulePayload() # UpdateTeamRoutingRulePayload | Request payload of update Team Routing Rule action (optional)
try:
# Update Team Routing Rule (Partial)
api_response = api_instance.update_team_routing_rule(identifier, id, team_identifier_type=team_identifier_type, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TeamRoutingRuleApi->update_team_routing_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | Identifier of the team | |
id | str | Id of the team routing rule | |
team_identifier_type | str | Type of the identifier. Possible values are 'id' and 'name'. Default value is 'id' | [optional] [default to id] |
body | UpdateTeamRoutingRulePayload | Request payload of update Team Routing Rule action | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]