Partilhar via


Glossary.GetTermsAsync Method

Definition

Overloads

GetTermsAsync(String, Nullable<Int32>, Nullable<Int32>, String, RequestContext)

[Protocol Method] Get terms belonging to a specific glossary. Recommend using limit/offset to get pagination result.

GetTermsAsync(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken)

Get terms belonging to a specific glossary. Recommend using limit/offset to get pagination result.

GetTermsAsync(String, Nullable<Int32>, Nullable<Int32>, String, RequestContext)

Source:
Glossary.cs

[Protocol Method] Get terms belonging to a specific glossary. Recommend using limit/offset to get pagination result.

public virtual System.Threading.Tasks.Task<Azure.Response> GetTermsAsync (string glossaryId, int? limit, int? offset, string sort, Azure.RequestContext context);
abstract member GetTermsAsync : string * Nullable<int> * Nullable<int> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTermsAsync : string * Nullable<int> * Nullable<int> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetTermsAsync (glossaryId As String, limit As Nullable(Of Integer), offset As Nullable(Of Integer), sort As String, context As RequestContext) As Task(Of Response)

Parameters

glossaryId
String

The globally unique identifier for glossary.

limit
Nullable<Int32>

The page size - by default there is no paging.

offset
Nullable<Int32>

The offset for pagination purpose.

sort
String

The sort order, ASC (default) or DESC.

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

glossaryId is null.

glossaryId 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 GetTermsAsync 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.GetTermsAsync("<glossaryId>", null, null, null, null);

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

This sample shows how to call GetTermsAsync 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.GetTermsAsync("<glossaryId>", 1234, 1234, "<sort>", null);

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

Applies to

GetTermsAsync(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken)

Source:
Glossary.cs

Get terms belonging to a specific glossary. Recommend using limit/offset to get pagination result.

public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm>>> GetTermsAsync (string glossaryId, int? limit = default, int? offset = default, string sort = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTermsAsync : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm>>>
override this.GetTermsAsync : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm>>>
Public Overridable Function GetTermsAsync (glossaryId As String, Optional limit As Nullable(Of Integer) = Nothing, Optional offset As Nullable(Of Integer) = Nothing, Optional sort As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of AtlasGlossaryTerm)))

Parameters

glossaryId
String

The globally unique identifier for glossary.

limit
Nullable<Int32>

The page size - by default there is no paging.

offset
Nullable<Int32>

The offset for pagination purpose.

sort
String

The sort order, ASC (default) or DESC.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

glossaryId is null.

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

Examples

This sample shows how to call GetTermsAsync.

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

Response<IReadOnlyList<AtlasGlossaryTerm>> response = await client.GetTermsAsync("<glossaryId>");

This sample shows how to call GetTermsAsync 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<IReadOnlyList<AtlasGlossaryTerm>> response = await client.GetTermsAsync("<glossaryId>", limit: 1234, offset: 1234, sort: "<sort>");

Applies to