0

I am trying to reference the following page

https://learn.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/create-glossary-term?tabs=HTTP

    $glossarytermcreateendpoint = 'https://pv-chn-asiabi-sea-dev.purview.azure.com/catalog/api/atlas/v2/glossary'


$Glossaryterm = @{
    qualifiedName = "sample"
    name= "sample"
    longDescription = "sample"
shortDescription = "sample"
status = "Draft"
 
}

$jsonbody = $Glossaryterm | ConvertTo-Json



$Responsepost = Invoke-WebRequest -Uri $glossarytermcreateendpoint -Method Post -headers $headers -Body $jsonbody -ContentType 'application/json'

I am ok to get status 200

however in the Purview workspace , I can't find the new term is created

Questions

  1. How to make it works? Able to search ?
  2. How to create a glossary term under specific term template .?
mytabi
  • 639
  • 2
  • 12
  • 28

2 Answers2

0
$glossarytermcreateendpoint = 'https://pv-chn-asiabi-sea-dev.purview.azure.com/catalog/api/atlas/v2/glossary'

From your script, I noticed that the API you called is to create a glossary, not a term, so you can't find the new term you created.

The right API to create a term is to append /term to the end of your current API:

$glossarytermcreateendpoint = 'https://pv-chn-asiabi-sea-dev.purview.azure.com/catalog/api/atlas/v2/glossary/term'

Let me know if this solves your problem.

Yuanqiu Li
  • 1,600
  • 1
  • 9
  • 12
0

because you should upload to terms in purview account

aca1803
  • 21
  • 4
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 20 '23 at 08:46