Skip to main content
ipson
Gold ⭐️
March 26, 2024
Solved

Add/Edit User-Defined Properties for Entity in Atlas via API

I want to use the Atlas API to add/edit user-defined properties to a particular entity. I've previously had success using the API to edit properties that are already defined, such as an entity description:

```

curl --location --request PUT 'https://[host]/api/atlas/v2/entity/guid/[guid]?name=description' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic' \
--data '"a test table"'

```

However, it's not clear how to use the API to create and edit user-defined properties. When I try changing the url query to a user-defined property name, it complains that that property is not defined for the entity type.

For reference, in the UI, this is done fairly easily.

Screenshot 2024-03-26 at 2.24.08 PM.png

 

Scharan
ScharanAnswer
Gold ⭐️
April 5, 2024

Hello @ipson 

To edit the entity in Atlas, you need to export the entity, which will be downloaded in zip format, extract the files, edit the required files, zip the file in its original order, and then import the updated files to Atlas in compressed format (zip).

You can make use of export and import atlas api's to perform the above steps

 

3 replies

Puni
Silver ⭐️⭐️
Silver ⭐️⭐️
March 29, 2024

Hi @ipson 

I have tried checking on this and I find no API option specific to user defined properties.
For your reference: Atlas API list

https://atlas.apache.org/api/v2/index.html

Regards,
Puneeth

 

 

Translate
VidyaSargur
Community Manager
Community Manager
April 5, 2024

@ipson Did the response assist in resolving your query? If it did, kindly mark the relevant reply as the solution, as it will aid others in locating the answer more easily in the future. 

Translate
Regards, Vidya Sargur, Community Manager Was your question answered? Make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.
Scharan
Gold ⭐️
ScharanAnswer
Gold ⭐️
April 5, 2024

Hello @ipson 

To edit the entity in Atlas, you need to export the entity, which will be downloaded in zip format, extract the files, edit the required files, zip the file in its original order, and then import the updated files to Atlas in compressed format (zip).

You can make use of export and import atlas api's to perform the above steps

 

Translate