The Google Fusion Tables API v1 has been deprecated as of May 3rd, 2016. The API will continue to work until August 1st, 2017, and will shut down on that date. A migration guide is available outlining the steps to take to migrate to v2.

Table: replaceRows

Requires authorization

Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. Try it now.

This method supports an /upload URI and accepts uploaded media with the following characteristics:

  • Maximum file size: 250MB
  • Accepted Media MIME types: application/octet-stream

Request

HTTP request

This method provides media upload functionality through two separate URIs. For more details, see the document on media upload.

  • Upload URI, for media upload requests:
    POST https://www.googleapis.com/upload/fusiontables/v2/tables/tableId/replace
  • Metadata URI, for metadata-only requests:
    POST https://www.googleapis.com/fusiontables/v2/tables/tableId/replace

Parameters

Parameter name Value Description
Path parameters
tableId string Table whose rows will be replaced.
Required query parameters
uploadType string The type of upload request to the /upload URI. Acceptable values are:
  • media - Simple upload. Upload the media only, without any metadata.
  • multipart - Multipart upload. Upload both the media and its metadata, in a single request.
  • resumable - Resumable upload. Upload the file in a resumable fashion, using a series of at least two requests where the first request includes the metadata.
Optional query parameters
delimiter string The delimiter used to separate cell values. This can only consist of a single character. Default is ,.
encoding string The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding.
endLine integer The index of the line up to which data will be imported. Default is to import the entire file. If endLine is negative, it is an offset from the end of the file; the imported content will exclude the last endLine lines.
isStrict boolean Whether the imported CSV must have the same number of column values for each row. If true, throws an exception if the CSV does not have the same number of columns. If false, rows with fewer column values will be padded with empty values. Default is true.
startLine integer The index of the first line from which to start importing, inclusive. Default is 0.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/fusiontables

Request body

In the request body, supply a Table resource as the metadata. For more information, see the document on media upload.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "fusiontables#task",
  "taskId": long,
  "started": boolean,
  "progress": string,
  "type": string
}
Property name Value Description Notes
kind string Type of the resource. This is always "fusiontables#task".
taskId long Identifier for the task.
started boolean false while the table is busy with some other task. true if this background task is currently running.
progress string Task percentage completion.
type string Type of background task.

Acceptable values are:
  • "ADD_COLUMN"
  • "ADD_ROWS"
  • "CHANGE_TYPE"
  • "DELETE_ROWS"

Try it!

Note: APIs Explorer currently supports metadata requests only.

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.