Share via


Glossary.GetTermAsync Method

Definition

Overloads

GetTermAsync(String, RequestContext)

[Protocol Method] Get a specific glossary term by its GUID.

GetTermAsync(String, CancellationToken)

Get a specific glossary term by its GUID.

GetTermAsync(String, RequestContext)

Source:
Glossary.cs

[Protocol Method] Get a specific glossary term by its GUID.

public virtual System.Threading.Tasks.Task<Azure.Response> GetTermAsync (string termId, Azure.RequestContext context);
abstract member GetTermAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTermAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetTermAsync (termId As String, context As RequestContext) As Task(Of Response)

Parameters

termId
String

The globally unique identifier for glossary term.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

termId is null.

termId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetTermAsync and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient();

Response response = await client.GetTermAsync("<termId>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

This sample shows how to call GetTermAsync with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01");

Response response = await client.GetTermAsync("<termId>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("guid").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString());
Console.WriteLine(result.GetProperty("longDescription").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("qualifiedName").ToString());
Console.WriteLine(result.GetProperty("shortDescription").ToString());
Console.WriteLine(result.GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("createTime").ToString());
Console.WriteLine(result.GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("updateTime").ToString());
Console.WriteLine(result.GetProperty("updatedBy").ToString());
Console.WriteLine(result.GetProperty("abbreviation").ToString());
Console.WriteLine(result.GetProperty("templateName")[0].ToString());
Console.WriteLine(result.GetProperty("anchor").GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("anchor").GetProperty("glossaryGuid").ToString());
Console.WriteLine(result.GetProperty("anchor").GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("antonyms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("nickName").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("guid").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("uniqueAttributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("itemPath").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("hierarchyInfo")[0].GetProperty("properties").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("resources")[0].GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("resources")[0].GetProperty("url").ToString());
Console.WriteLine(result.GetProperty("contacts").GetProperty("<key>")[0].GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("contacts").GetProperty("<key>")[0].GetProperty("info").ToString());
Console.WriteLine(result.GetProperty("attributes").GetProperty("<key>").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("guid").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("uniqueAttributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("entityStatus").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipType").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipGuid").ToString());
Console.WriteLine(result.GetProperty("assignedEntities")[0].GetProperty("relationshipStatus").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("classifies")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("examples")[0].ToString());
Console.WriteLine(result.GetProperty("isA")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("isA")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("isA")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("isA")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("isA")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("isA")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("isA")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("preferredTerms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("preferredToTerms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("replacedBy")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("replacementTerms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("seeAlso")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("synonyms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("translatedTerms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("translationTerms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("usage").ToString());
Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("validValues")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("validValuesFor")[0].GetProperty("termGuid").ToString());

Applies to

GetTermAsync(String, CancellationToken)

Source:
Glossary.cs

Get a specific glossary term by its GUID.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm>> GetTermAsync (string termId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTermAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm>>
override this.GetTermAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm>>
Public Overridable Function GetTermAsync (termId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AtlasGlossaryTerm))

Parameters

termId
String

The globally unique identifier for glossary term.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

termId is null.

termId is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetTermAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient();

Response<AtlasGlossaryTerm> response = await client.GetTermAsync("<termId>");

This sample shows how to call GetTermAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01");

Response<AtlasGlossaryTerm> response = await client.GetTermAsync("<termId>");

Applies to