Hi guys! Is there any way to create glossary terms...
# getting-started
a
Hi guys! Is there any way to create glossary terms with custom properties with the OpenAPI? (If there is a way, can you provide an example?) Thanks in advance!
o
Copy code
curl -X 'POST' \
  '<http://localhost:8080/openapi/entities/v1/>' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "entityType": "glossaryTerm",
    "entityUrn": "urn:li:glossaryTerm:myTermTest",
    "aspect": {
      "__type": "GlossaryTermInfo",
      "customProperties": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "name": "myTermTest",
      "definition": "definition",
      "termSource": "termSource"
    }
  }
]'
a
Thanks @orange-night-91387!
@orange-night-91387 can I maybe get different versions of the entity aspect, by querying for it with OpenAPI? (I mean the version stored in mysql)
o
Not through OpenAPI, there is a graphQL endpoint that takes a
versionStamp
, but it's meant as an internally used endpoint since DB versions are intended to be mostly opaque so we don't really have docs on how to construct it. We generate
versionStamps
from the Timeline API and then the frontend utilizes those for the timeline UI to get historical information. Do you have a use case that the UI does not currently cover?
a
Hi! We are trying to get previous glossary term versions out of the system. To be able to compare it, and see what changes were made
o
I would suggest taking a look into the code that we wrote for doing this on the dataset schema side: https://github.com/datahub-project/datahub/pull/4793/files and https://github.com/datahub-project/datahub/pull/4727