Resource Schema REST API Reference
Use the Resource Schema REST API to get the schema or skill package required for the specified skill. Use this information to validate your schema or directory structure before errors occur.
The skill manifest is the JSON representation of your skill, and provides Alexa with all the metadata required for your skill. The skill package is the directory structure an Alexa skill. You use the skill package when you implement your skill in a local development environment, such as Alexa Skills Toolkit for Visual Studio Code.
API endpoint
The endpoint of the Resource Schema 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 Resource Schema API includes the following operations.
Operation | HTTP method and URI |
---|---|
|
Get resource schema
Get the schema or skill package for the specified skill.
Request
To get the schema, you make a GET
request to the resourceSchema
resource.
Request path and header example
GET /v1/skills/resourceSchema/{resource}?vendorId={vendorId}&operation={operationName}
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 |
Name of the resource that you want to retrieve. |
String |
Yes |
|
Query |
Identifies the vendor to which the skill belongs. |
String |
Yes |
|
Query |
Operation for which you want the skill manifest schema. |
String |
No |
|
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 a URL to the requested schema or skill package.
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
{
"expiryTime": "2020-10-29T06:38:35.549Z",
"schemaLocationUrl": "https://example.com/schema"
}
Response body properties
Property | Description | Type |
---|---|---|
|
Time when the URL expires. |
String |
|
Presigned URL to the schema or skill package. |
String |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the required schema or skill package structure. |
|
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