Add rate limit headers and fix descriptions in Uploads model
Added rate limit headers to some error responses. Fixed descriptions. Affected file: uploads_2020-11-01.json
This commit is contained in:
parent
e3f1c7227b
commit
1a70e3b203
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Selling Partner API for Uploads",
|
"description": "The Uploads API lets you upload files that you can programmatically access using other Selling Partner APIs, such as the A+ Content API and the Messaging API.",
|
||||||
"description": "The Selling Partner API for Uploads provides operations that support uploading files.",
|
|
||||||
"version": "2020-11-01",
|
"version": "2020-11-01",
|
||||||
|
"title": "Selling Partner API for Uploads",
|
||||||
"contact": {
|
"contact": {
|
||||||
"name": "Selling Partner API Developer Support",
|
"name": "Selling Partner API Developer Support",
|
||||||
"url": "https://sellercentral.amazon.com/gp/mws/contactus.html"
|
"url": "https://sellercentral.amazon.com/gp/mws/contactus.html"
|
||||||
|
@ -26,19 +26,51 @@
|
||||||
"paths": {
|
"paths": {
|
||||||
"/uploads/2020-11-01/uploadDestinations/{resource}": {
|
"/uploads/2020-11-01/uploadDestinations/{resource}": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Creates an upload destination for a resource that you specify and returns the information required to upload to that destination.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| .1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.",
|
|
||||||
"operationId": "createUploadDestinationForResource",
|
|
||||||
"tags": [
|
"tags": [
|
||||||
"uploads"
|
"uploads"
|
||||||
],
|
],
|
||||||
|
"description": "Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| .1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.",
|
||||||
|
"operationId": "createUploadDestinationForResource",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "marketplaceIds",
|
||||||
|
"in": "query",
|
||||||
|
"description": "A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified.",
|
||||||
|
"required": true,
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"maxItems": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "contentMD5",
|
||||||
|
"in": "query",
|
||||||
|
"description": "An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "resource",
|
||||||
|
"in": "path",
|
||||||
|
"description": "The resource for the upload destination that you are creating. For example, if you are creating an upload destination for the createLegalDisclosure operation of the Messaging API, the {resource} would be /messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure, and the entire path would be /uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure.",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"x-amazon-spds-greedy-path-parameter": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "contentType",
|
||||||
|
"in": "query",
|
||||||
|
"description": "The content type of the file to be uploaded.",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
"description": "Success.",
|
"description": "Success.",
|
||||||
"headers": {
|
"schema": {
|
||||||
"x-amzn-requestId": {
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"examples": {
|
"examples": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
|
@ -52,148 +84,147 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": {
|
"headers": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "TPS rate customer is authorized for."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
"description": "Request has missing or invalid parameters and cannot be parsed.",
|
"description": "Request has missing or invalid parameters and cannot be parsed.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "TPS rate customer is authorized for."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
|
"description": "Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "The resource specified does not exist.",
|
"description": "The resource specified does not exist.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Your rate limit (requests per second) for this operation."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"413": {
|
"413": {
|
||||||
"description": "The request size exceeded the maximum accepted size.",
|
"description": "The request size exceeded the maximum accepted size.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "TPS rate customer is authorized for."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"415": {
|
"415": {
|
||||||
"description": "The request payload is in an unsupported format.",
|
"description": "The request payload is in an unsupported format.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "TPS rate customer is authorized for."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"429": {
|
"429": {
|
||||||
"description": "The frequency of requests was greater than allowed.",
|
"description": "The frequency of requests was greater than allowed.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "TPS rate customer is authorized for."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
|
"description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "TPS rate customer is authorized for."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"503": {
|
"503": {
|
||||||
"description": "Temporary overloading or maintenance of the server.",
|
"description": "Temporary overloading or maintenance of the server.",
|
||||||
"headers": {
|
|
||||||
"x-amzn-RequestId": {
|
|
||||||
"description": "Unique request reference identifier.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
"$ref": "#/definitions/CreateUploadDestinationResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "TPS rate customer is authorized for."
|
||||||
|
},
|
||||||
|
"x-amzn-RequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique request reference identifier."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "marketplaceIds",
|
|
||||||
"type": "array",
|
|
||||||
"in": "query",
|
|
||||||
"required": true,
|
|
||||||
"description": "A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified.",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"maxItems": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "contentMD5",
|
|
||||||
"description": "An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit.",
|
|
||||||
"type": "string",
|
|
||||||
"in": "query",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "resource",
|
|
||||||
"in": "path",
|
|
||||||
"description": "The URL of the resource for the upload destination that you are creating. For example, to create an upload destination for a Buyer-Seller Messaging message, the {resource} would be /messaging and the path would be /uploads/v1/uploadDestinations/messaging",
|
|
||||||
"required": true,
|
|
||||||
"type": "string",
|
|
||||||
"x-amazon-spds-greedy-path-parameter":true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "contentType",
|
|
||||||
"in": "query",
|
|
||||||
"description": "The content type of the file to be uploaded.",
|
|
||||||
"required": false,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"CreateUploadDestinationResponse": {
|
"CreateUploadDestinationResponse": {
|
||||||
"description": "The response schema for the createUploadDestination operation.",
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"payload": {
|
"payload": {
|
||||||
|
@ -202,55 +233,55 @@
|
||||||
"errors": {
|
"errors": {
|
||||||
"$ref": "#/definitions/ErrorList"
|
"$ref": "#/definitions/ErrorList"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"description": "The response schema for the createUploadDestination operation."
|
||||||
},
|
},
|
||||||
"UploadDestination": {
|
"UploadDestination": {
|
||||||
"description": "Information about an upload destination.",
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"uploadDestinationId": {
|
"uploadDestinationId": {
|
||||||
"description": "The unique identifier for the upload destination.",
|
"type": "string",
|
||||||
"type": "string"
|
"description": "The unique identifier for the upload destination."
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"description": "The URL for the upload destination.",
|
"type": "string",
|
||||||
"type": "string"
|
"description": "The URL for the upload destination."
|
||||||
},
|
},
|
||||||
"headers": {
|
"headers": {
|
||||||
"description": "The headers to include in the upload request.",
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {}
|
"description": "The headers to include in the upload request."
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"description": "Information about an upload destination."
|
||||||
},
|
},
|
||||||
"ErrorList": {
|
"ErrorList": {
|
||||||
"description": "A list of error responses returned when a request is unsuccessful.",
|
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
"description": "A list of error responses returned when a request is unsuccessful.",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Error"
|
"$ref": "#/definitions/Error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Error": {
|
"Error": {
|
||||||
"description": "Error response returned when the request is unsuccessful.",
|
"type": "object",
|
||||||
"properties": {
|
|
||||||
"code": {
|
|
||||||
"description": "An error code that identifies the type of error that occurred.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"description": "A message that describes the error condition in a human-readable form.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"details": {
|
|
||||||
"description": "Additional details that can help the caller understand or fix the issue.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
"required": [
|
||||||
"code",
|
"code",
|
||||||
"message"
|
"message"
|
||||||
],
|
],
|
||||||
"type": "object"
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "An error code that identifies the type of error that occurred."
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "A message that describes the error condition in a human-readable form."
|
||||||
|
},
|
||||||
|
"details": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Additional details that can help the caller understand or fix the issue."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Error response returned when the request is unsuccessful."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue