Skip to content

Commit 2029fa5

Browse files
authored
Merge pull request #1 from aahill/patch-2
edits
2 parents 1ea83c3 + 34dbf18 commit 2029fa5

File tree

1 file changed

+11
-16
lines changed
  • articles/ai-services/language-service/conversational-language-understanding/concepts

1 file changed

+11
-16
lines changed

articles/ai-services/language-service/conversational-language-understanding/concepts/best-practices.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: language-service
1010
ms.topic: best-practice
11-
ms.date: 08/30/2023
11+
ms.date: 09/22/2023
1212
ms.author: aahi
1313
ms.custom: language-service-clu
1414
---
@@ -173,33 +173,28 @@ curl --request POST \
173173
}'
174174
```
175175

176-
## Best Practices for Copying Projects across language resources
176+
## Copy projects across language resources
177177

178-
CLU projects can be easily copied from one resource to another using the Copy button in the UI. However in some cases, it might be easier to copy projects via the API. Here is how to do it.
178+
Often you can copy conversational language understanding projects from one resource to another using the **copy** button in Azure Language Studio. However in some cases, it might be easier to copy projects using the API.
179179

180-
### Step 1
180+
First, identify the:
181+
* source project name
182+
* target project name
183+
* source language resource
184+
* target language resource, which is where you want to copy it to.
181185

182-
Identify the
186+
Call the API to authorize the copy action, and get the `accessTokens` for the actual copy operation later.
183187

184-
1. source-project-name
185-
186-
1. the target-project-name
187-
188-
1. the source-language-resource
189-
190-
1. the target-language-resource you want to copy it to. Call the authorize copy API as below to get the accessTokens for the actual Copy call (which is described in step 2)
191188
```console
192189
curl --request POST \
193190
--url 'https://<target-language-resource>.cognitiveservices.azure.com//language/authoring/analyze-conversations/projects/<source-project-name>/:authorize-copy?api-version=2023-04-15-preview' \
194191
--header 'Content-Type: application/json' \
195192
--header 'Ocp-Apim-Subscription-Key: <Your-Subscription-Key>' \
196193
--data '{"projectKind":"Conversation","allowOverwrite":false}'
197194
```
198-
199195

200-
### Step 2
196+
Call the API to complete the copy operation. Use the response you got earlier as the payload.
201197

202-
Call the Copy API to complete the copy operation. Use the response you get in Step1 as the payload in Step2 as is.
203198
```console
204199
curl --request POST \
205200
--url 'https://<source-language-resource>.cognitiveservices.azure.com/language/authoring/analyze-conversations/projects/<source-project-name>/:copy?api-version=2023-04-15-preview' \
@@ -213,4 +208,4 @@ curl --request POST \
213208
"targetResourceId": "<target-resource-id>",
214209
"targetResourceRegion": "<target-region>"
215210
}'
216-
```
211+
```

0 commit comments

Comments
 (0)