diff --git a/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/CreateAssetConversionJob.json b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/CreateAssetConversionJob.json new file mode 100644 index 000000000000..27501a0f02ba --- /dev/null +++ b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/CreateAssetConversionJob.json @@ -0,0 +1,158 @@ +{ + "parameters": { + "accountId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "jobId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "api-version": "0.2-preview.1", + "x-mrc-cv": "dKEFmka2kkSlDmp/af+sOw", + "body": { + "assetFileType": "string", + "inputAssetUri": "string", + "ingestionConfiguration": { + "dimensions": { + "x": 0, + "y": 0, + "z": 0 + }, + "boundingBoxCenter": { + "x": 0, + "y": 0, + "z": 0 + }, + "gravity": { + "x": 0, + "y": 0, + "z": 0 + }, + "keyFrameIndexes": [ + 0 + ], + "gtTrajectory": [ + { + "rotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "translation": { + "x": 0, + "y": 0, + "z": 0 + } + } + ], + "principalAxis": { + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "scale": 0, + "supportingPlane": { + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "testTrajectory": [ + { + "rotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "translation": { + "x": 0, + "y": 0, + "z": 0 + } + } + ] + } + } + }, + "responses": { + "201": { + "headers": { + "ms-cv": "dKEFmka2kkSlDmp/af+sOw" + }, + "body": { + "clientErrorDetails": "string", + "serverErrorDetails": "string", + "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "outputModelUri": "string", + "jobStatus": "NotStarted", + "assetFileType": "string", + "inputAssetUri": "string", + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "ingestionConfiguration": { + "dimensions": { + "x": 0, + "y": 0, + "z": 0 + }, + "boundingBoxCenter": { + "x": 0, + "y": 0, + "z": 0 + }, + "gravity": { + "x": 0, + "y": 0, + "z": 0 + }, + "keyFrameIndexes": [ + 0 + ], + "gtTrajectory": [ + { + "rotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 0, + "isIdentity": true + }, + "translation": { + "x": 0, + "y": 0, + "z": 0 + } + } + ], + "principalAxis": { + "x": 0, + "y": 0, + "z": 0, + "w": 0, + "isIdentity": true + }, + "scale": 0, + "supportingPlane": { + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "testTrajectory": [ + { + "rotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 0, + "isIdentity": true + }, + "translation": { + "x": 0, + "y": 0, + "z": 0 + } + } + ] + } + } + } + } +} diff --git a/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/GetAssetConversionJob.json b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/GetAssetConversionJob.json new file mode 100644 index 000000000000..dce85dbbce8c --- /dev/null +++ b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/GetAssetConversionJob.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "accountId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "jobId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "api-version": "0.2-preview.1", + "x-mrc-cv": "dKEFmka2kkSlDmp/af+sOw" + }, + "responses": { + "200": { + "headers": { + "ms-cv": "dKEFmka2kkSlDmp/af+sOw" + }, + "body": { + "clientErrorDetails": "string", + "serverErrorDetails": "string", + "errorCode": "NO_ERROR", + "jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "outputModelUri": "string", + "jobStatus": "NotStarted", + "assetFileType": "string", + "inputAssetUri": "string", + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "ingestionConfiguration": { + "dimensions": { + "x": 0, + "y": 0, + "z": 0 + }, + "boundingBoxCenter": { + "x": 0, + "y": 0, + "z": 0 + }, + "gravity": { + "x": 0, + "y": 0, + "z": 0 + }, + "keyFrameIndexes": [ + 0 + ], + "gtTrajectory": [ + { + "rotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 0, + "isIdentity": true + }, + "translation": { + "x": 0, + "y": 0, + "z": 0 + } + } + ], + "principalAxis": { + "x": 0, + "y": 0, + "z": 0, + "w": 0, + "isIdentity": true + }, + "scale": 0, + "supportingPlane": { + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "testTrajectory": [ + { + "rotation": { + "x": 0, + "y": 0, + "z": 0, + "w": 0, + "isIdentity": true + }, + "translation": { + "x": 0, + "y": 0, + "z": 0 + } + } + ] + } + } + } + } +} diff --git a/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/GetBlobUploadEndpoint.json b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/GetBlobUploadEndpoint.json new file mode 100644 index 000000000000..dd66f41b7929 --- /dev/null +++ b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/examples/GetBlobUploadEndpoint.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "accountId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "api-version": "0.2-preview.1", + "x-mrc-cv": "dKEFmka2kkSlDmp/af+sOw" + }, + "responses": { + "200": { + "headers": { + "ms-cv": "dKEFmka2kkSlDmp/af+sOw" + }, + "body": { + "inputAssetUri": "string" + } + } + } +} diff --git a/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/mr-aoa.json b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/mr-aoa.json new file mode 100644 index 000000000000..cc6c36f5c90b --- /dev/null +++ b/specification/mixedreality/data-plane/Microsoft.MixedReality/preview/0.2-preview.1/mr-aoa.json @@ -0,0 +1,478 @@ +{ + "swagger": "2.0", + "info": { + "title": "AOA front end APIs", + "description": "Azure Object Anchors front end APIs.", + "version": "0.2-preview.1" + }, + "paths": { + "/accounts/{accountId}/jobs/{jobId}": { + "put": { + "tags": [ + "IngestionJob" + ], + "summary": "Creates a job request.", + "operationId": "IngestionJob_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/AccountIdParameter" + }, + { + "$ref": "#/parameters/JobIdParameter" + }, + { + "$ref": "#/parameters/ClientRequestCorrelationVectorParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "The Azure Object Anchors ingestion request.", + "schema": { + "$ref": "#/definitions/IngestionProperties" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IngestionProperties" + }, + "headers": { + "ms-cv": { + "description": "The service response correlation vector, which will be a new value for every response.", + "type": "string" + } + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "IngestionJob_Create": { + "$ref": "examples/CreateAssetConversionJob.json" + } + } + }, + "get": { + "tags": [ + "IngestionJob" + ], + "summary": "Gets the status of a job request.", + "operationId": "IngestionJob_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/AccountIdParameter" + }, + { + "$ref": "#/parameters/JobIdParameter" + }, + { + "$ref": "#/parameters/ClientRequestCorrelationVectorParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IngestionProperties" + }, + "headers": { + "ms-cv": { + "description": "The service response correlation vector, which will be a new value for every response.", + "type": "string" + } + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "IngestionJob_Get": { + "$ref": "examples/GetAssetConversionJob.json" + } + } + } + }, + "/accounts/{accountId}/blobUploadEndpoint": { + "get": { + "tags": [ + "Storage" + ], + "summary": "Gets a blob upload uri.", + "operationId": "BlobUploadEndpoint_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/AccountIdParameter" + }, + { + "$ref": "#/parameters/ClientRequestCorrelationVectorParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/UploadLocation" + }, + "headers": { + "ms-cv": { + "description": "The service response correlation vector, which will be a new value for every response.", + "type": "string" + } + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "BlobUploadEndpoint_Get": { + "$ref": "examples/GetBlobUploadEndpoint.json" + } + } + } + } + }, + "definitions": { + "ConversionErrorCode": { + "enum": [ + "UNKNOWN", + "NO_ERROR", + "SERVICE_ERROR", + "INVALID_ASSET_URI", + "INVALID_JOB_ID", + "INVALID_GRAVITY", + "INVALID_SCALE", + "ASSET_SIZE_TOO_LARGE", + "ASSET_DIMENSIONS_OUT_OF_BOUNDS", + "ZERO_FACES", + "INVALID_FACE_VERTICES", + "ZERO_TRAJECTORIES_GENERATED", + "TOO_MANY_RIG_POSES", + "ASSET_CANNOT_BE_CONVERTED" + ], + "type": "string", + "x-ms-enum": { + "name": "ConversionErrorCode", + "modelAsString": true + } + }, + "JobStatus": { + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "Failed", + "Cancelled" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": false + } + }, + "Vector3": { + "required": [ + "x", + "y", + "z" + ], + "type": "object", + "properties": { + "x": { + "format": "float", + "type": "number" + }, + "y": { + "format": "float", + "type": "number" + }, + "z": { + "format": "float", + "type": "number" + } + } + }, + "Quaternion": { + "required": [ + "x", + "y", + "z", + "w" + ], + "type": "object", + "properties": { + "x": { + "format": "float", + "type": "number" + }, + "y": { + "format": "float", + "type": "number" + }, + "z": { + "format": "float", + "type": "number" + }, + "w": { + "format": "float", + "type": "number" + }, + "isIdentity": { + "type": "boolean", + "readOnly": true + } + } + }, + "Pose": { + "required": [ + "rotation", + "translation" + ], + "type": "object", + "properties": { + "rotation": { + "$ref": "#/definitions/Quaternion" + }, + "translation": { + "$ref": "#/definitions/Vector3" + } + } + }, + "Vector4": { + "required": [ + "x", + "y", + "z", + "w" + ], + "type": "object", + "properties": { + "x": { + "format": "float", + "type": "number" + }, + "y": { + "format": "float", + "type": "number" + }, + "z": { + "format": "float", + "type": "number" + }, + "w": { + "format": "float", + "type": "number" + } + } + }, + "IngestionConfiguration": { + "description": "Represents an ingestion configuration.", + "required": [ + "gravity", + "scale" + ], + "type": "object", + "properties": { + "dimensions": { + "$ref": "#/definitions/Vector3", + "x-nullable": true + }, + "boundingBoxCenter": { + "$ref": "#/definitions/Vector3", + "x-nullable": true + }, + "gravity": { + "$ref": "#/definitions/Vector3" + }, + "keyFrameIndexes": { + "description": "Indices of Key Frames.", + "type": "array", + "x-nullable": true, + "items": { + "format": "int32", + "type": "integer" + } + }, + "gtTrajectory": { + "description": "Ground truth trajectory.", + "type": "array", + "items": { + "$ref": "#/definitions/Pose" + } + }, + "principalAxis": { + "$ref": "#/definitions/Quaternion", + "x-nullable": true + }, + "scale": { + "format": "float", + "description": "Scale of transformation of asset units into meter space.", + "type": "number" + }, + "supportingPlane": { + "$ref": "#/definitions/Vector4", + "x-nullable": true + }, + "testTrajectory": { + "description": "Test Trajectory.", + "type": "array", + "items": { + "$ref": "#/definitions/Pose" + } + } + } + }, + "IngestionProperties": { + "description": "Represents the status of an AOA asset conversion job.", + "type": "object", + "properties": { + "clientErrorDetails": { + "description": "Information about the cause of a ClientError JobStatus.", + "type": "string", + "readOnly": true + }, + "serverErrorDetails": { + "description": "Information about the cause of a ServerError JobStatus.", + "type": "string", + "readOnly": true + }, + "errorCode": { + "$ref": "#/definitions/ConversionErrorCode", + "readOnly": true + }, + "jobId": { + "format": "uuid", + "description": "Identifier for the AOA asset conversion job.", + "type": "string", + "readOnly": true + }, + "outputModelUri": { + "format": "uri", + "description": "The URI for downloading the generated AOA Model", + "type": "string", + "readOnly": true + }, + "jobStatus": { + "$ref": "#/definitions/JobStatus" + }, + "assetFileType": { + "description": "The file type of the original 3D asset. Examples include: \"ply\", \"obj\", \"fbx\", \"glb\", \"gltf\", etc.", + "type": "string" + }, + "inputAssetUri": { + "format": "uri", + "description": "The Uri to the Asset to be ingested by the AOA asset conversion service. This asset needs to have been uploaded to the service using an endpoint provided from a call to the GetUploadUri API.", + "type": "string" + }, + "accountId": { + "format": "uuid", + "description": "Identifier for the Account owning the asset conversion job.", + "type": "string", + "readOnly": true + }, + "ingestionConfiguration": { + "$ref": "#/definitions/IngestionConfiguration" + } + } + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + } + }, + "UploadLocation": { + "required": [ + "inputAssetUri" + ], + "type": "object", + "properties": { + "inputAssetUri": { + "format": "uri", + "description": "The blob upload URI where a model should be uploaded to the service for ingestion.", + "type": "string" + } + } + } + }, + "parameters": { + "AccountIdParameter": { + "in": "path", + "name": "accountId", + "description": "Identifier for the Azure Object Anchors account.", + "required": true, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method" + }, + "JobIdParameter": { + "in": "path", + "name": "jobId", + "description": "Identifier for the Azure Object Anchors ingestion job.", + "required": true, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method" + }, + "ClientRequestCorrelationVectorParameter": { + "in": "header", + "name": "x-mrc-cv", + "description": "The client request correlation vector, which should be set to a new value for each request.", + "type": "string", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "in": "query", + "name": "api-version", + "description": "The API version.", + "type": "string" + } + } +} diff --git a/specification/mixedreality/data-plane/readme.md b/specification/mixedreality/data-plane/readme.md index f9cdfa11af3a..61f6f410ab45 100644 --- a/specification/mixedreality/data-plane/readme.md +++ b/specification/mixedreality/data-plane/readme.md @@ -39,6 +39,15 @@ openapi-type: data-plane tag: package-2021-01-01 ``` +### Tag: package-0.2-preview.1 + +These settings apply only when `--tag=package-0.2-preview.1` is specified on the command line. + +``` yaml $(tag) == 'package-0.2-preview.1' +input-file: +- Microsoft.MixedReality/preview/0.2-preview.1/mr-aoa.json +``` + ### Tag: package-2021-01-01 These settings apply only when `--tag=package-2021-01-01` is specified on the command line.