Share via


Glossary.GetCategoryTerms Method

Definition

Overloads

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

[Protocol Method] Get all terms associated with the specific category.

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

Get all terms associated with the specific category.

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

Source:
Glossary.cs

[Protocol Method] Get all terms associated with the specific category.

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

Parameters

categoryId
String

The globally unique identifier of the category.

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

categoryId is null.

categoryId 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 GetCategoryTerms 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 = client.GetCategoryTerms("<categoryId>", null, null, null, null);

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

This sample shows how to call GetCategoryTerms 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();

Response response = client.GetCategoryTerms("<categoryId>", 1234, 1234, "<sort>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("description").ToString());
Console.WriteLine(result[0].GetProperty("displayText").ToString());
Console.WriteLine(result[0].GetProperty("expression").ToString());
Console.WriteLine(result[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result[0].GetProperty("status").ToString());
Console.WriteLine(result[0].GetProperty("steward").ToString());
Console.WriteLine(result[0].GetProperty("termGuid").ToString());

Applies to

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

Source:
Glossary.cs

Get all terms associated with the specific category.

public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedTermHeader>> GetCategoryTerms (string categoryId, int? limit = default, int? offset = default, string sort = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetCategoryTerms : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedTermHeader>>
override this.GetCategoryTerms : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedTermHeader>>
Public Overridable Function GetCategoryTerms (categoryId 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 Response(Of IReadOnlyList(Of AtlasRelatedTermHeader))

Parameters

categoryId
String

The globally unique identifier of the category.

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

categoryId is null.

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

Examples

This sample shows how to call GetCategoryTerms.

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

Response<IReadOnlyList<AtlasRelatedTermHeader>> response = client.GetCategoryTerms("<categoryId>");

This sample shows how to call GetCategoryTerms with all parameters.

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

Response<IReadOnlyList<AtlasRelatedTermHeader>> response = client.GetCategoryTerms("<categoryId>", limit: 1234, offset: 1234, sort: "<sort>");

Applies to