Skip to content

Commit eef05f6

Browse files
Merge pull request #252506 from abhishekpsen/docs-editor/best-practices-1695330084
Update best-practices.md
2 parents 465c844 + 2029fa5 commit eef05f6

File tree

1 file changed

+39
-2
lines changed
  • articles/ai-services/language-service/conversational-language-understanding/concepts

1 file changed

+39
-2
lines changed

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

Lines changed: 39 additions & 2 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
---
@@ -171,4 +171,41 @@ curl --request POST \
171171
}
172172
}
173173
}'
174-
```
174+
```
175+
176+
## Copy projects across language resources
177+
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.
179+
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.
185+
186+
Call the API to authorize the copy action, and get the `accessTokens` for the actual copy operation later.
187+
188+
```console
189+
curl --request POST \
190+
--url 'https://<target-language-resource>.cognitiveservices.azure.com//language/authoring/analyze-conversations/projects/<source-project-name>/:authorize-copy?api-version=2023-04-15-preview' \
191+
--header 'Content-Type: application/json' \
192+
--header 'Ocp-Apim-Subscription-Key: <Your-Subscription-Key>' \
193+
--data '{"projectKind":"Conversation","allowOverwrite":false}'
194+
```
195+
196+
Call the API to complete the copy operation. Use the response you got earlier as the payload.
197+
198+
```console
199+
curl --request POST \
200+
--url 'https://<source-language-resource>.cognitiveservices.azure.com/language/authoring/analyze-conversations/projects/<source-project-name>/:copy?api-version=2023-04-15-preview' \
201+
--header 'Content-Type: application/json' \
202+
--header 'Ocp-Apim-Subscription-Key: <Your-Subscription-Key>\
203+
--data '{
204+
"projectKind": "Conversation",
205+
"targetProjectName": "<target-project-name>",
206+
"accessToken": "<access-token>",
207+
"expiresAt": "<expiry-date>",
208+
"targetResourceId": "<target-resource-id>",
209+
"targetResourceRegion": "<target-region>"
210+
}'
211+
```

0 commit comments

Comments
 (0)