diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_createOrUpdate.json b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_createOrUpdate.json new file mode 100644 index 000000000000..888e51feab3e --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_createOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "collection": "ExampleCollection", + "api-version": "2021-09-01", + "entity": { + "referredEntities": {}, + "entity": { + "typeName": "azure_storage_account", + "attributes": { + "name": "exampleaccount", + "qualifiedName": "https://exampleaccount.core.windows.net" + } + } + } + }, + "responses": { + "200": { + "body": { + "mutatedEntities": { + "CREATE": [ + { + "typeName": "azure_storage_account", + "attributes": { + "qualifiedName": "https://exampleaccount.core.windows.net" + }, + "lastModifiedTS": "1", + "guid": "38d3c41f-300c-434e-8dad-0b1a7cb5efd6", + "status": "ACTIVE" + } + ] + }, + "guidAssignments": { + "-9514774903018162": "38d3c41f-300c-434e-8dad-0b1a7cb5efd6" + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_createOrUpdateBulk.json b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_createOrUpdateBulk.json new file mode 100644 index 000000000000..3279bfbf0238 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_createOrUpdateBulk.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "collection": "ExampleCollection", + "api-version": "2021-09-01", + "entities": { + "referredEntities": {}, + "entities": [ + { + "typeName": "azure_storage_account", + "attributes": { + "qualifiedName": "exampleaccount", + "name": "exampleaccount", + "description": "Example Description" + } + }, + { + "typeName": "azure_storage_account", + "attributes": { + "qualifiedName": "exampleaccount2", + "name": "exampleaccount2" + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "mutatedEntities": { + "UPDATE": [ + { + "typeName": "azure_storage_account", + "attributes": { + "qualifiedName": "exampleaccount" + }, + "lastModifiedTS": "2", + "guid": "b2f9c306-cf65-4bb0-878e-cfaafde156b1", + "status": "ACTIVE" + } + ], + "CREATE": [ + { + "typeName": "azure_storage_account", + "attributes": { + "qualifiedName": "exampleaccount2" + }, + "lastModifiedTS": "1", + "guid": "321493e3-3fb7-4b3e-9df7-3b69154174c2", + "status": "ACTIVE" + } + ] + }, + "guidAssignments": { + "-9514774903018192": "321493e3-3fb7-4b3e-9df7-3b69154174c2", + "-9514774903018193": "b2f9c306-cf65-4bb0-878e-cfaafde156b1" + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_moveEntitiesToCollection.json b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_moveEntitiesToCollection.json new file mode 100644 index 000000000000..bc9c78428ab4 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/examples/CatalogCollection_moveEntitiesToCollection.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "collection": "ExampleNewCollection", + "api-version": "2021-09-01", + "moveEntitiesRequest": { + "entityGuids": [ + "321493e3-3fb7-4b3e-9df7-3b69154174c2", + "b2f9c306-cf65-4bb0-878e-cfaafde156b1" + ] + } + }, + "responses": { + "200": { + "body": { + "mutatedEntities": { + "UPDATE": [ + { + "typeName": "azure_storage_account", + "attributes": { + "qualifiedName": "exampleaccount" + }, + "lastModifiedTS": "3", + "guid": "b2f9c306-cf65-4bb0-878e-cfaafde156b1", + "status": "ACTIVE" + }, + { + "typeName": "azure_storage_account", + "attributes": { + "qualifiedName": "exampleaccount2" + }, + "lastModifiedTS": "2", + "guid": "321493e3-3fb7-4b3e-9df7-3b69154174c2", + "status": "ACTIVE" + } + ] + }, + "guidAssignments": { + "-9514774903018192": "321493e3-3fb7-4b3e-9df7-3b69154174c2", + "-9514774903018193": "b2f9c306-cf65-4bb0-878e-cfaafde156b1" + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/purviewcatalog.json b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/purviewcatalog.json index e8387dc7be17..f281866cf52f 100644 --- a/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/purviewcatalog.json +++ b/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/purviewcatalog.json @@ -3558,6 +3558,141 @@ } } } + }, + "/collections/{collection}/entity": { + "post": { + "tags": [ + "CatalogCollection" + ], + "description": "Creates or updates an entity to a collection.\nExisting entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName.\nMap and array of collections are not well supported. E.g., array>, array>.", + "operationId": "CatalogCollection_createOrUpdate", + "x-ms-examples": { + "CatalogCollection_createOrUpdate": { + "$ref": "./examples/CatalogCollection_createOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/collection" + }, + { + "$ref": "#/parameters/purviewAPIVersion" + }, + { + "in": "body", + "name": "entity", + "description": "Atlas entity with extended information.", + "required": true, + "schema": { + "$ref": "#/definitions/AtlasEntityWithExtInfo" + } + } + ], + "responses": { + "200": { + "description": "Created with EntityMutationResponse.", + "schema": { + "$ref": "#/definitions/EntityMutationResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/collections/{collection}/entity/bulk": { + "post": { + "tags": [ + "CatalogCollection" + ], + "description": "Creates or updates entities in bulk to a collection.\nExisting entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName.\nMap and array of collections are not well supported. E.g., array>, array>.", + "operationId": "CatalogCollection_createOrUpdateBulk", + "x-ms-examples": { + "CatalogCollection_createOrUpdateBulk": { + "$ref": "./examples/CatalogCollection_createOrUpdateBulk.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/collection" + }, + { + "$ref": "#/parameters/purviewAPIVersion" + }, + { + "in": "body", + "name": "entities", + "description": "Atlas entities with extended information.", + "required": true, + "schema": { + "$ref": "#/definitions/AtlasEntitiesWithExtInfo" + } + } + ], + "responses": { + "200": { + "description": "Created with EntityMutationResponse.", + "schema": { + "$ref": "#/definitions/EntityMutationResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/collections/{collection}/entity/moveHere": { + "post": { + "tags": [ + "CatalogCollection" + ], + "description": "Move existing entities to the target collection.", + "operationId": "CatalogCollection_moveEntitiesToCollection", + "x-ms-examples": { + "CatalogCollection_moveEntitiesToCollection": { + "$ref": "./examples/CatalogCollection_moveEntitiesToCollection.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/collection" + }, + { + "$ref": "#/parameters/purviewAPIVersion" + }, + { + "in": "body", + "name": "moveEntitiesRequest", + "description": "Entity guids to be moved to target collection.", + "required": true, + "schema": { + "$ref": "#/definitions/MoveEntitiesRequest" + } + } + ], + "responses": { + "200": { + "description": "Created with EntityMutationResponse.", + "schema": { + "$ref": "#/definitions/EntityMutationResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -5189,6 +5324,18 @@ "title": "ClassificationAssociateRequest", "description": "The request for classification association." }, + "MoveEntitiesRequest": { + "type": "object", + "properties": { + "entityGuids": { + "type": "array", + "description": "An array of entity guids to be moved to target collection.", + "items": { + "type": "string" + } + } + } + }, "DateFormat": { "type": "object", "title": "DateFormat", @@ -6675,6 +6822,14 @@ "modelAsString": true }, "x-ms-parameter-location": "method" + }, + "collection": { + "name": "collection", + "description": "the collection unique name", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } }