Data Kiosk

class sp_api.api.DataKiosk(marketplace: Marketplaces = Marketplaces.US, *, refresh_token=None, account='default', credentials=None, restricted_data_token=None, proxies=None, verify=True, timeout=None, version=None, credential_providers=None)

DataKiosk SP-API Client :link:

The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.

get_queries(self, **kwargs) ApiResponse

Returns details for the Data Kiosk queries that match the specified filters. See the createQuery operation for details about query retention.

Usage Plan:

Rate (requests per second)

Burst

0.0222

10

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

Parameters:
  • processingStatuses (key) – array | A list of processing statuses used to filter queries.

  • pageSize (key) – integer | The maximum number of queries to return in a single call.

  • createdSince (key) – string | The earliest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is 90 days ago.

  • createdUntil (key) – string | The latest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is the time of the getQueries request.

  • paginationToken (key) – string | A token to fetch a certain page of results when there are multiple pages of results available. The value of this token is fetched from the pagination.nextToken field returned in the GetQueriesResponse object. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception of pageSize which can be modified between calls to getQueries. In the absence of this token value, getQueries returns the first page of results.

Return type:

ApiResponse

create_query(self, query, pagination_token=None, **kwargs) ApiResponse

Creates a Data Kiosk query request.

Note: The retention of a query varies based on the fields requested. Each field within a schema is annotated with a @resultRetention directive that defines how long a query containing that field will be retained. When a query contains multiple fields with different retentions, the shortest (minimum) retention is applied. The retention of a query’s resulting documents always matches the retention of the query.

Usage Plan:

Rate (requests per second)

Burst

0.0167

15

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

Parameters:
  • query – string | * REQUIRED The query to submit. The query must be a valid GraphQL query in the schema specified by the schema parameter.

  • pagination_token – string | A token to fetch a certain page of results when there are multiple pages of results available. The value of this token is fetched from the pagination.nextToken field returned in the GetQueriesResponse object. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception of pageSize which can be modified between calls to getQueries. In the absence of this token value, getQueries returns the first page of results.

Return type:

ApiResponse

cancel_query(self, queryId, **kwargs) ApiResponse

Cancels the query specified by the queryId parameter. Only queries with a non-terminal processingStatus (IN_QUEUE, IN_PROGRESS) can be cancelled. Cancelling a query that already has a processingStatus of CANCELLED will no-op. Cancelled queries are returned in subsequent calls to the getQuery and getQueries operations.

Usage Plan:

Rate (requests per second)

Burst

0.0222

10

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

Parameters:

query_id – string | * REQUIRED The identifier for the query. This identifier is unique only in combination with a selling partner account ID.

Return type:

ApiResponse

get_query(self, queryId, **kwargs) ApiResponse

Returns query details for the query specified by the queryId parameter. See the createQuery operation for details about query retention.

Usage Plan:

Rate (requests per second)

Burst

2

15

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

Parameters:

query_id – string | * REQUIRED The query identifier.

Return type:

ApiResponse

get_document(self, document_id, download: bool = False, file: BytesIO | str | BinaryIO | TextIO = None, encoding='utf-8', **kwargs) ApiResponse

Returns the information required for retrieving a Data Kiosk document’s contents. See the createQuery operation for details about document retention.

Usage Plan:

Rate (requests per second)

Burst

0.0167

15

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

Parameters:
  • document_id – string | * REQUIRED The identifier for the Data Kiosk document.

  • file

    * OPTIONAL The file to write the response to.

  • download

    * OPTIONAL If True, the file will be downloaded and returned in the payload.

  • encoding

    * OPTIONAL The encoding to use when writing the file. Defaults to utf-8, binary data is written if applicable filemode is passed.

Return type:

ApiResponse