Hi! Is there a way to programmatically add owners ...
# advice-metadata-modeling
i
Hi! Is there a way to programmatically add owners to a glossary term via graphql or the sdk? I tried the docs but couldn't find anything. Thanks!
r
Yes, one of the tricks I use for graphql is to perform the action in the browser and use the Inspect feature to look at the request.
b
Copy code
{
  "operationName": "batchAddOwners",
  "variables": {
    "input": {
      "owners": [
        {
          "ownerUrn": "urn:li:corpGroup:Analytics",
          "ownerEntityType": "CORP_GROUP"
        }
      ],
      "resources": [
        {
          "resourceUrn": "urn:li:glossaryTerm:Classification.Confidential"
        }
      ]
    }
  },
  "query": "mutation batchAddOwners($input: BatchAddOwnersInput!) {\n  batchAddOwners(input: $input)\n}\n"
}
The above is an example of adding an owner to a term
Further information about the request is available on our docs here