Glossary.GetCategoriesHeadersAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetCategoriesHeadersAsync(String, Nullable<Int32>, Nullable<Int32>, String, RequestContext) |
[Protocol Method] Get the category headers belonging to a specific glossary. Recommend using limit/offset to get pagination result.
|
GetCategoriesHeadersAsync(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken) |
Get the category headers belonging to a specific glossary. Recommend using limit/offset to get pagination result. |
GetCategoriesHeadersAsync(String, Nullable<Int32>, Nullable<Int32>, String, RequestContext)
- Source:
- Glossary.cs
[Protocol Method] Get the category headers belonging to a specific glossary. Recommend using limit/offset to get pagination result.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetCategoriesHeadersAsync(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> GetCategoriesHeadersAsync (string glossaryId, int? limit, int? offset, string sort, Azure.RequestContext context);
abstract member GetCategoriesHeadersAsync : string * Nullable<int> * Nullable<int> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetCategoriesHeadersAsync : string * Nullable<int> * Nullable<int> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetCategoriesHeadersAsync (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.
- 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 GetCategoriesHeadersAsync 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.GetCategoriesHeadersAsync("<glossaryId>", null, null, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].ToString());
This sample shows how to call GetCategoriesHeadersAsync 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 = await client.GetCategoriesHeadersAsync("<glossaryId>", 1234, 1234, "<sort>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("categoryGuid").ToString());
Console.WriteLine(result[0].GetProperty("description").ToString());
Console.WriteLine(result[0].GetProperty("displayText").ToString());
Console.WriteLine(result[0].GetProperty("parentCategoryGuid").ToString());
Console.WriteLine(result[0].GetProperty("relationGuid").ToString());
Applies to
GetCategoriesHeadersAsync(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken)
- Source:
- Glossary.cs
Get the category headers 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.AtlasRelatedCategoryHeader>>> GetCategoriesHeadersAsync (string glossaryId, int? limit = default, int? offset = default, string sort = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetCategoriesHeadersAsync : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedCategoryHeader>>>
override this.GetCategoriesHeadersAsync : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedCategoryHeader>>>
Public Overridable Function GetCategoriesHeadersAsync (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 AtlasRelatedCategoryHeader)))
Parameters
- glossaryId
- String
The globally unique identifier for glossary.
- 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 GetCategoriesHeadersAsync.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient();
Response<IReadOnlyList<AtlasRelatedCategoryHeader>> response = await client.GetCategoriesHeadersAsync("<glossaryId>");
This sample shows how to call GetCategoriesHeadersAsync 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<AtlasRelatedCategoryHeader>> response = await client.GetCategoriesHeadersAsync("<glossaryId>", limit: 1234, offset: 1234, sort: "<sort>");
Applies to
Azure SDK for .NET