mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-08-04 00:46:52 +00:00
Sync OAS-driven integration test artifacts (mock manifest, test base, conftest, and per-operation integration tests) across 21 packages for CP-2453 full rollout evaluation. Co-authored-by: Cursor <cursoragent@cursor.com>
3022 lines
98 KiB
Python
3022 lines
98 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
Integrations API
|
|
|
|
**Note:** The Webhook Operations APIs are not available for ThousandEyes for Government instance. Manage connectors and operations.
|
|
|
|
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_credential_vault_operation": OperationExpectation(
|
|
operation_id="create_credential_vault_operation",
|
|
method="POST",
|
|
path="/operations/credential-vault",
|
|
path_param_examples={
|
|
},
|
|
success_status=201,
|
|
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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "webhook",
|
|
"secrets" : [ {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
}, {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
} ],
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "webhook",
|
|
"secrets" : [ {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
}, {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
} ],
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"delete_credential_vault_operation": OperationExpectation(
|
|
operation_id="delete_credential_vault_operation",
|
|
method="DELETE",
|
|
path="/operations/credential-vault/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_credential_vault_operation": OperationExpectation(
|
|
operation_id="get_credential_vault_operation",
|
|
method="GET",
|
|
path="/operations/credential-vault/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "webhook",
|
|
"secrets" : [ {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
}, {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
} ],
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_credential_vault_operations": OperationExpectation(
|
|
operation_id="get_credential_vault_operations",
|
|
method="GET",
|
|
path="/operations/credential-vault",
|
|
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"
|
|
}
|
|
},
|
|
"items" : [ {
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "webhook",
|
|
"secrets" : [ {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
}, {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
} ],
|
|
"status" : "pending"
|
|
}, {
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "webhook",
|
|
"secrets" : [ {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
}, {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
} ],
|
|
"status" : "pending"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"update_credential_vault_operation": OperationExpectation(
|
|
operation_id="update_credential_vault_operation",
|
|
method="PUT",
|
|
path="/operations/credential-vault/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "webhook",
|
|
"secrets" : [ {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
}, {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
} ],
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "webhook",
|
|
"secrets" : [ {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
}, {
|
|
"secretKey" : "secret/key",
|
|
"name" : "secret_name",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf"
|
|
} ],
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"create_conjur_connector": OperationExpectation(
|
|
operation_id="create_conjur_connector",
|
|
method="POST",
|
|
path="/connectors/conjur",
|
|
path_param_examples={
|
|
},
|
|
success_status=201,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"account" : "My CyberArk Account",
|
|
"target" : "https://eval.conjur.org/secrets",
|
|
"authentication" : {
|
|
"apiKey" : "abc123",
|
|
"hostId" : "host1",
|
|
"type" : "basic"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"account" : "My CyberArk Account",
|
|
"target" : "https://eval.conjur.org/secrets",
|
|
"authentication" : {
|
|
"apiKey" : "abc123",
|
|
"hostId" : "host1",
|
|
"type" : "basic"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"delete_conjur_connector": OperationExpectation(
|
|
operation_id="delete_conjur_connector",
|
|
method="DELETE",
|
|
path="/connectors/conjur/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_conjur_connector": OperationExpectation(
|
|
operation_id="get_conjur_connector",
|
|
method="GET",
|
|
path="/connectors/conjur/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"account" : "My CyberArk Account",
|
|
"target" : "https://eval.conjur.org/secrets",
|
|
"authentication" : {
|
|
"apiKey" : "abc123",
|
|
"hostId" : "host1",
|
|
"type" : "basic"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_conjur_connector_operations": OperationExpectation(
|
|
operation_id="get_conjur_connector_operations",
|
|
method="GET",
|
|
path="/connectors/conjur/{id}/operations",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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"
|
|
}
|
|
},
|
|
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_conjur_connectors": OperationExpectation(
|
|
operation_id="get_conjur_connectors",
|
|
method="GET",
|
|
path="/connectors/conjur",
|
|
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"
|
|
}
|
|
},
|
|
"items" : [ {
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"account" : "My CyberArk Account",
|
|
"target" : "https://eval.conjur.org/secrets",
|
|
"authentication" : {
|
|
"apiKey" : "abc123",
|
|
"hostId" : "host1",
|
|
"type" : "basic"
|
|
}
|
|
}, {
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"account" : "My CyberArk Account",
|
|
"target" : "https://eval.conjur.org/secrets",
|
|
"authentication" : {
|
|
"apiKey" : "abc123",
|
|
"hostId" : "host1",
|
|
"type" : "basic"
|
|
}
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"update_conjur_connector": OperationExpectation(
|
|
operation_id="update_conjur_connector",
|
|
method="PUT",
|
|
path="/connectors/conjur/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"account" : "My CyberArk Account",
|
|
"target" : "https://eval.conjur.org/secrets",
|
|
"authentication" : {
|
|
"apiKey" : "abc123",
|
|
"hostId" : "host1",
|
|
"type" : "basic"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"account" : "My CyberArk Account",
|
|
"target" : "https://eval.conjur.org/secrets",
|
|
"authentication" : {
|
|
"apiKey" : "abc123",
|
|
"hostId" : "host1",
|
|
"type" : "basic"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"create_generic_connector": OperationExpectation(
|
|
operation_id="create_generic_connector",
|
|
method="POST",
|
|
path="/connectors/generic",
|
|
path_param_examples={
|
|
},
|
|
success_status=201,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"target" : "https://hooks.slack.com/services/abc/xyz",
|
|
"authentication" : {
|
|
"password" : "abc123",
|
|
"type" : "basic",
|
|
"username" : "user1"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"target" : "https://hooks.slack.com/services/abc/xyz",
|
|
"authentication" : {
|
|
"password" : "abc123",
|
|
"type" : "basic",
|
|
"username" : "user1"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"delete_generic_connector": OperationExpectation(
|
|
operation_id="delete_generic_connector",
|
|
method="DELETE",
|
|
path="/connectors/generic/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_generic_connector": OperationExpectation(
|
|
operation_id="get_generic_connector",
|
|
method="GET",
|
|
path="/connectors/generic/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"target" : "https://hooks.slack.com/services/abc/xyz",
|
|
"authentication" : {
|
|
"password" : "abc123",
|
|
"type" : "basic",
|
|
"username" : "user1"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_generic_connectors": OperationExpectation(
|
|
operation_id="get_generic_connectors",
|
|
method="GET",
|
|
path="/connectors/generic",
|
|
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"
|
|
}
|
|
},
|
|
"items" : [ {
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"target" : "https://hooks.slack.com/services/abc/xyz",
|
|
"authentication" : {
|
|
"password" : "abc123",
|
|
"type" : "basic",
|
|
"username" : "user1"
|
|
}
|
|
}, {
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"target" : "https://hooks.slack.com/services/abc/xyz",
|
|
"authentication" : {
|
|
"password" : "abc123",
|
|
"type" : "basic",
|
|
"username" : "user1"
|
|
}
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"list_generic_connector_operations": OperationExpectation(
|
|
operation_id="list_generic_connector_operations",
|
|
method="GET",
|
|
path="/connectors/generic/{id}/operations",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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"
|
|
}
|
|
},
|
|
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"update_generic_connector": OperationExpectation(
|
|
operation_id="update_generic_connector",
|
|
method="PUT",
|
|
path="/connectors/generic/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"target" : "https://hooks.slack.com/services/abc/xyz",
|
|
"authentication" : {
|
|
"password" : "abc123",
|
|
"type" : "basic",
|
|
"username" : "user1"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"lastModifiedDate" : 1770293655756,
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "Cisco Slack",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"type" : "generic",
|
|
"target" : "https://hooks.slack.com/services/abc/xyz",
|
|
"authentication" : {
|
|
"password" : "abc123",
|
|
"type" : "basic",
|
|
"username" : "user1"
|
|
}
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_operation_connectors": OperationExpectation(
|
|
operation_id="get_operation_connectors",
|
|
method="GET",
|
|
path="/operations/{type}/{id}/connectors",
|
|
path_param_examples={
|
|
"type": 'webhooks',
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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"
|
|
}
|
|
},
|
|
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"create_webhook_operation": OperationExpectation(
|
|
operation_id="create_webhook_operation",
|
|
method="POST",
|
|
path="/operations/webhooks",
|
|
path_param_examples={
|
|
},
|
|
success_status=201,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"path" : "/custom/path",
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
|
|
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"category" : "alerts",
|
|
"type" : "webhook",
|
|
"enabled" : true,
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"path" : "/custom/path",
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
|
|
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"category" : "alerts",
|
|
"type" : "webhook",
|
|
"enabled" : true,
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"delete_webhook_operation": OperationExpectation(
|
|
operation_id="delete_webhook_operation",
|
|
method="DELETE",
|
|
path="/operations/webhooks/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_webhook_operation": OperationExpectation(
|
|
operation_id="get_webhook_operation",
|
|
method="GET",
|
|
path="/operations/webhooks/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"path" : "/custom/path",
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
|
|
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"category" : "alerts",
|
|
"type" : "webhook",
|
|
"enabled" : true,
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_webhook_operations": OperationExpectation(
|
|
operation_id="get_webhook_operations",
|
|
method="GET",
|
|
path="/operations/webhooks",
|
|
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"
|
|
}
|
|
},
|
|
"items" : [ {
|
|
"path" : "/custom/path",
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
|
|
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"category" : "alerts",
|
|
"type" : "webhook",
|
|
"enabled" : true,
|
|
"status" : "pending"
|
|
}, {
|
|
"path" : "/custom/path",
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
|
|
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"category" : "alerts",
|
|
"type" : "webhook",
|
|
"enabled" : true,
|
|
"status" : "pending"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"update_webhook_operation": OperationExpectation(
|
|
operation_id="update_webhook_operation",
|
|
method="PUT",
|
|
path="/operations/webhooks/{id}",
|
|
path_param_examples={
|
|
"id": 'cb1b8033-ea2d-4e9b-a920-fe87850693cf',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"path" : "/custom/path",
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
|
|
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"category" : "alerts",
|
|
"type" : "webhook",
|
|
"enabled" : true,
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"path" : "/custom/path",
|
|
"headers" : [ {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
}, {
|
|
"name" : "Content-Type",
|
|
"value" : "application/json"
|
|
} ],
|
|
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
|
|
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
|
|
"_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"
|
|
}
|
|
},
|
|
"name" : "My operation",
|
|
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
|
|
"category" : "alerts",
|
|
"type" : "webhook",
|
|
"enabled" : true,
|
|
"status" : "pending"
|
|
}
|
|
|
|
"""),
|
|
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" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
}
|