mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-08-04 00:46:52 +00:00
2248 lines
82 KiB
Python
2248 lines
82 KiB
Python
# coding: utf-8
|
||
|
||
"""
|
||
Alerts API
|
||
|
||
**Note:** API operations for the creation or retrieval of API, Page Load, or Web-Transaction alert rules are not available for ThousandEyes for Government instance. You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
|
||
|
||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||
|
||
Do not edit the class manually.
|
||
""" # noqa: E501
|
||
|
||
|
||
import json
|
||
|
||
from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation
|
||
|
||
OPERATION_MANIFEST = {
|
||
|
||
"create_alert_rule": OperationExpectation(
|
||
operation_id="create_alert_rule",
|
||
method="POST",
|
||
path="/alerts/rules",
|
||
path_param_examples={
|
||
},
|
||
success_status=201,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"severity" : "major",
|
||
"expression" : "((hops((hopDelay >= 100 ms))))",
|
||
"alertType" : "http-server",
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"includeCoveredPrefixes" : true,
|
||
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
|
||
"description" : "A rule description string",
|
||
"roundsViolatingMode" : "exact",
|
||
"sensitivityLevel" : "medium",
|
||
"alertGroupType" : "endpoint",
|
||
"notifyOnClear" : true,
|
||
"testIds" : [ "281474976710706", "271659" ],
|
||
"roundsViolatingOutOf" : 5,
|
||
"roundsViolatingRequired" : 2,
|
||
"isDefault" : true,
|
||
"endpointAgentIds" : [ "281474976710706", "281474976710706" ],
|
||
"minimumSourcesPct" : 99,
|
||
"ruleName" : "The End of the Internet",
|
||
"endpointLabelIds" : [ "123456", "123456" ],
|
||
"minimumSources" : 10,
|
||
"ruleId" : "127094",
|
||
"notifications" : {
|
||
"thirdParty" : [ {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
}, {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
} ],
|
||
"webhook" : [ {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ],
|
||
"email" : {
|
||
"recipients" : [ "noreply@thousandeyes.com" ],
|
||
"message" : "Notification message"
|
||
},
|
||
"customWebhook" : [ {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ]
|
||
},
|
||
"direction" : "to-target"
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=json.loads("""
|
||
|
||
{
|
||
"severity" : "major",
|
||
"expression" : "((hops((hopDelay >= 100 ms))))",
|
||
"alertType" : "http-server",
|
||
"includeCoveredPrefixes" : true,
|
||
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
|
||
"description" : "A rule description string",
|
||
"roundsViolatingMode" : "exact",
|
||
"sensitivityLevel" : "medium",
|
||
"alertGroupType" : "endpoint",
|
||
"notifyOnClear" : true,
|
||
"testIds" : [ "281474976710706", "271659" ],
|
||
"roundsViolatingOutOf" : 5,
|
||
"roundsViolatingRequired" : 2,
|
||
"isDefault" : true,
|
||
"endpointAgentIds" : [ "281474976710706", "281474976710706" ],
|
||
"minimumSourcesPct" : 99,
|
||
"ruleName" : "The End of the Internet",
|
||
"endpointLabelIds" : [ "123456", "123456" ],
|
||
"minimumSources" : 10,
|
||
"ruleId" : "127094",
|
||
"notifications" : {
|
||
"thirdParty" : [ {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
}, {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
} ],
|
||
"webhook" : [ {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ],
|
||
"email" : {
|
||
"recipients" : [ "noreply@thousandeyes.com" ],
|
||
"message" : "Notification message"
|
||
},
|
||
"customWebhook" : [ {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ]
|
||
},
|
||
"direction" : "to-target"
|
||
}
|
||
|
||
"""),
|
||
error_responses={
|
||
|
||
"400": ErrorResponseExpectation(
|
||
status=400,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"errors" : [ {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
}, {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
} ],
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"delete_alert_rule": OperationExpectation(
|
||
operation_id="delete_alert_rule",
|
||
method="DELETE",
|
||
path="/alerts/rules/{ruleId}",
|
||
path_param_examples={
|
||
"ruleId": '127094',
|
||
},
|
||
success_status=204,
|
||
success_body=None,
|
||
success_content_type="application/json",
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"400": ErrorResponseExpectation(
|
||
status=400,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"errors" : [ {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
}, {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
} ],
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"get_alert_rule": OperationExpectation(
|
||
operation_id="get_alert_rule",
|
||
method="GET",
|
||
path="/alerts/rules/{ruleId}",
|
||
path_param_examples={
|
||
"ruleId": '127094',
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"severity" : "major",
|
||
"expression" : "((hops((hopDelay >= 100 ms))))",
|
||
"alertType" : "http-server",
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"includeCoveredPrefixes" : true,
|
||
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
|
||
"description" : "A rule description string",
|
||
"roundsViolatingMode" : "exact",
|
||
"sensitivityLevel" : "medium",
|
||
"alertGroupType" : "endpoint",
|
||
"notifyOnClear" : true,
|
||
"testIds" : [ "281474976710706", "271659" ],
|
||
"roundsViolatingOutOf" : 5,
|
||
"roundsViolatingRequired" : 2,
|
||
"isDefault" : true,
|
||
"endpointAgentIds" : [ "281474976710706", "281474976710706" ],
|
||
"tests" : [ {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
}, {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
} ],
|
||
"minimumSourcesPct" : 99,
|
||
"ruleName" : "The End of the Internet",
|
||
"endpointLabelIds" : [ "123456", "123456" ],
|
||
"minimumSources" : 10,
|
||
"ruleId" : "127094",
|
||
"notifications" : {
|
||
"thirdParty" : [ {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
}, {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
} ],
|
||
"webhook" : [ {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ],
|
||
"email" : {
|
||
"recipients" : [ "noreply@thousandeyes.com" ],
|
||
"message" : "Notification message"
|
||
},
|
||
"customWebhook" : [ {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ]
|
||
},
|
||
"direction" : "to-target"
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"get_alerts_rules": OperationExpectation(
|
||
operation_id="get_alerts_rules",
|
||
method="GET",
|
||
path="/alerts/rules",
|
||
path_param_examples={
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"alertRules" : [ {
|
||
"severity" : "major",
|
||
"expression" : "((hops((hopDelay >= 100 ms))))",
|
||
"alertType" : "http-server",
|
||
"includeCoveredPrefixes" : true,
|
||
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
|
||
"description" : "A rule description string",
|
||
"roundsViolatingMode" : "exact",
|
||
"sensitivityLevel" : "medium",
|
||
"alertGroupType" : "endpoint",
|
||
"notifyOnClear" : true,
|
||
"roundsViolatingOutOf" : 5,
|
||
"roundsViolatingRequired" : 2,
|
||
"isDefault" : true,
|
||
"endpointAgentIds" : [ "281474976710706", "281474976710706" ],
|
||
"minimumSourcesPct" : 99,
|
||
"ruleName" : "The End of the Internet",
|
||
"endpointLabelIds" : [ "123456", "123456" ],
|
||
"minimumSources" : 10,
|
||
"ruleId" : "127094",
|
||
"direction" : "to-target"
|
||
}, {
|
||
"severity" : "major",
|
||
"expression" : "((hops((hopDelay >= 100 ms))))",
|
||
"alertType" : "http-server",
|
||
"includeCoveredPrefixes" : true,
|
||
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
|
||
"description" : "A rule description string",
|
||
"roundsViolatingMode" : "exact",
|
||
"sensitivityLevel" : "medium",
|
||
"alertGroupType" : "endpoint",
|
||
"notifyOnClear" : true,
|
||
"roundsViolatingOutOf" : 5,
|
||
"roundsViolatingRequired" : 2,
|
||
"isDefault" : true,
|
||
"endpointAgentIds" : [ "281474976710706", "281474976710706" ],
|
||
"minimumSourcesPct" : 99,
|
||
"ruleName" : "The End of the Internet",
|
||
"endpointLabelIds" : [ "123456", "123456" ],
|
||
"minimumSources" : 10,
|
||
"ruleId" : "127094",
|
||
"direction" : "to-target"
|
||
} ]
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"update_alert_rule": OperationExpectation(
|
||
operation_id="update_alert_rule",
|
||
method="PUT",
|
||
path="/alerts/rules/{ruleId}",
|
||
path_param_examples={
|
||
"ruleId": '127094',
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"severity" : "major",
|
||
"expression" : "((hops((hopDelay >= 100 ms))))",
|
||
"alertType" : "http-server",
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"includeCoveredPrefixes" : true,
|
||
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
|
||
"description" : "A rule description string",
|
||
"roundsViolatingMode" : "exact",
|
||
"sensitivityLevel" : "medium",
|
||
"alertGroupType" : "endpoint",
|
||
"notifyOnClear" : true,
|
||
"testIds" : [ "281474976710706", "271659" ],
|
||
"roundsViolatingOutOf" : 5,
|
||
"roundsViolatingRequired" : 2,
|
||
"isDefault" : true,
|
||
"endpointAgentIds" : [ "281474976710706", "281474976710706" ],
|
||
"minimumSourcesPct" : 99,
|
||
"ruleName" : "The End of the Internet",
|
||
"endpointLabelIds" : [ "123456", "123456" ],
|
||
"minimumSources" : 10,
|
||
"ruleId" : "127094",
|
||
"notifications" : {
|
||
"thirdParty" : [ {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
}, {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
} ],
|
||
"webhook" : [ {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ],
|
||
"email" : {
|
||
"recipients" : [ "noreply@thousandeyes.com" ],
|
||
"message" : "Notification message"
|
||
},
|
||
"customWebhook" : [ {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ]
|
||
},
|
||
"direction" : "to-target"
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=json.loads("""
|
||
|
||
{
|
||
"severity" : "major",
|
||
"expression" : "((hops((hopDelay >= 100 ms))))",
|
||
"alertType" : "http-server",
|
||
"includeCoveredPrefixes" : true,
|
||
"visitedSitesFilter" : [ "app.thousandeyes.com" ],
|
||
"description" : "A rule description string",
|
||
"roundsViolatingMode" : "exact",
|
||
"sensitivityLevel" : "medium",
|
||
"alertGroupType" : "endpoint",
|
||
"notifyOnClear" : true,
|
||
"testIds" : [ "281474976710706", "271659" ],
|
||
"roundsViolatingOutOf" : 5,
|
||
"roundsViolatingRequired" : 2,
|
||
"isDefault" : true,
|
||
"endpointAgentIds" : [ "281474976710706", "281474976710706" ],
|
||
"minimumSourcesPct" : 99,
|
||
"ruleName" : "The End of the Internet",
|
||
"endpointLabelIds" : [ "123456", "123456" ],
|
||
"minimumSources" : 10,
|
||
"ruleId" : "127094",
|
||
"notifications" : {
|
||
"thirdParty" : [ {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
}, {
|
||
"integrationType" : "slack",
|
||
"integrationId" : "sl-101"
|
||
} ],
|
||
"webhook" : [ {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "wb-201",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ],
|
||
"email" : {
|
||
"recipients" : [ "noreply@thousandeyes.com" ],
|
||
"message" : "Notification message"
|
||
},
|
||
"customWebhook" : [ {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
}, {
|
||
"integrationType" : "custom-webhook",
|
||
"integrationName" : "My webhook",
|
||
"integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87",
|
||
"target" : "https://example.com/test/webhooks/notifications"
|
||
} ]
|
||
},
|
||
"direction" : "to-target"
|
||
}
|
||
|
||
"""),
|
||
error_responses={
|
||
|
||
"400": ErrorResponseExpectation(
|
||
status=400,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"errors" : [ {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
}, {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
} ],
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"create_alert_suppression_window": OperationExpectation(
|
||
operation_id="create_alert_suppression_window",
|
||
method="POST",
|
||
path="/alert-suppression-windows",
|
||
path_param_examples={
|
||
},
|
||
success_status=201,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"duration" : 0,
|
||
"alertSuppressionWindowId" : "2411",
|
||
"tests" : [ {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
}, {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
} ],
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"isEnabled" : false,
|
||
"repeat" : {
|
||
"intervalType" : "day",
|
||
"intervalLength" : 2,
|
||
"type" : "week",
|
||
"daysOfWeek" : [ "sun", "sun" ]
|
||
},
|
||
"endRepeat" : {
|
||
"date" : "2017-07-01",
|
||
"count" : 3,
|
||
"type" : "never"
|
||
},
|
||
"name" : "Monthly maintenance",
|
||
"startDate" : "2017-07-01T05:00:00Z",
|
||
"status" : "ended"
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=json.loads("""
|
||
|
||
{
|
||
"duration" : 0,
|
||
"testIds" : [ "71687", "71687" ],
|
||
"alertSuppressionWindowId" : "2411",
|
||
"isEnabled" : false,
|
||
"repeat" : {
|
||
"intervalType" : "day",
|
||
"intervalLength" : 2,
|
||
"type" : "week",
|
||
"daysOfWeek" : [ "sun", "sun" ]
|
||
},
|
||
"endRepeat" : {
|
||
"date" : "2017-07-01",
|
||
"count" : 3,
|
||
"type" : "never"
|
||
},
|
||
"name" : "Monthly maintenance",
|
||
"startDate" : "2017-07-01T05:00:00Z",
|
||
"status" : "ended"
|
||
}
|
||
|
||
"""),
|
||
error_responses={
|
||
|
||
"400": ErrorResponseExpectation(
|
||
status=400,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"errors" : [ {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
}, {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
} ],
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"delete_alert_suppression_window": OperationExpectation(
|
||
operation_id="delete_alert_suppression_window",
|
||
method="DELETE",
|
||
path="/alert-suppression-windows/{windowId}",
|
||
path_param_examples={
|
||
"windowId": '2411',
|
||
},
|
||
success_status=204,
|
||
success_body=None,
|
||
success_content_type="application/json",
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"400": ErrorResponseExpectation(
|
||
status=400,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"errors" : [ {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
}, {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
} ],
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"get_alert_suppression_window": OperationExpectation(
|
||
operation_id="get_alert_suppression_window",
|
||
method="GET",
|
||
path="/alert-suppression-windows/{windowId}",
|
||
path_param_examples={
|
||
"windowId": '2411',
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"duration" : 0,
|
||
"alertSuppressionWindowId" : "2411",
|
||
"tests" : [ {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
}, {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
} ],
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"isEnabled" : false,
|
||
"repeat" : {
|
||
"intervalType" : "day",
|
||
"intervalLength" : 2,
|
||
"type" : "week",
|
||
"daysOfWeek" : [ "sun", "sun" ]
|
||
},
|
||
"endRepeat" : {
|
||
"date" : "2017-07-01",
|
||
"count" : 3,
|
||
"type" : "never"
|
||
},
|
||
"name" : "Monthly maintenance",
|
||
"startDate" : "2017-07-01T05:00:00Z",
|
||
"status" : "ended"
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"get_alert_suppression_windows": OperationExpectation(
|
||
operation_id="get_alert_suppression_windows",
|
||
method="GET",
|
||
path="/alert-suppression-windows",
|
||
path_param_examples={
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"alertSuppressionWindows" : [ {
|
||
"duration" : 0,
|
||
"alertSuppressionWindowId" : "2411",
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"isEnabled" : false,
|
||
"repeat" : {
|
||
"intervalType" : "day",
|
||
"intervalLength" : 2,
|
||
"type" : "week",
|
||
"daysOfWeek" : [ "sun", "sun" ]
|
||
},
|
||
"endRepeat" : {
|
||
"date" : "2017-07-01",
|
||
"count" : 3,
|
||
"type" : "never"
|
||
},
|
||
"name" : "Monthly maintenance",
|
||
"startDate" : "2017-07-01T05:00:00Z",
|
||
"status" : "ended"
|
||
}, {
|
||
"duration" : 0,
|
||
"alertSuppressionWindowId" : "2411",
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"isEnabled" : false,
|
||
"repeat" : {
|
||
"intervalType" : "day",
|
||
"intervalLength" : 2,
|
||
"type" : "week",
|
||
"daysOfWeek" : [ "sun", "sun" ]
|
||
},
|
||
"endRepeat" : {
|
||
"date" : "2017-07-01",
|
||
"count" : 3,
|
||
"type" : "never"
|
||
},
|
||
"name" : "Monthly maintenance",
|
||
"startDate" : "2017-07-01T05:00:00Z",
|
||
"status" : "ended"
|
||
} ]
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"update_alert_suppression_window": OperationExpectation(
|
||
operation_id="update_alert_suppression_window",
|
||
method="PUT",
|
||
path="/alert-suppression-windows/{windowId}",
|
||
path_param_examples={
|
||
"windowId": '2411',
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"duration" : 0,
|
||
"alertSuppressionWindowId" : "2411",
|
||
"tests" : [ {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
}, {
|
||
"_links" : {
|
||
"testResults" : [ {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network"
|
||
}, {
|
||
"href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"
|
||
} ],
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"liveShare" : false,
|
||
"savedEvent" : true,
|
||
"description" : "ThousandEyes Test",
|
||
"type" : "agent-to-server",
|
||
"enabled" : true,
|
||
"createdDate" : "2022-07-17T22:00:54Z",
|
||
"createdBy" : "user@user.com",
|
||
"modifiedDate" : "2022-07-17T22:00:54Z",
|
||
"interval" : 60,
|
||
"modifiedBy" : "user@user.com",
|
||
"testId" : "281474976710706",
|
||
"alertsEnabled" : true,
|
||
"testName" : "ThousandEyes Test"
|
||
} ],
|
||
"_links" : {
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"isEnabled" : false,
|
||
"repeat" : {
|
||
"intervalType" : "day",
|
||
"intervalLength" : 2,
|
||
"type" : "week",
|
||
"daysOfWeek" : [ "sun", "sun" ]
|
||
},
|
||
"endRepeat" : {
|
||
"date" : "2017-07-01",
|
||
"count" : 3,
|
||
"type" : "never"
|
||
},
|
||
"name" : "Monthly maintenance",
|
||
"startDate" : "2017-07-01T05:00:00Z",
|
||
"status" : "ended"
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=json.loads("""
|
||
|
||
{
|
||
"duration" : 0,
|
||
"testIds" : [ "71687", "71687" ],
|
||
"alertSuppressionWindowId" : "2411",
|
||
"isEnabled" : false,
|
||
"repeat" : {
|
||
"intervalType" : "day",
|
||
"intervalLength" : 2,
|
||
"type" : "week",
|
||
"daysOfWeek" : [ "sun", "sun" ]
|
||
},
|
||
"endRepeat" : {
|
||
"date" : "2017-07-01",
|
||
"count" : 3,
|
||
"type" : "never"
|
||
},
|
||
"name" : "Monthly maintenance",
|
||
"startDate" : "2017-07-01T05:00:00Z",
|
||
"status" : "ended"
|
||
}
|
||
|
||
"""),
|
||
error_responses={
|
||
|
||
"400": ErrorResponseExpectation(
|
||
status=400,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"errors" : [ {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
}, {
|
||
"code" : "code",
|
||
"field" : "field",
|
||
"message" : "message"
|
||
} ],
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"get_alert": OperationExpectation(
|
||
operation_id="get_alert",
|
||
method="GET",
|
||
path="/alerts/{alertId}",
|
||
path_param_examples={
|
||
"alertId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569',
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"severity" : "major",
|
||
"alertType" : "http-server",
|
||
"endDate" : "2022-07-18T22:00:54Z",
|
||
"_links" : {
|
||
"appLink" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"test" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"rule" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"alertSeverity" : "major",
|
||
"duration" : 60,
|
||
"violationCount" : 2,
|
||
"_embedded" : {
|
||
"asn" : {
|
||
"name" : "Cisco Webex LLC",
|
||
"id" : "13445",
|
||
"type" : "asn"
|
||
}
|
||
},
|
||
"meta" : {
|
||
"version" : 1
|
||
},
|
||
"details" : [ {
|
||
"name" : "Bucharest, Romania",
|
||
"start" : {
|
||
"metrics" : "metrics"
|
||
},
|
||
"end" : {
|
||
"metrics" : "metrics"
|
||
},
|
||
"id" : "3379",
|
||
"state" : "trigger",
|
||
"type" : "cea_agent"
|
||
}, {
|
||
"name" : "Bucharest, Romania",
|
||
"start" : {
|
||
"metrics" : "metrics"
|
||
},
|
||
"end" : {
|
||
"metrics" : "metrics"
|
||
},
|
||
"id" : "3379",
|
||
"state" : "trigger",
|
||
"type" : "cea_agent"
|
||
} ],
|
||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||
"suppressed" : false,
|
||
"state" : "trigger",
|
||
"alertState" : "trigger",
|
||
"startDate" : "2022-07-17T22:00:54Z"
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
"get_alerts": OperationExpectation(
|
||
operation_id="get_alerts",
|
||
method="GET",
|
||
path="/alerts",
|
||
path_param_examples={
|
||
},
|
||
success_status=200,
|
||
success_body=json.loads("""
|
||
|
||
{
|
||
"alerts" : [ {
|
||
"severity" : "MAJOR",
|
||
"alertType" : "http-server",
|
||
"endDate" : "2022-07-18T22:00:54Z",
|
||
"_links" : {
|
||
"appLink" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"test" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"rule" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"apiLinks" : [ {
|
||
"key" : ""
|
||
}, {
|
||
"key" : ""
|
||
} ],
|
||
"alertSeverity" : "major",
|
||
"dateEnd" : "2020-04-23 13:43:16",
|
||
"duration" : 60,
|
||
"violationCount" : 2,
|
||
"dateStart" : "2020-04-23 13:43:16",
|
||
"meta" : {
|
||
"version" : 1
|
||
},
|
||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||
"suppressed" : false,
|
||
"alertId" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||
"state" : "ACTIVE",
|
||
"ruleId" : 127094,
|
||
"permalink" : "https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12",
|
||
"alertState" : "trigger",
|
||
"startDate" : "2022-07-17T22:00:54Z",
|
||
"alertRuleId" : "127094"
|
||
}, {
|
||
"severity" : "MAJOR",
|
||
"alertType" : "http-server",
|
||
"endDate" : "2022-07-18T22:00:54Z",
|
||
"_links" : {
|
||
"appLink" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"test" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"rule" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
},
|
||
"apiLinks" : [ {
|
||
"key" : ""
|
||
}, {
|
||
"key" : ""
|
||
} ],
|
||
"alertSeverity" : "major",
|
||
"dateEnd" : "2020-04-23 13:43:16",
|
||
"duration" : 60,
|
||
"violationCount" : 2,
|
||
"dateStart" : "2020-04-23 13:43:16",
|
||
"meta" : {
|
||
"version" : 1
|
||
},
|
||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||
"suppressed" : false,
|
||
"alertId" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||
"state" : "ACTIVE",
|
||
"ruleId" : 127094,
|
||
"permalink" : "https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12",
|
||
"alertState" : "trigger",
|
||
"startDate" : "2022-07-17T22:00:54Z",
|
||
"alertRuleId" : "127094"
|
||
} ],
|
||
"_links" : {
|
||
"next" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"previous" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
},
|
||
"self" : {
|
||
"hreflang" : "hreflang",
|
||
"templated" : true,
|
||
"profile" : "profile",
|
||
"name" : "name",
|
||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||
"type" : "type",
|
||
"deprecation" : "deprecation",
|
||
"title" : "title"
|
||
}
|
||
}
|
||
}
|
||
|
||
"""),
|
||
|
||
success_content_type="application/json",
|
||
|
||
request_body_example=None,
|
||
error_responses={
|
||
|
||
"401": ErrorResponseExpectation(
|
||
status=401,
|
||
body=json.loads("""
|
||
{
|
||
"error_description" : "Invalid access token",
|
||
"error" : "invalid_token"
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"403": ErrorResponseExpectation(
|
||
status=403,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"404": ErrorResponseExpectation(
|
||
status=404,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"429": ErrorResponseExpectation(
|
||
status=429,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
"500": ErrorResponseExpectation(
|
||
status=500,
|
||
body=json.loads("""
|
||
{
|
||
"instance" : "instance",
|
||
"detail" : "detail",
|
||
"type" : "type",
|
||
"title" : "title",
|
||
"status" : 0
|
||
}"""),
|
||
content_type="application/json",
|
||
),
|
||
|
||
},
|
||
),
|
||
|
||
}
|