Locale Cloning REST API Reference
Use the Locale Cloning REST API to clone the locale assets of your custom skill. You can use the clone to configure a new locale in the same language. For more details about skill cloning, see Clone a skill locale.
API endpoint
The endpoint of the Locale Cloning API is https://api.amazonalexa.com
.
Authentication
Each API request must have an authorization header whose value is the access token retrieved from Login with Amazon (LWA). For details, see Get an Access Token for SMAPI.
Operations
The Locale Cloning API includes the following operations.
Operation | HTTP method and URI |
---|---|
| |
|
Clone locale
Clone the locale assets for the specified skill and source locale. You can specify one or more target locales in a single request.
Request
To create a cloned locale, you make a POST
request to the cloneLocale
resource.
Request path and header example
POST /v1/skills/{skillId}/stages/{stage}/cloneLocale
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Identifies the skill. |
String |
Yes |
|
Path |
Indicates stage of the skill. You can clone skills in the |
String |
Yes |
|
Header |
String |
Yes |
Request body example
{
"sourceLocale": "en-US",
"targetLocales": [
"en-IN",
"en-GB"
],
"overwriteMode": "DO_NOT_OVERWRITE"
}
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Set to locale to be cloned. |
String |
Yes |
|
List of locale to create from the source locale. |
Array of string |
Yes |
|
Indicates whether the locale of the skill can be overwritten. |
String |
No |
Response
A successful response returns HTTP 202 Accepted
, along with a Location
in the header that contains a path to track the progress of the cloning request.
On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message.
Response body example
The response has no body.
Response body properties
The response has no body.
HTTP status codes
Status | Description |
---|---|
|
Request to submit a locale for cloning succeeded. |
|
Indicates that one or more properties in the request body aren't valid.
|
|
Request didn't include the authorization token, or the included token expired or isn't valid. Or, you don't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Permitted rate limit, specified as number of requests per unit of time, exceeded. Retry the request by using exponential back-off. |
|
Error occurred on the server. Retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Get clone locale status
Get the status of the clone locale request.
Request
To get the cloning status, you make a GET
request to the cloneLocaleRequests
resource.
Request path and header example
GET /v1/skills/{skillId}/stages/{stage}/cloneLocaleRequests/{cloneLocaleRequestId}
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Accept: application/json
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Identifies the skill. |
String |
Yes |
|
Path |
Indicates stage of the skill. You can clone skills in the |
String |
Yes |
|
Path |
Identifies the clone locale request. |
String |
Yes |
|
Header |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful response returns HTTP 200 OK
, along with the status of the clone request.
On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message.
Response body example
{
"sourceLocale": "en-US",
"status": "IN_PROGRESS",
"targetLocales": {
"en-IN": {
"status": "IN_PROGRESS"
},
"en-GB": {
"status": "SUCCEEDED"
}
}
}
Response body properties
Property | Description | Type |
---|---|---|
|
Overall status of the clone request. If set to |
String |
|
(Optional) List of errors that occur for the clone request. |
Array of objects |
|
Locale to be cloned. |
String |
|
List of locale to create from the source locale. |
Object |
|
Status of the clone to the specific locale. If set to |
String |
|
(Optional) List of errors that occur for the locale. |
String |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the status of the clone request. |
|
Indicates that one or more properties in the request body aren't valid.
|
|
Request didn't include the authorization token, or the included token expired or isn't valid. Or, you don't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Permitted rate limit, specified as number of requests per unit of time, exceeded. Retry the request by using exponential back-off. |
|
Error occurred on the server. Retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Object definitions
The Locale Cloning API defines the following objects.
Locale values
Set the locale
property to a locale code valid for your skill type. The following table shows valid values for the locale property.
Locale code | Language |
---|---|
|
Arabic (SA) |
|
German (DE) |
|
English (AU) |
|
English (CA) |
|
English (UK) |
|
English (IN) |
|
English (US) |
|
Spanish (ES) |
|
Spanish (MX) |
|
Spanish (US) |
|
French (CA) |
|
French (FR) |
|
Hindi (IN) |
|
Italian (IT) |
|
Japanese (JP) |
|
Dutch (NL) |
|
Portuguese (BR) |
Related topics
Last updated: Aug 01, 2024