Skip to content

Commit c494a37

Browse files
authored
Update rest-api.md
1 parent cb911b6 commit c494a37

File tree

1 file changed

+8
-58
lines changed
  • articles/cognitive-services/language-service/custom-classification/includes/quickstarts

1 file changed

+8
-58
lines changed

articles/cognitive-services/language-service/custom-classification/includes/quickstarts/rest-api.md

Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,13 @@ Create a **POST** request using the following URL, headers, and JSON body to cre
7272
Use the following URL to create a project and import your tags file. Replace the placeholder values below with your own values.
7373

7474
```rest
75-
{YOUR-ENDPOINT}/language/analyze-text/projects/{projectName}/:import.
75+
{YOUR-ENDPOINT}/language/analyze-text/projects/{projectName}/:import?api-version=2021-11-01-preview
7676
```
7777

7878
|Placeholder |Value | Example |
7979
|---------|---------|---------|
8080
|`{YOUR-ENDPOINT}` | The endpoint for authenticating your API request. | `https://<your-custom-subdomain>.cognitiveservices.azure.com` |
8181

82-
### Parameters
83-
84-
Pass the following parameter with your request.
85-
86-
|Key|Explanation|Value|
87-
|--|--|--|
88-
|`api-version`| The API version used.| `2021-11-01-preview` |
89-
90-
To pass the parameter, add `?api-version=2021-11-01-preview` to the end of your request URL.
91-
9282
### Headers
9383

9484
Use the following header to authenticate your request.
@@ -153,24 +143,14 @@ After your project has been created, you can begin training a text classificatio
153143
Use the following URL when creating your API request. Replace the placeholder values below with your own values.
154144

155145
```rest
156-
{YOUR-ENDPOINT}/language/analyze-text/projects/{PROJECT-NAME}/:train
146+
{YOUR-ENDPOINT}/language/analyze-text/projects/{PROJECT-NAME}/:train?api-version=2021-11-01-preview
157147
```
158148

159149
|Placeholder |Value | Example |
160150
|---------|---------|---------|
161151
|`{YOUR-ENDPOINT}` | The endpoint for authenticating your API request. | `https://<your-custom-subdomain>.cognitiveservices.azure.com` |
162152
|`{PROJECT-NAME}` | The name for your project. This value is case-sensitive. | `myProject` |
163153

164-
### Parameters
165-
166-
Pass the following parameter with your request.
167-
168-
|Key|Explanation|Value|
169-
|--|--|--|
170-
|`api-version`| The API version used.| `2021-11-01-preview` |
171-
172-
To pass the parameter, add `?api-version=2021-11-01-preview` to the end of your request URL.
173-
174154
### Headers
175155

176156
Use the following header to authenticate your request.
@@ -198,7 +178,7 @@ Use the following JSON in your request. The model will be named `MyModel` once t
198178
Once you send your API request, you will receive a `202` response indicating success. In the response headers, extract the `location` value. It will be formatted like this:
199179

200180
```rest
201-
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/train/jobs/{JOB-ID}?api-version=xxxx-xx-xx-xxxxxxx
181+
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/train/jobs/{JOB-ID}?api-version=2021-11-01-preview
202182
```
203183

204184
`JOB-ID` is used to identify your request, since this operation is asynchronous. You will use this URL in the next step to get the training status.
@@ -209,7 +189,7 @@ Use the following **GET** request to query the status of your model's training p
209189

210190

211191
```rest
212-
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/train/jobs/{JOB-ID}
192+
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/train/jobs/{JOB-ID}?api-version=2021-11-01-preview
213193
```
214194

215195
|Placeholder |Value | Example |
@@ -218,16 +198,6 @@ Use the following **GET** request to query the status of your model's training p
218198
|`{PROJECT-NAME}` | The name for your project. This value is case-sensitive. | `myProject` |
219199
|`{JOB-ID}` | The ID for locating your model's training status. This is in the `location` header value you received in the previous step. | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx` |
220200

221-
### Parameters
222-
223-
Pass the following parameter with your request.
224-
225-
|Key|Explanation|Value|
226-
|--|--|--|
227-
|`api-version`| The API version used.| `2021-11-01-preview` |
228-
229-
To pass the parameter, add `?api-version=2021-11-01-preview` to the end of your request URL.
230-
231201
### Headers
232202

233203
Use the following header to authenticate your request.
@@ -277,7 +247,7 @@ Once you send the request, you will get the following response.
277247
Create a **PUT** request using the following URL, headers, and JSON body to start deploying a text classification model.
278248

279249
```rest
280-
{YOUR-ENDPOINT}/language/analyze-text/projects/{PROJECT-NAME}/deployments/{DEPLOYMENT-NAME}
250+
{YOUR-ENDPOINT}/language/analyze-text/projects/{PROJECT-NAME}/deployments/{DEPLOYMENT-NAME}?api-version=2021-11-01-preview
281251
```
282252

283253
|Placeholder |Value | Example |
@@ -286,16 +256,6 @@ Create a **PUT** request using the following URL, headers, and JSON body to star
286256
|`{PROJECT-NAME}` | The name for your project. This value is case-sensitive. | `myProject` |
287257
|`{DEPLOYMENT-NAME}` | The name of your deployment. This value is case-sensitive. | `prod` |
288258

289-
### Parameters
290-
291-
Pass the following parameter with your request.
292-
293-
|Key|Explanation|Value|
294-
|--|--|--|
295-
|`api-version`| The API version used.| `2021-11-01-preview` |
296-
297-
To pass the parameter, add `?api-version=2021-11-01-preview` to the end of your request URL.
298-
299259
### Headers
300260

301261
Use the following header to authenticate your request.
@@ -318,7 +278,7 @@ Use the following JSON in your request. The model will be named `MyModel` once t
318278
Once you send your API request, you will receive a `202` response indicating success. In the response headers, extract the `location` value. It will be formatted like this:
319279

320280
```rest
321-
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/deployments/{DEPLOYMENT-NAME}/jobs/{JOB-ID}?api-version=xxxx-xx-xx-xxxxxxx
281+
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/deployments/{DEPLOYMENT-NAME}/jobs/{JOB-ID}?api-version=2021-11-01-preview
322282
```
323283

324284
`JOB-ID` is used to identify your request, since this operation is asynchronous. You will use this URL in the next step to get the publishing status.
@@ -328,7 +288,7 @@ Once you send your API request, you will receive a `202` response indicating suc
328288
Use the following **GET** request to query the status of your model's publishing process. You can use the URL you received from the previous step, or replace the placeholder values below with your own values.
329289

330290
```rest
331-
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/deployments/{DEPLOYMENT-NAME}/jobs/{JOB-ID}
291+
{YOUR-ENDPOINT}/language/analyze-text/projects/{YOUR-PROJECT-NAME}/deployments/{DEPLOYMENT-NAME}/jobs/{JOB-ID}?api-version=2021-11-01-preview
332292
```
333293

334294
|Placeholder |Value | Example |
@@ -338,16 +298,6 @@ Use the following **GET** request to query the status of your model's publishing
338298
|`{DEPLOYMENT-NAME}` | The name of your deployment. This value is case-sensitive. | `prod` |
339299
|`{JOB-ID}` | The ID for locating your model's training status. This is in the `location` header value you received in the previous step. | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx` |
340300

341-
### Parameters
342-
343-
Pass the following parameter with your request.
344-
345-
|Key|Explanation|Value|
346-
|--|--|--|
347-
|`api-version`| The API version used.| `2021-11-01-preview` |
348-
349-
To pass the parameter, add `?api-version=2021-11-01-preview` to the end of your request URL.
350-
351301
### Headers
352302

353303
Use the following header to authenticate your request.
@@ -525,4 +475,4 @@ Use the following header to authenticate your request.
525475

526476
|Key|Value|
527477
|--|--|
528-
|Ocp-Apim-Subscription-Key| The key to your resource. Used for authenticating your API requests.|
478+
|Ocp-Apim-Subscription-Key| The key to your resource. Used for authenticating your API requests.|

0 commit comments

Comments
 (0)