question

TorralbaResinoJavier-4141 avatar image
0 Votes"
TorralbaResinoJavier-4141 asked PRADEEPCHEEKATLA-MSFT commented

Delete multiple assets in Purview

Hello,

I have a collection in Purview with more than 700 assets that I want to delete. The problem is that I don't see any way to delete multuiple assets, I can only do it one by one, and deleting the collection is not also the solution because it has assets related.

I have found an option to move multiple assets to another collection, but not to delete it. Can you help?

Thanks,

azure-purview
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @TorralbaResinoJavier-4141,

Following up to see if the below suggestion was helpful. And, if you have any further query do let us know.


  • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.

0 Votes 0 ·

1 Answer

PRADEEPCHEEKATLA-MSFT avatar image
0 Votes"
PRADEEPCHEEKATLA-MSFT answered PRADEEPCHEEKATLA-MSFT commented

Hello @TorralbaResinoJavier-4141,

Thanks for the question and using MS Q&A platform.

Currently, there is no way to delete multiple assets from the Purview UX.

The only way to delete multiple assets from the catalog is through REST APIs.

Steps to delete an Asset in Purview using REST API:

From this document, follow the steps to Use the Postman client to call the REST APIs.

Step1: Get Token

  POST https://login.microsoftonline.com/<your-tenant-id>/oauth2/token

100555-image.png

Step2: How to find a guid of an asset in Azure Purview Studio. Select any asset and you will find the guid in the url section:

156627-image.png

Step3: Entity - Delete By Guid – Used to delete single asset by using associated Guid:

Syntax: DELETE {Endpoint}/catalog/api/atlas/v2/entity/guid/{guid}

Sample URL: DELETE {Endpoint}/catalog/api/atlas/v2/entity/guid/fd279eb4-f6c3-1b0b-ad67-e4f8abd2972f

Step4: Entity - Delete By Guids – Used to delete mulitple asset by using associated Guid:

Syntax: DELETE {Endpoint}/catalog/api/atlas/v2/entity/bulk?guids={guids}

Sample:

 DELETE {Endpoint}/catalog/api/atlas/v2/entity/bulk?guids=[
        
       "18e06957-e265-967a-07f1-e14e2ab8940f",
        
       "cc0730ba-9b30-41f0-6953-559d17626d2b"
        
     ]

Hope this helps. Do let us know if you any further queries.


  • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification

  • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

· 13
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,
I’m trying to do it but I’m getting an error:

191872-image.png

I think that may be the Endpoint is not correct. Can you explain me where I can fount it?

There is a way to obtain a list of Guid’s?

Thanks,


0 Votes 0 ·
image.png (28.6 KiB)
PRADEEPCHEEKATLA-MSFT avatar image PRADEEPCHEEKATLA-MSFT TorralbaResinoJavier-4141 ·

Hello @TorralbaResinoJavier-4141,

You can use Types - Get All Type Definitions - Get all type definitions in Atlas in bulk.

Note: You can save the response and filter all the guids from the response output.

192272-image.png


0 Votes 0 ·
image.png (76.9 KiB)

Hello,

I have several problems trying to delete the assets. First of all, the URL used to delete multyple assets doesn't works:

192366-image.png

I have found another version with the guid's separated by "&", but it doesn't work neither:

192421-image.png

In the other hand, the second request you said me to obtain the guid list doesn't return guids that reference the assets in purview (I supose that the assets are not the only element identified by a guid). There is a way to obtain the list of the asset's guid in Purview by using the "Get all types definition" request?


0 Votes 0 ·
image.png (64.8 KiB)
image.png (65.3 KiB)
Show more comments

Hello @TorralbaResinoJavier-4141,

To resolve this issue, you need to add the below Headers:

  • HTTP header Content-Type: application/json

  • HTTP header api-version: 2022-03-01-preview

I works as excepted once you add the above Headers:


194672-image.png


Hope this helps. Do let us know if you any further queries.

0 Votes 0 ·
image.png (79.7 KiB)

Hello @TorralbaResinoJavier-4141,

Just checking in to see if the above answer helped. If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·

Hello,

Yes, adding the header makes the DELETE works, thanks for that. However, I still need to know how to obtain the GUID's associated to the assets. I have to use the "Get all types definition" request? Which are the arguments I have to use?

Thanks.

1 Vote 1 ·

Hello @TorralbaResinoJavier-4141,

Just checking in to see if the above answer helped. If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·