Share via


Glossary.BatchGetAsync Method

Definition

Overloads

BatchGetAsync(Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, RequestContext)

[Protocol Method] Get all glossaries. Recommend using limit/offset to get pagination result. Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories separately using

'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' and

'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.

BatchGetAsync(Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, CancellationToken)

Get all glossaries. Recommend using limit/offset to get pagination result. Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories separately using

'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' and

'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.

BatchGetAsync(Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, RequestContext)

Source:
Glossary.cs

[Protocol Method] Get all glossaries. Recommend using limit/offset to get pagination result. Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories separately using

'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' and

'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.

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

Parameters

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.

ignoreTermsAndCategories
Nullable<Boolean>

Whether ignore terms and categories.

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

Service returned a non-success status code.

Examples

This sample shows how to call BatchGetAsync 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.BatchGetAsync(null, null, null, null, null);

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

This sample shows how to call BatchGetAsync 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.BatchGetAsync(1234, 1234, "<sort>", true, 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("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("parentCategoryGuid").ToString());
Console.WriteLine(result[0].GetProperty("categories")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result[0].GetProperty("language").ToString());
Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("description").ToString());
Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("expression").ToString());
Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("status").ToString());
Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("steward").ToString());
Console.WriteLine(result[0].GetProperty("terms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result[0].GetProperty("usage").ToString());

Applies to

BatchGetAsync(Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, CancellationToken)

Source:
Glossary.cs

Get all glossaries. Recommend using limit/offset to get pagination result. Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories separately using

'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' and

'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'.

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

Parameters

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.

ignoreTermsAndCategories
Nullable<Boolean>

Whether ignore terms and categories.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call BatchGetAsync.

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

Response<IReadOnlyList<AtlasGlossary>> response = await client.BatchGetAsync();

This sample shows how to call BatchGetAsync 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<AtlasGlossary>> response = await client.BatchGetAsync(limit: 1234, offset: 1234, sort: "<sort>", ignoreTermsAndCategories: true);

Applies to