Support Questions

Find answers, ask questions, and share your expertise

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

avatar
Contributor

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

 

1 ACCEPTED SOLUTION

avatar
Master Collaborator

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

 

View solution in original post

3 REPLIES 3

avatar
Rising Star

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

 

 

avatar
Community Manager

@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. 



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.
Learn more about the Cloudera Community:

avatar
Master Collaborator

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