# REST Resource: projects.datasets

- [Resource: Dataset](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Dataset)
  - [JSON representation](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Dataset.SCHEMA_REPRESENTATION)
- [Usage](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Usage)
- [LocalFileSource](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#LocalFileSource)
  - [JSON representation](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#LocalFileSource.SCHEMA_REPRESENTATION)
- [FileFormat](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#FileFormat)
- [GcsSource](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#GcsSource)
  - [JSON representation](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#GcsSource.SCHEMA_REPRESENTATION)
- [Status](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Status)
  - [JSON representation](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Status.SCHEMA_REPRESENTATION)
- [State](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#State)
- [Methods](https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#METHODS_SUMMARY)

## Resource: Dataset

A representation of a maps platform dataset.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "versionId": string, "usage": [ enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Usage`) ], "status": { object (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Status`) }, "createTime": string, "updateTime": string, "versionCreateTime": string, "versionDescription": string, // Union field `data_source` can be only one of the following: "localFileSource": { object (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#LocalFileSource`) }, "gcsSource": { object (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#GcsSource`) } // End of list of possible types for union field `data_source`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Resource name, projects/{project}/datasets/{dataset_id} |
| `displayName` | `string` Human readable name, shown in the console UI . |
| `description` | `string` A description of this dataset . |
| `versionId` | `string` The version ID of the dataset. |
| `usage[]` | ``enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Usage`)`` Specified use case(s) for this dataset. |
| `status` | ``object (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#Status`)`` Output only. The status of this dataset version. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Time when the dataset was first created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Time when the dataset metadata was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `versionCreateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Time when this version of dataset was created. (It happened when importing data to the dataset) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `versionDescription` | `string` Output only. The description for this version of dataset. It is provided when importing data to the dataset. |
| Union field `data_source`. Details about the source of the data for the dataset. `data_source` can be only one of the following: ||
| `localFileSource` | ``object (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#LocalFileSource`)`` A local file source for the dataset for a single upload. |
| `gcsSource` | ``object (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#GcsSource`)`` A Google Cloud Storage file source for the dataset for a single upload. |

## Usage

Usage specifies where the data is intended to be used to inform how to process the data.

| Enums ||
|---|---|
| `USAGE_UNSPECIFIED` | The usage of this dataset is not set. |
| `USAGE_DATA_DRIVEN_STYLING` | This dataset will be used for data driven styling. |

## LocalFileSource

The details about the data source when it is a local file.

| JSON representation |
|---|
| ``` { "filename": string, "fileFormat": enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#FileFormat`) } ``` |

| Fields ||
|---|---|
| `filename` | `string` The file name and extension of the uploaded file. |
| `fileFormat` | ``enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#FileFormat`)`` The format of the file that is being uploaded. |

## FileFormat

The format of the file being uploaded.

| Enums ||
|---|---|
| `FILE_FORMAT_UNSPECIFIED` | Unspecified file format. |
| `FILE_FORMAT_GEOJSON` | GeoJson file. |
| `FILE_FORMAT_KML` | KML file. |
| `FILE_FORMAT_CSV` | CSV file. |

## GcsSource

The details about the data source when it is in Google Cloud Storage.

| JSON representation |
|---|
| ``` { "inputUri": string, "fileFormat": enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#FileFormat`) } ``` |

| Fields ||
|---|---|
| `inputUri` | `string` Source data URI. For example, `gs://my_bucket/my_object`. |
| `fileFormat` | ``enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#FileFormat`)`` The file format of the Google Cloud Storage object. This is used mainly for validation. |

## Status

Status of the dataset version.

| JSON representation |
|---|
| ``` { "state": enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#State`), "errorMessage": string } ``` |

| Fields ||
|---|---|
| `state` | ``enum (`https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets#State`)`` State enum for status. |
| `errorMessage` | `string` Error message indicating reason of failure. It is empty if the datasets is not in a failed state. |

## State

A list of states for the dataset version. If values are modified here, consider updating Status utility methods.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The state of this dataset is not set. |
| `STATE_IMPORTING` | The dataset version is getting imported. |
| `STATE_IMPORT_SUCCEEDED` | The dataset version succeeded in getting imported. |
| `STATE_IMPORT_FAILED` | The dataset version failed to get imported. |
| `STATE_DELETING` | The dataset is in the process of getting deleted. |
| `STATE_DELETION_FAILED` | The deletion failed state. This state represents that dataset deletion has failed. Deletion may be retried. |
| `STATE_PROCESSING` | The processing state. This state represents the initial matching and processing of datasets to derived datasets. |
| `STATE_PROCESSING_FAILED` | The processing failed state. This state represents that processing has failed and may report errors. |
| `STATE_NEEDS_REVIEW` | The needs review state. This state represents that data is available to publish and serve to the specific usage. |
| `STATE_PUBLISHING` | The publishing state. This state represents the publishing is in progress. |
| `STATE_PUBLISHING_FAILED` | The publishing failed states. This state represents that the publishing failed. Publishing may be retried. |
| `STATE_COMPLETED` | The completed state. This state represents the dataset being available for its specific usage. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets/create` | Create a new dataset for the specified project. |
| ### `https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets/delete` | Delete the specified dataset . |
| ### `https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets/get` | Get the dataset. |
| ### `https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets/list` | List all the datasets for the specified project. |
| ### `https://developers.google.com/maps/tt/dds/maps-datasets/reference/rest/v1alpha/projects.datasets/patch` | Update the metadata for the dataset. |