You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also exercise the control plane APIs by interacting with Azure Digital Twins through the [Azure portal](https://portal.azure.com) and [CLI](/cli/azure/dt).
You can also exercise the data plane APIs by interacting with Azure Digital Twins through the [CLI](/cli/azure/dt).
39
39
40
-
## Usage and authentication notes
41
-
42
-
This section contains more detailed information about using the APIs and SDKs.
43
-
44
-
### API notes
45
-
46
-
Here's some general information for calling the Azure Digital Twins APIs directly.
47
-
* You can use an HTTP REST-testing tool to make direct calls to the Azure Digital Twins APIs. For more information about this process, see [Call the Azure Digital Twins APIs](how-to-use-apis.md).
48
-
* Azure Digital Twins doesn't currently support Cross-Origin Resource Sharing (CORS). For more info about the impact and resolution strategies, see [Cross-Origin Resource Sharing (CORS) for Azure Digital Twins](concepts-security.md#cross-origin-resource-sharing-cors).
49
-
50
-
Here's some more information about authentication for API requests.
51
-
* One way to generate a bearer token for Azure Digital Twins API requests is with the [az account get-access-token](/cli/azure/account#az-account-get-access-token()) CLI command. For detailed instructions, see [Add bearer token](how-to-use-apis.md#add-bearer-token).
52
-
* Requests to the Azure Digital Twins APIs require a user or service principal that is a part of the same [Microsoft Entra ID](../active-directory/fundamentals/active-directory-whatis.md) tenant where the Azure Digital Twins instance exists. To prevent malicious scanning of Azure Digital Twins endpoints, requests with access tokens from outside the originating tenant will be returned a "404 Sub-Domain not found" error message. This error will be returned even if the user or service principal was given an Azure Digital Twins Data Owner or Azure Digital Twins Data Reader role through [Microsoft Entra B2B](../active-directory/external-identities/what-is-b2b.md) collaboration. For information on how to achieve access across multiple tenants, see [Write app authentication code](how-to-authenticate-client.md#authenticate-across-tenants).
53
-
54
-
### SDK notes
55
-
56
-
The underlying SDK for Azure Digital Twins is `Azure.Core`. See the [Azure namespace documentation](/dotnet/api/azure) for reference on the SDK infrastructure and types.
57
-
58
-
Here's some more information about authentication with the SDKs.
59
-
* Start by instantiating the `DigitalTwinsClient` class. The constructor requires credentials that can be obtained with different kinds of authentication methods in the `Azure.Identity` package. For more on `Azure.Identity`, see its [namespace documentation](/dotnet/api/azure.identity).
60
-
* You may find the `InteractiveBrowserCredential` useful while getting started, but there are several other options, including credentials for [managed identity](/dotnet/api/azure.identity.interactivebrowsercredential), which you'll likely use to authenticate [Azure functions set up with MSI](../app-service/overview-managed-identity.md) against Azure Digital Twins. For more about `InteractiveBrowserCredential`, see its [class documentation](/dotnet/api/azure.identity.interactivebrowsercredential).
61
-
62
-
Here's some more information about functions and returned data.
63
-
* All service API calls are exposed as member functions on the `DigitalTwinsClient` class.
64
-
* All service functions exist in synchronous and asynchronous versions.
65
-
* All service functions throw an exception for any return status of 400 or above. Make sure you wrap calls into a `try` section, and catch at least `RequestFailedExceptions`. For more about this type of exception, see its [reference documentation](/dotnet/api/azure.requestfailedexception).
66
-
* Most service methods return `Response<T>` or (`Task<Response<T>>` for the asynchronous calls), where `T` is the class of return object for the service call. The [Response](/dotnet/api/azure.response-1) class encapsulates the service return and presents return values in its `Value` field.
67
-
* Service methods with paged results return `Pageable<T>` or `AsyncPageable<T>` as results. For more about the `Pageable<T>` class, see its [reference documentation](/dotnet/api/azure.pageable-1); for more about `AsyncPageable<T>`, see its [reference documentation](/dotnet/api/azure.asyncpageable-1).
68
-
* You can iterate over paged results using an `await foreach` loop. For more about this process, see [Iterating with Async Enumerables in C# 8](/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8).
69
-
* Service methods return strongly typed objects wherever possible. However, because Azure Digital Twins is based on models custom-configured by the user at runtime (via DTDL models uploaded to the service), many service APIs take and return twin data in JSON format.
70
-
71
-
### Serialization helpers in the .NET (C#) SDK
72
-
73
-
Serialization helpers are helper functions available within the [.NET (C#) SDK](/dotnet/api/overview/azure/digitaltwins.core-readme) for quickly creating or deserializing twin data for access to basic information. Since the core SDK methods return twin data as JSON by default, it can be helpful to use these helper classes to break down the twin data further.
74
-
75
-
The available helper classes are:
76
-
*`BasicDigitalTwin`: Generically represents the core data of a digital twin
77
-
*`BasicDigitalTwinComponent`: Generically represents a component in the `Contents` properties of a `BasicDigitalTwin`
78
-
*`BasicRelationship`: Generically represents the core data of a relationship
79
-
*`DigitalTwinsJsonPropertyName`: Contains the string constants for use in JSON serialization and deserialization for custom digital twin types
80
-
81
40
## Bulk import with the Import Jobs API
82
41
83
42
The [Import Jobs API](/rest/api/digital-twins/dataplane/jobs) is a data plane API that allows you to import a set of models, twins, and/or relationships in a single API call. Import Jobs API operations are also included with the [CLI commands](/cli/azure/dt/job/import) and [data plane SDKs](#data-plane-apis). Using the Import Jobs API requires use of [Azure Blob Storage](../storage/blobs/storage-blobs-introduction.md).
@@ -178,6 +137,48 @@ Keep the following considerations in mind while working with the Delete Jobs API
178
137
* Delete Jobs are not atomic operations. There is no rollback in the case of failure, partial job completion, or timeout of the job.
179
138
* Only one bulk job is supported at a time within an Azure Digital Twins instance. You can view this information and other numerical limits of the Jobs APIs in [Azure Digital Twins limits](reference-service-limits.md).
180
139
140
+
## Usage and authentication notes
141
+
142
+
This section contains more detailed information about using the APIs and SDKs.
143
+
144
+
### API notes
145
+
146
+
Here's some general information for calling the Azure Digital Twins APIs directly.
147
+
* You can use an HTTP REST-testing tool to make direct calls to the Azure Digital Twins APIs. For more information about this process, see [Call the Azure Digital Twins APIs](how-to-use-apis.md).
148
+
* Azure Digital Twins doesn't currently support Cross-Origin Resource Sharing (CORS). For more info about the impact and resolution strategies, see [Cross-Origin Resource Sharing (CORS) for Azure Digital Twins](concepts-security.md#cross-origin-resource-sharing-cors).
149
+
150
+
Here's some more information about authentication for API requests.
151
+
* One way to generate a bearer token for Azure Digital Twins API requests is with the [az account get-access-token](/cli/azure/account#az-account-get-access-token()) CLI command. For detailed instructions, see [Add bearer token](how-to-use-apis.md#add-bearer-token).
152
+
* Requests to the Azure Digital Twins APIs require a user or service principal that is a part of the same [Microsoft Entra ID](../active-directory/fundamentals/active-directory-whatis.md) tenant where the Azure Digital Twins instance exists. To prevent malicious scanning of Azure Digital Twins endpoints, requests with access tokens from outside the originating tenant will be returned a "404 Sub-Domain not found" error message. This error will be returned even if the user or service principal was given an Azure Digital Twins Data Owner or Azure Digital Twins Data Reader role through [Microsoft Entra B2B](../active-directory/external-identities/what-is-b2b.md) collaboration. For information on how to achieve access across multiple tenants, see [Write app authentication code](how-to-authenticate-client.md#authenticate-across-tenants).
153
+
154
+
### SDK notes
155
+
156
+
The underlying SDK for Azure Digital Twins is `Azure.Core`. See the [Azure namespace documentation](/dotnet/api/azure) for reference on the SDK infrastructure and types.
157
+
158
+
Here's some more information about authentication with the SDKs.
159
+
* Start by instantiating the `DigitalTwinsClient` class. The constructor requires credentials that can be obtained with different kinds of authentication methods in the `Azure.Identity` package. For more on `Azure.Identity`, see its [namespace documentation](/dotnet/api/azure.identity).
160
+
* You may find the `InteractiveBrowserCredential` useful while getting started, but there are several other options, including credentials for [managed identity](/dotnet/api/azure.identity.interactivebrowsercredential), which you'll likely use to authenticate [Azure functions set up with MSI](../app-service/overview-managed-identity.md) against Azure Digital Twins. For more about `InteractiveBrowserCredential`, see its [class documentation](/dotnet/api/azure.identity.interactivebrowsercredential).
161
+
162
+
Here's some more information about functions and returned data.
163
+
* All service API calls are exposed as member functions on the `DigitalTwinsClient` class.
164
+
* All service functions exist in synchronous and asynchronous versions.
165
+
* All service functions throw an exception for any return status of 400 or above. Make sure you wrap calls into a `try` section, and catch at least `RequestFailedExceptions`. For more about this type of exception, see its [reference documentation](/dotnet/api/azure.requestfailedexception).
166
+
* Most service methods return `Response<T>` or (`Task<Response<T>>` for the asynchronous calls), where `T` is the class of return object for the service call. The [Response](/dotnet/api/azure.response-1) class encapsulates the service return and presents return values in its `Value` field.
167
+
* Service methods with paged results return `Pageable<T>` or `AsyncPageable<T>` as results. For more about the `Pageable<T>` class, see its [reference documentation](/dotnet/api/azure.pageable-1); for more about `AsyncPageable<T>`, see its [reference documentation](/dotnet/api/azure.asyncpageable-1).
168
+
* You can iterate over paged results using an `await foreach` loop. For more about this process, see [Iterating with Async Enumerables in C# 8](/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8).
169
+
* Service methods return strongly typed objects wherever possible. However, because Azure Digital Twins is based on models custom-configured by the user at runtime (via DTDL models uploaded to the service), many service APIs take and return twin data in JSON format.
170
+
171
+
### Serialization helpers in the .NET (C#) SDK
172
+
173
+
Serialization helpers are helper functions available within the [.NET (C#) SDK](/dotnet/api/overview/azure/digitaltwins.core-readme) for quickly creating or deserializing twin data for access to basic information. Since the core SDK methods return twin data as JSON by default, it can be helpful to use these helper classes to break down the twin data further.
174
+
175
+
The available helper classes are:
176
+
*`BasicDigitalTwin`: Generically represents the core data of a digital twin
177
+
*`BasicDigitalTwinComponent`: Generically represents a component in the `Contents` properties of a `BasicDigitalTwin`
178
+
*`BasicRelationship`: Generically represents the core data of a relationship
179
+
*`DigitalTwinsJsonPropertyName`: Contains the string constants for use in JSON serialization and deserialization for custom digital twin types
180
+
181
+
181
182
## Monitor API metrics
182
183
183
184
API metrics such as requests, latency, and failure rate can be viewed in the [Azure portal](https://portal.azure.com/).
Copy file name to clipboardExpand all lines: articles/digital-twins/concepts-azure-digital-twins-explorer.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure Digital Twins
5
5
description: Learn about the capabilities and purpose of Azure Digital Twins Explorer (preview) and when it can be a useful tool for visualizing digital models, twins, and graphs.
6
6
author: baanders
7
7
ms.author: baanders # Microsoft employees only
8
-
ms.date: 06/29/2023
8
+
ms.date: 01/27/2025
9
9
ms.topic: conceptual
10
10
ms.service: azure-digital-twins
11
11
@@ -64,21 +64,13 @@ For detailed instructions on how to use each feature, see [Use Azure Digital Twi
Azure Digital Twins Explorer is an open-source tool that welcomes contributions to the code and documentation. The hosted application is deployed regularly from a source code repository in GitHub.
70
-
71
-
To view the source code for the tool and read detailed instructions on how to contribute to the code, visit its GitHub repository: [digital-twins-explorer](https://github.com/Azure-Samples/digital-twins-explorer).
72
-
73
-
To view instructions for contributing to this documentation, review our [contributor guide](/contribute/).
74
-
75
67
## Other considerations
76
68
77
69
### Region support
78
70
79
71
Azure Digital Twins Explorer is available for use with all instances of Azure Digital Twins in all [supported regions](https://azure.microsoft.com/global-infrastructure/services/?products=digital-twins).
80
72
81
-
During public preview, however, data may be sent for processing through different regions than the region where the instance is hosted. To avoid data being routed in this way in situations where data sovereignty is a concern, you can download the [open source code](#how-to-contribute) to create a locally hosted version of the explorer on your own machine.
73
+
During public preview, however, data may be sent for processing through different regions than the region where the instance is hosted. To avoid data being routed in this way in situations where data sovereignty is a concern, you can download the open source code from the [digital-twins-explorer](https://github.com/Azure-Samples/digital-twins-explorer) repository to create a locally hosted version of the explorer on your own machine.
0 commit comments