Hi guys! Is there any way, with the current capabi...
# advice-metadata-modeling
a
Hi guys! Is there any way, with the current capabilities of the REST API, to create globalTags (not specifically attached to any particular entitiy)? If so, can you provide me an example json request and API endpoint? Thank you very much in advance!
1
a
Hi @agreeable-army-26750 we support this functionality on the GraphQL API, but not for REST, thanks! https://datahubproject.io/docs/authorization/access-policies-guide/
m
@agreeable-army-26750 are you trying to create a tag and give it a description without having to attach it to any datasets or columns?
a
Hi @mammoth-bear-12532, yes thats what I am trying to do!
m
@agreeable-army-26750: This gist should help. https://gist.github.com/shirshanka/a4f17aa98b3c152ae7acd77c5e5ce3bd
The equivalent OpenAPI call would look like:
Copy code
curl -X 'POST' \
  '<http://localhost:9002/openapi/entities/v1/>' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "entityType": "tag",
    "entityUrn": "urn:li:tag:12345",
    "aspect": {
      "__type": "TagProperties",
      "name": "my_special_tag",
      "description": "Tag with a special description"
    }
  }
]'
a
Thanks @mammoth-bear-12532 it is working like a charm!