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:
rickdeee 2021-06-27 17:28:29 -07:00
parent e3f1c7227b
commit 1a70e3b203
1 changed files with 153 additions and 122 deletions

View File

@ -1,9 +1,9 @@
{
"swagger": "2.0",
"info": {
"title": "Selling Partner API for Uploads",
"description": "The Selling Partner API for Uploads provides operations that support uploading files.",
"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.",
"version": "2020-11-01",
"title": "Selling Partner API for Uploads",
"contact": {
"name": "Selling Partner API Developer Support",
"url": "https://sellercentral.amazon.com/gp/mws/contactus.html"
@ -26,19 +26,51 @@
"paths": {
"/uploads/2020-11-01/uploadDestinations/{resource}": {
"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": [
"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": {
"201": {
"description": "Success.",
"headers": {
"x-amzn-requestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
},
"examples": {
"application/json": {
@ -52,148 +84,147 @@
}
}
},
"schema": {
"$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."
}
}
},
"400": {
"description": "Request has missing or invalid parameters and cannot be parsed.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$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": {
"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": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference identifier."
}
}
},
"404": {
"description": "The resource specified does not exist.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$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": {
"description": "The request size exceeded the maximum accepted size.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$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": {
"description": "The request payload is in an unsupported format.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$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": {
"description": "The frequency of requests was greater than allowed.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$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": {
"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": {
"$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": {
"description": "Temporary overloading or maintenance of the server.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
}
},
"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.",
"headers": {
"x-amzn-RateLimit-Limit": {
"type": "string",
"in": "query",
"required": true
"description": "TPS rate customer is authorized for."
},
{
"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,
"x-amzn-RequestId": {
"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"
"description": "Unique request reference identifier."
}
}
}
}
]
}
}
},
"definitions": {
"CreateUploadDestinationResponse": {
"description": "The response schema for the createUploadDestination operation.",
"type": "object",
"properties": {
"payload": {
@ -202,55 +233,55 @@
"errors": {
"$ref": "#/definitions/ErrorList"
}
}
},
"description": "The response schema for the createUploadDestination operation."
},
"UploadDestination": {
"description": "Information about an upload destination.",
"type": "object",
"properties": {
"uploadDestinationId": {
"description": "The unique identifier for the upload destination.",
"type": "string"
"type": "string",
"description": "The unique identifier for the upload destination."
},
"url": {
"description": "The URL for the upload destination.",
"type": "string"
"type": "string",
"description": "The URL for the upload destination."
},
"headers": {
"description": "The headers to include in the upload request.",
"type": "object",
"properties": {}
}
"description": "The headers to include in the upload request."
}
},
"description": "Information about an upload destination."
},
"ErrorList": {
"description": "A list of error responses returned when a request is unsuccessful.",
"type": "array",
"description": "A list of error responses returned when a request is unsuccessful.",
"items": {
"$ref": "#/definitions/Error"
}
},
"Error": {
"description": "Error response returned when the request is unsuccessful.",
"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"
}
},
"type": "object",
"required": [
"code",
"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."
}
}
}