Collections - Create Or Update Collection

Creates or updates a collection entity.

PUT {endpoint}/collections/{collectionName}?api-version=2019-11-01-preview

URI Parameters

Name In Required Type Description
collectionName
path True

string

endpoint
path True

string

The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/account/

api-version
query True

string

The api version to use.

Request Body

Name Type Description
description

string

Gets or sets the description.

friendlyName

string

Gets or sets the friendly name of the collection.

parentCollection

CollectionReference

Gets or sets the parent collection reference.

Responses

Name Type Description
200 OK

Collection

Success

Other Status Codes

ErrorResponseModel

An error response received from the provider.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Collections_CreateOrUpdateCollection

Sample request

PUT {endpoint}/collections/myCollection1?api-version=2019-11-01-preview

{
  "parentCollection": {
    "referenceName": "myParentCollection1"
  }
}

Sample response

Date: Wed, 13 Sep 2017 18:04:32 GMT
x-ms-request-id: d5496da4-9c52-402f-b067-83cc9ddea888
X-Content-Type-Options: nosniff
x-ms-correlation-request-id: 25c78f97-0b0a-4fe9-ad39-883a482265cd
{
  "name": "mycollection1",
  "friendlyName": "Finance",
  "parentCollection": {
    "type": "CollectionReference",
    "referenceName": "myParentCollection1"
  },
  "collectionProvisioningState": "Succeeded"
}

Definitions

Name Description
Collection

Collection resource.

Collection.SystemData

Metadata pertaining to creation and last modification of the resource.

collectionProvisioningState

Gets the state of the provisioning.

CollectionReference

Reference to a Collection.

createdByType

The type of identity that created the resource.

Error

Gets or sets the error.

ErrorModel

Default error model

ErrorResponseModel

Default error response model

lastModifiedByType

The type of identity that last modified the resource.

SystemData

Metadata pertaining to creation and last modification of the resource.

Collection

Collection resource.

Name Type Description
collectionProvisioningState

collectionProvisioningState

Gets the state of the provisioning.

description

string

Gets or sets the description.

friendlyName

string

Gets or sets the friendly name of the collection.

name

string

Gets the name.

parentCollection

CollectionReference

Gets or sets the parent collection reference.

systemData

SystemData

Metadata pertaining to creation and last modification of the resource.

Collection.SystemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of the last modification the resource (UTC).

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

lastModifiedByType

The type of identity that last modified the resource.

collectionProvisioningState

Gets the state of the provisioning.

Name Type Description
Creating

string

Deleting

string

Failed

string

Moving

string

Succeeded

string

Unknown

string

CollectionReference

Reference to a Collection.

Name Type Description
referenceName

string

Gets or sets the reference name.

type

string

Gets or sets the reference type property.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

Error

Gets or sets the error.

Name Type Description
code

string

Gets or sets the code.

details

ErrorModel[]

Gets or sets the details.

message

string

Gets or sets the messages.

target

string

Gets or sets the target.

ErrorModel

Default error model

Name Type Description
code

string

Gets or sets the code.

details

ErrorModel[]

Gets or sets the details.

message

string

Gets or sets the messages.

target

string

Gets or sets the target.

ErrorResponseModel

Default error response model

Name Type Description
error

Error

Gets or sets the error.

lastModifiedByType

The type of identity that last modified the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

SystemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of the last modification the resource (UTC).

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

lastModifiedByType

The type of identity that last modified the resource.