Skip to content

Commit cf0b8d4

Browse files
authored
Merge pull request #9670 from mendix/qt-folderstructure
Update REST Services folder structure
2 parents 3404a0d + ffe199a commit cf0b8d4

File tree

110 files changed

+95
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+95
-95
lines changed

content/en/docs/refguide/modeling/integration/rest-services/consumed-rest-services/consumed-rest-service.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Download [Studio Pro](https://marketplace.mendix.com/link/studiopro/) and add th
4343

4444
1. Right-click the module you want to add the Consumed REST Service document to.
4545
2. Select **Add other** > **Consumed REST service**.
46-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/add-consumed-rest-service.png" width="500" class="no-border" >}}
46+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/add-consumed-rest-service.png" width="500" class="no-border" >}}
4747
3. Name the service.
4848
4. Under **Add request(s)**, choose whether you want to add your request **Manually**, or **From OpenAPI/Swagger contract**.
4949

@@ -71,19 +71,19 @@ Create a `GET`, `POST`, `PUT`, `PATCH`, or `DELETE` request to send data to your
7171
1. In the **Method & URL** field, use the drop-down to select the HTTP method you want to use.
7272
2. Add an endpoint and click **Send**.
7373

74-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/general-section.png" class="no-border" width="500" >}}
74+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/general-section.png" class="no-border" width="500" >}}
7575

7676
3. Click **Base URL**.
7777
4. Add a base URL to use the same URL across all requests in this consumed REST Service document.
7878

79-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/base-url.png" class="no-border" width="500" >}}
79+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/base-url.png" class="no-border" width="500" >}}
8080

8181
To make the base URL dynamic, see the [Dynamic Base URL](#dynamic-base-url) section below.
8282

8383
5. Click **Authentication**.
8484
6. Select an authentication method, then click **OK**. For more information, see [Authentication methods](#authentication).
8585

86-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/configuration-screen.png" width="500" >}}
86+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/configuration-screen.png" width="500" >}}
8787

8888
7. Click **Send**.
8989

@@ -95,11 +95,11 @@ To add more requests from your existing contract, do the following:
9595

9696
1. In the **Request** field, click **Add Request**:
9797

98-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/add-request-button.png" class="no-border" width="400" >}}
98+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/add-request-button.png" class="no-border" width="400" >}}
9999

100100
2. In the **Add Request(s)** dialog box, select the additional requests you want to add to the document, then click **Add**.
101101

102-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/add-request.png" class="no-border" width="400" >}}
102+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/add-request.png" class="no-border" width="400" >}}
103103

104104
To create a new blank request, click **New** in the **Add Request(s)** dialog box.
105105

@@ -110,7 +110,7 @@ You can configure basic authentication to use for all requests in your document.
110110
1. Click **Authentication**.
111111
2. In the **Authentication method** field, click the drop-down and select **Basic authentication**.
112112

113-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/authentication-setup.png" >}}
113+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/authentication-setup.png" >}}
114114

115115
3. Select a constant or create a new one for your username and password. To create a new constant, follow these steps:
116116
1. Next to **Username** or **Password**, click **Select** > **New**.
@@ -127,14 +127,14 @@ Parameters are not supported in the Authentication section.
127127

128128
Parameters are fully supported in the path and query part of the URL, in the header value, and in the body. They are defined within curly brackets. For example, in the URL, defining `number` as parameter would be `http://numbersapi.com/{number}`. The parameters that are configured for the URL, headers, or body within curly brackets are automatically added to the parameters grid.
129129

130-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/get-header.png" class="no-border" >}}
130+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/get-header.png" class="no-border" >}}
131131

132132
You can manually add new parameters to the parameters grid directly. To do so, follow these steps:
133133

134134
1. Open the **Parameters** tab and click **Add parameter**.
135135
2. Name your parameter and add a test value.
136136

137-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/adding-parameters.png" class="no-border" width="600" >}}
137+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/adding-parameters.png" class="no-border" width="600" >}}
138138

139139
3. To test the parameters, click **Send**.
140140

@@ -146,7 +146,7 @@ You can add a Base URL as a parameter. To do this, follow these steps:
146146
2. In the Dynamic field, select **Yes**.
147147
3. Click **OK**
148148

149-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/dynamic-base-url.png" class="no-border" width="600" >}}
149+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/dynamic-base-url.png" class="no-border" width="600" >}}
150150

151151
Your base URL is now considered as a parameter. You can change its value in the [Send REST Request](/refguide/send-rest-request/) microflow activity.
152152

@@ -156,15 +156,15 @@ You can add a header for any HTTP request you have specified in your document. T
156156

157157
1. Open the **Headers** tab and click **Add header**.
158158

159-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/header-example.png" class="no-border" width="300" >}}
159+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/header-example.png" class="no-border" width="300" >}}
160160

161161
2. In the **Key** field, click the drop-down and choose from the list of the most commonly used HTTP headers. You can also create a custom header by typing directly in the key field and adding a value in the **Value** field.
162162

163163
3. Click **OK**. To test the header, click **Send**.
164164

165165
You can also add a parameter as the test value of a header, as seen below. For example, you can define an Authorization header where the authentication token is dynamic.
166166

167-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/parameters-for-header.png" class="no-border" width="300" >}}
167+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/parameters-for-header.png" class="no-border" width="300" >}}
168168

169169
### Adding a Request Body (for POST, PUT, and PATCH requests only) {#add-a-request-body}
170170

@@ -174,13 +174,13 @@ You can also add a parameter as the test value of a header, as seen below. For e
174174

175175
If the request body content is static, paste the text into the **Body** tab. This text will be included as the body content when you send the request.
176176

177-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/json-example.png" class="no-border" width="300" >}}
177+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/json-example.png" class="no-border" width="300" >}}
178178

179179
#### Adding a Request Body Using Parameters
180180

181181
When the text in the Body tab contains a parameter name surrounded by curly braces, it is interpreted as a parameter. These parameters can be used to change the body content dynamically.
182182

183-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/body-structure-example.png" class="no-border" width="500" >}}
183+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/body-structure-example.png" class="no-border" width="500" >}}
184184

185185
For example, if your body content is `product_curr={currency}&product_price={price}`, the parameters `currency` and `price` can be used to change the body content.
186186

@@ -196,7 +196,7 @@ Create body entities from a JSON snippet to your request by doing the following:
196196

197197
3. If you want to use the newly-created JSON string as an entity in your domain model, click **Use JSON Snippet**. The body string can be viewed in the **Body structure** tab.
198198

199-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/body-structure-tab.png" class="no-border" width="400" >}}
199+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/body-structure-tab.png" class="no-border" width="400" >}}
200200

201201
The entity name is prefilled, but you can change it to a custom name.
202202

@@ -206,13 +206,13 @@ Create body entities from a JSON snippet to your request by doing the following:
206206

207207
You can check the response of your request in the **Response data** tab.
208208

209-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/response-tab.png" class="no-border" width="500" >}}
209+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/response-tab.png" class="no-border" width="500" >}}
210210

211211
#### Response is in JSON Format {#create-entity}
212212

213213
If the response is in JSON format and you want to use the response to create an entity, open the **Response structure** tab, which displays a preview of the response data:
214214

215-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/response-structure-tab.png" class="no-border" width="500" >}}
215+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/response-structure-tab.png" class="no-border" width="500" >}}
216216

217217
The entity name is prefilled, but you can change it to a custom name. To create an entity, do the following:
218218

@@ -244,6 +244,6 @@ To select a request in the microflow, complete the following steps:
244244
1. Create a new microflow and drag the [Send REST request](/refguide/send-rest-request/) activity into it.
245245
2. Double-click the activity and click **Select** to choose the request you want to add, then click **Select** > **OK**.
246246

247-
{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/send-request-activity.png" class="no-border" width="500" >}}
247+
{{< figure src="/attachments/refguide/modeling/integration/rest-services/consumed-rest-service/send-request-activity.png" class="no-border" width="500" >}}
248248

249249
If you have defined parameters in the request, they will be added to the activity. Click **Edit** to change the parameter in the microflow. The parameter values in this activity are used by the runtime instead of the test value defined in the request.

0 commit comments

Comments
 (0)