# coding: utf-8 """ Credentials API Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API operations: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). 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": OperationExpectation( operation_id="create_credential", method="POST", path="/credentials", 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" : "Example Credential", "id" : "3247" } """), success_content_type="application/json", request_body_example=json.loads(""" { "name" : "Example Credential 1", "value" : "Example Credential 1 Password" } """), 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_credential": OperationExpectation( operation_id="delete_credential", method="DELETE", path="/credentials/{id}", path_param_examples={ "id": '3247', }, success_status=204, success_body=None, 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_credential": OperationExpectation( operation_id="get_credential", method="GET", path="/credentials/{id}", path_param_examples={ "id": '3247', }, 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" : "Example Credential", "id" : "3247", "value" : "rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt" } """), 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_credentials": OperationExpectation( operation_id="get_credentials", method="GET", path="/credentials", path_param_examples={ }, success_status=200, success_body=json.loads(""" { "credentials" : [ { "_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" : "Example Credential", "id" : "3247", "value" : "rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt" }, { "_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" : "Example Credential", "id" : "3247", "value" : "rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt" } ], "_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" } } } """), 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_credential": OperationExpectation( operation_id="update_credential", method="PUT", path="/credentials/{id}", path_param_examples={ "id": '3247', }, 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" : "Example Credential", "id" : "3247" } """), success_content_type="application/json", request_body_example=json.loads(""" { "name" : "Example Credential 1", "value" : "Example Credential 1 Password" } """), 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", ), }, ), }