Skill Rollback REST API Reference
Use the Skill Rollback REST API to revert your skill to a previous live version without having to submit the skill for recertification. For example, if your new skill version introduced a bug or any other unintended behaviors, you can roll back the skill to a previous version.
To roll back a skill, your skill must meet the rollback eligibility requirements. For more details, see Skill Rollback.
You can roll back a skill in the Alexa developer console also. For details, see Roll back your skill by using the console. Or, you can roll back a skill by using the Alexa Skills Kit (ASK) Command Line Interface rollback-skill
command.
API endpoint
The endpoint of the Skill Rollback 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 Skill Rollback API includes the following operations.
Operation | HTTP method and URI |
---|---|
| |
|
Get rollback status
Get the rollback status of the specified skill and rollback ID.
Request
To get the rollback status, you make a GET
request to the rollbacks
resource.
Request path and header example
GET /v1/skills/{skillId}/rollbacks/{rollbackRequestId}
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 |
Identifies the rollback 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 rollback status.
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
{
"id": "rollback.id",
"status": "IN_PROGRESS",
"submissionTime": "Sat Jun 27 01:24:01 UTC 2020",
"targetVersion": "1",
"errors": [{
"code": "",
"validationDetails": {},
"message": ""
}]
}
Response body properties
Property | Description | Type |
---|---|---|
|
Identifies the rollback request. |
String |
|
Version of the skill to rollback to. |
String |
|
Data and time of the rollback request. |
String |
|
Current status of the rollback request. If the rollback failed, you can resubmit the rollback request. |
String |
|
List of errors. |
Array of objects |
|
HTTP status code that reflects the error. |
String |
|
Machine-readable structure that contains information about the error. Included if |
Object |
|
Human readable error message. |
String |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the rollback status and target version. |
|
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. |
Submit for rollback
Submit the specified skill for rollback to the specified target version. You can submit a skill for rollback or publishing at one time, but not both at the same time.
Request
To roll back a skill, you make a POST
request to the rollbacks
resource.
Request path and header example
POST /v1/skills/{skillId}/rollbacks
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 |
|
Header |
String |
Yes |
Request body example
{
"targetVersion" : "2"
}
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Skill version to which you want to roll back to. |
String |
Yes |
Response
A successful response returns HTTP 202 Accepted
, along with a Location
in the header that contains a path to the rollback and an ID in the body to track the rollback 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 following example shows a response.
{
"rollbackRequestId": "rollback.id.1"
}
Response body properties
Property | Description | Type |
---|---|---|
|
Identifies the rollback request. |
String |
HTTP status codes
Status | Description |
---|---|
|
Request to submit skill for rollback succeeded. The response body contains the rollback request ID. |
|
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. |
Related topics
Last updated: Aug 01, 2024