Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4566c4e

Browse files
committedMar 17, 2021
Enlarge images
1 parent 245f17a commit 4566c4e

10 files changed

+13
-13
lines changed
 

‎articles/digital-twins/how-to-use-postman.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The first step in importing the API set is to download the Swagger file for the
9595
Next, import the Swagger file as a new collection in Postman.
9696
9797
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":::
9999
100100
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*.
101101
1. Select the *Import* button to confirm.
@@ -104,33 +104,33 @@ Next, import the Swagger file as a new collection in Postman.
104104
105105
The newly imported collection can now be seen from your main Postman view, in the *Collections* tab.
106106
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":::
108108
109109
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.
110110
111111
### Configure and finish the collection
112112
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*.
114114
115115
:::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":::
116116
117117
Follow these steps to add a bearer token to the collection for authorization.
118118
119119
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.
120120
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":::
122122
123123
1. Set the *Type* to _**OAuth 2.0**, paste your access token into the *Access Token* box, and select *Save*.
124124
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":::
126126
127127
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.
128128
129129
1. Still in the *Azure Digital Twins API* edit dialog, move to the *Variables* tab.
130130
131131
1. Use your instance's **host name** from the [*Prerequisites*](#prerequisites) section to set the **CURRENT VALUE** field to `https://<host-name>`. Select *Save*.
132132
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":::
134134
135135
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.
136136
@@ -164,47 +164,47 @@ Requests in Postman are saved in **collections** (groups of requests). When you
164164
165165
1. To create a collection, select the *New* button in the main postman window.
166166
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":::
168168
169169
Choose a type of **Collection**.
170170
171171
:::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.":::
172172
173173
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.
174174
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":::
176176
177177
Next, continue on to the next section to add a bearer token to the collection for authorization.
178178
179179
### Configure and finish collection
180180
181181
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.
182182
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":::
184184
185185
1. Set the *Type* to _**OAuth 2.0**_, paste your access token into the *Access Token* box, and select *Save*.
186186
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":::
188188
189189
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.
190190
191191
The new collection can be seen from your main Postman view, under *Collections*.
192192
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":::
194194
195195
## Add an individual request
196196
197197
Now that your collection is set up, you can add your own requests to the Azure Digital Twin APIs.
198198
199199
1. To create a request, use the *New* button again.
200200
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":::
202202
203203
Choose a type of **Request**.
204204
205205
:::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.":::
206206
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.
208208
209209
:::row:::
210210
:::column:::
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.