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
Copy file name to clipboardExpand all lines: articles/digital-twins/how-to-use-postman.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ The first step in importing the API set is to download the Swagger file for the
95
95
Next, import the Swagger file as a new collection in Postman.
96
96
97
97
1. From the main Postman window, select the *Import* button.
98
-
:::image type="content" source="media/how-to-use-postman/postman-import-collection.png" alt-text="Screenshot of a newly opened Postman window. The 'Import' button is highlighted.":::
98
+
:::image type="content" source="media/how-to-use-postman/postman-import-collection.png" alt-text="Screenshot of a newly opened Postman window. The 'Import' button is highlighted." lightbox="media/how-to-use-postman/postman-import-collection.png":::
99
99
100
100
1. In the *Import* window that follows, select *Upload Files* and navigate to the *digitaltwins.json* file on your machine. Select it and hit *Open*.
101
101
1. Select the *Import* button to confirm.
@@ -104,33 +104,33 @@ Next, import the Swagger file as a new collection in Postman.
104
104
105
105
The newly imported collection can now be seen from your main Postman view, in the *Collections* tab.
106
106
107
-
:::image type="content" source="media/how-to-use-postman/postman-post-collection-imported.png" alt-text="Screenshot of the main Postman window. The newly imported collection is highlighted in the 'Collections' tab.":::
107
+
:::image type="content" source="media/how-to-use-postman/postman-post-collection-imported.png" alt-text="Screenshot of the main Postman window. The newly imported collection is highlighted in the 'Collections' tab." lightbox="media/how-to-use-postman/postman-post-collection-imported.png":::
108
108
109
109
Next, continue on to the next section to add a bearer token to the collection for authorization and connect it to your Azure Digital twins instance.
110
110
111
111
### Configure and finish the collection
112
112
113
-
Next, edit the collection you've created to configure some access details. To open the *EDIT COLLECTION* window, highlight the collection you've created and select the *View more actions* icon to pull up a menu. Select *Edit*.
113
+
Next, edit the collection you've created to configure some access details. Highlight the collection you've created and select the *View more actions* icon to pull up a menu. Select *Edit*.
114
114
115
115
:::image type="content" source="media/how-to-use-postman/postman-edit-collection.png" alt-text="Screenshot of the main Postman window. The 'View more actions' icon for the imported collection is highlighted, and 'Edit' is highlighted in the 'View more actions' menu." lightbox="media/how-to-use-postman/postman-edit-collection.png":::
116
116
117
117
Follow these steps to add a bearer token to the collection for authorization.
118
118
119
119
1. In the *Azure Digital Twins API* edit dialog, make sure you're on the *Authorization* tab. This is where you will place the **token value** you gathered in the [Get bearer token](#get-bearer-token) section in order to use it for all API requests in your collection.
120
120
121
-
:::image type="content" source="media/how-to-use-postman/postman-authorization-imported.png" alt-text="Screenshot of the imported collection's edit dialog in Postman, showing the 'Authorization' tab.":::
121
+
:::image type="content" source="media/how-to-use-postman/postman-authorization-imported.png" alt-text="Screenshot of the imported collection's edit dialog in Postman, showing the 'Authorization' tab." lightbox="media/how-to-use-postman/postman-authorization-imported.png":::
122
122
123
123
1. Set the *Type* to _**OAuth 2.0**, paste your access token into the *Access Token* box, and select *Save*.
124
124
125
-
:::image type="content" source="media/how-to-use-postman/postman-paste-token-imported.png" alt-text="Screenshot of the imported collection's edit dialog in Postman, showing the 'Authorization' tab. A Type of 'OAuth 2.0' is selected, and Access Token box where the access token value can be pasted is highlighted.":::
125
+
:::image type="content" source="media/how-to-use-postman/postman-paste-token-imported.png" alt-text="Screenshot of the imported collection's edit dialog in Postman, showing the 'Authorization' tab. A Type of 'OAuth 2.0' is selected, and Access Token box where the access token value can be pasted is highlighted." lightbox="media/how-to-use-postman/postman-paste-token-imported.png":::
126
126
127
127
Next, connect the collection to your Azure Digital Twins instance using the **baseURL** variable. The collection comes with this variable that represents the URL of your Azure Digital Twins instance. By setting a value for this variable and then using the variable in all of the requests in the collection, you can configure the entire set of requests with a single action.
128
128
129
129
1. Still in the *Azure Digital Twins API* edit dialog, move to the *Variables* tab.
130
130
131
131
1. Use your instance's **host name** from the [*Prerequisites*](#prerequisites) section to set the **CURRENT VALUE** field to `https://<host-name>`. Select *Save*.
132
132
133
-
:::image type="content" source="media/how-to-use-postman/postman-variables-imported.png" alt-text="Screenshot of the imported collection's edit dialog in Postman, showing the 'Variables' tab. The 'CURRENT VALUE' field is highlighted.":::
133
+
:::image type="content" source="media/how-to-use-postman/postman-variables-imported.png" alt-text="Screenshot of the imported collection's edit dialog in Postman, showing the 'Variables' tab. The 'CURRENT VALUE' field is highlighted." lightbox="media/how-to-use-postman/postman-variables-imported.png":::
134
134
135
135
When you're finished with the above steps, you're done configuring the collection. You can close the *Azure Digital Twins API* tab if you want.
136
136
@@ -164,47 +164,47 @@ Requests in Postman are saved in **collections** (groups of requests). When you
164
164
165
165
1. To create a collection, select the *New* button in the main postman window.
166
166
167
-
:::image type="content" source="media/how-to-use-postman/postman-new.png" alt-text="Screenshot of the main Postman window. The 'New' button is highlighted.":::
167
+
:::image type="content" source="media/how-to-use-postman/postman-new.png" alt-text="Screenshot of the main Postman window. The 'New' button is highlighted." lightbox="media/how-to-use-postman/postman-new.png":::
168
168
169
169
Choose a type of **Collection**.
170
170
171
171
:::image type="content" source="media/how-to-use-postman/postman-new-collection-2.png" alt-text="Screenshot of the 'Create New' dialog in Postman. The 'Collection' option is highlighted.":::
172
172
173
173
1. This will open a tab for filling the details of the new collection. Select the *Edit* icon next to the collection's default name (**New Collection**) to replace it with your own choice of name.
174
174
175
-
:::image type="content" source="media/how-to-use-postman/postman-new-collection-3.png" alt-text="Screenshot of the new collection's edit dialog in Postman. The Edit icon next to the name 'New Collection' is highlighted.":::
175
+
:::image type="content" source="media/how-to-use-postman/postman-new-collection-3.png" alt-text="Screenshot of the new collection's edit dialog in Postman. The Edit icon next to the name 'New Collection' is highlighted." lightbox="media/how-to-use-postman/postman-new-collection-3.png":::
176
176
177
177
Next, continue on to the next section to add a bearer token to the collection for authorization.
178
178
179
179
### Configure and finish collection
180
180
181
181
1. Still in the edit dialog for your new collection, move to the *Authorization* tab. This is where you will place the **token value** you gathered in the [Get bearer token](#get-bearer-token) section in order to use it for all API requests in your collection.
182
182
183
-
:::image type="content" source="media/how-to-use-postman/postman-authorization-custom.png" alt-text="Screenshot of the new collection's edit dialog in Postman, showing the 'Authorization' tab.":::
183
+
:::image type="content" source="media/how-to-use-postman/postman-authorization-custom.png" alt-text="Screenshot of the new collection's edit dialog in Postman, showing the 'Authorization' tab." lightbox="media/how-to-use-postman/postman-authorization-custom.png":::
184
184
185
185
1. Set the *Type* to _**OAuth 2.0**_, paste your access token into the *Access Token* box, and select *Save*.
186
186
187
-
:::image type="content" source="media/how-to-use-postman/postman-paste-token-custom.png" alt-text="Screenshot of the new collection's edit dialog in Postman, showing the 'Authorization' tab. A Type of 'OAuth 2.0' is selected, and Access Token box where the access token value can be pasted is highlighted.":::
187
+
:::image type="content" source="media/how-to-use-postman/postman-paste-token-custom.png" alt-text="Screenshot of the new collection's edit dialog in Postman, showing the 'Authorization' tab. A Type of 'OAuth 2.0' is selected, and Access Token box where the access token value can be pasted is highlighted." lightbox="media/how-to-use-postman/postman-paste-token-custom.png":::
188
188
189
189
When you're finished with the above steps, you're done configuring the collection. You can close the edit tab for the new collection if you want.
190
190
191
191
The new collection can be seen from your main Postman view, under *Collections*.
192
192
193
-
:::image type="content" source="media/how-to-use-postman/postman-post-collection-custom.png" alt-text="Screenshot of the main Postman window. The newly created custom collection is highlighted in the 'Collections' tab.":::
193
+
:::image type="content" source="media/how-to-use-postman/postman-post-collection-custom.png" alt-text="Screenshot of the main Postman window. The newly created custom collection is highlighted in the 'Collections' tab." lightbox="media/how-to-use-postman/postman-post-collection-custom.png":::
194
194
195
195
## Add an individual request
196
196
197
197
Now that your collection is set up, you can add your own requests to the Azure Digital Twin APIs.
198
198
199
199
1. To create a request, use the *New* button again.
200
200
201
-
:::image type="content" source="media/how-to-use-postman/postman-new.png" alt-text="Screenshot of the main Postman window. The 'New' button is highlighted.":::
201
+
:::image type="content" source="media/how-to-use-postman/postman-new.png" alt-text="Screenshot of the main Postman window. The 'New' button is highlighted." lightbox="media/how-to-use-postman/postman-new.png":::
202
202
203
203
Choose a type of **Request**.
204
204
205
205
:::image type="content" source="media/how-to-use-postman/postman-new-request-2.png" alt-text="Screenshot of the 'Create New' dialog in Postman. The 'Request' option is highlighted.":::
206
206
207
-
1. This action opens the *Save request* window, where you can enter a name for your request, give it an optional description, and choose the collection that it's a part of. Fill in the details and save the request to the collection you created earlier.
207
+
1. This action opens the *SAVE REQUEST* window, where you can enter a name for your request, give it an optional description, and choose the collection that it's a part of. Fill in the details and save the request to the collection you created earlier.
0 commit comments