Glossary.GetEntitiesAssignedWithTerm 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
GetEntitiesAssignedWithTerm(String, Nullable<Int32>, Nullable<Int32>, String, RequestContext) |
[Protocol Method] List all related objects assigned with the specified term. Recommend using limit/offset to get pagination result.
|
GetEntitiesAssignedWithTerm(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken) |
List all related objects assigned with the specified term. Recommend using limit/offset to get pagination result. |
GetEntitiesAssignedWithTerm(String, Nullable<Int32>, Nullable<Int32>, String, RequestContext)
- Source:
- Glossary.cs
[Protocol Method] List all related objects assigned with the specified term. 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 GetEntitiesAssignedWithTerm(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetEntitiesAssignedWithTerm (string termId, int? limit, int? offset, string sort, Azure.RequestContext context);
abstract member GetEntitiesAssignedWithTerm : string * Nullable<int> * Nullable<int> * string * Azure.RequestContext -> Azure.Response
override this.GetEntitiesAssignedWithTerm : string * Nullable<int> * Nullable<int> * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetEntitiesAssignedWithTerm (termId As String, limit As Nullable(Of Integer), offset As Nullable(Of Integer), sort As String, context As RequestContext) As Response
Parameters
- termId
- String
The globally unique identifier for glossary term.
- 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
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 GetEntitiesAssignedWithTerm 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.GetEntitiesAssignedWithTerm("<termId>", null, null, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].ToString());
This sample shows how to call GetEntitiesAssignedWithTerm 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.GetEntitiesAssignedWithTerm("<termId>", 1234, 1234, "<sort>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("guid").ToString());
Console.WriteLine(result[0].GetProperty("typeName").ToString());
Console.WriteLine(result[0].GetProperty("uniqueAttributes").GetProperty("<key>").ToString());
Console.WriteLine(result[0].GetProperty("displayText").ToString());
Console.WriteLine(result[0].GetProperty("entityStatus").ToString());
Console.WriteLine(result[0].GetProperty("relationshipType").ToString());
Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("attributes").GetProperty("<key>").ToString());
Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("typeName").ToString());
Console.WriteLine(result[0].GetProperty("relationshipAttributes").GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result[0].GetProperty("relationshipGuid").ToString());
Console.WriteLine(result[0].GetProperty("relationshipStatus").ToString());
Applies to
GetEntitiesAssignedWithTerm(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken)
- Source:
- Glossary.cs
List all related objects assigned with the specified term. Recommend using limit/offset to get pagination result.
public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedObjectId>> GetEntitiesAssignedWithTerm (string termId, int? limit = default, int? offset = default, string sort = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEntitiesAssignedWithTerm : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedObjectId>>
override this.GetEntitiesAssignedWithTerm : string * Nullable<int> * Nullable<int> * string * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasRelatedObjectId>>
Public Overridable Function GetEntitiesAssignedWithTerm (termId 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 AtlasRelatedObjectId))
Parameters
- termId
- String
The globally unique identifier for glossary term.
- sort
- String
The sort order, ASC (default) or DESC.
- 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 GetEntitiesAssignedWithTerm.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient();
Response<IReadOnlyList<AtlasRelatedObjectId>> response = client.GetEntitiesAssignedWithTerm("<termId>");
This sample shows how to call GetEntitiesAssignedWithTerm 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<AtlasRelatedObjectId>> response = client.GetEntitiesAssignedWithTerm("<termId>", limit: 1234, offset: 1234, sort: "<sort>");
Applies to
Azure SDK for .NET