Entity - Set Labels By Unique Attribute

Set labels to a given entity identified by its type and unique attributes.

If labels is null/empty, existing labels will all be removed.

In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=.

NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName.

The REST request would look something like this: POST /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.

POST {endpoint}/datamap/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels
POST {endpoint}/datamap/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels?attr:qualifiedName={attr:qualifiedName}

URI Parameters

Name In Required Type Description
endpoint
path True

string

typeName
path True

string

The name of the type.

attr:qualifiedName
query

string

The qualified name of the entity. (This is only an example. qualifiedName can be changed to other unique attributes)

Request Body

Name Type Description
body

string[]

set of labels to be set

Responses

Name Type Description
204 No Content

There is no content to send for this request, but the headers may be useful.

Other Status Codes

AtlasErrorResponse

An unexpected error response.

Security

OAuth2Auth

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

Scopes

Name Description
https://purview.azure.net/.default

Examples

Entity_SetLabelsByUniqueAttribute

Sample Request

POST {endpoint}/datamap/api/atlas/v2/entity/uniqueAttribute/type/Asset/labels?attr:qualifiedName=https://asset1

[
  "label1",
  "label2"
]

Sample Response

Definitions

AtlasErrorResponse

An error response from the service

Name Type Description
errorCode

string

The error code.

errorMessage

string

The error message.

requestId

string

The request ID.