# Method: projects.locations.adaptiveMtDatasets.importAdaptiveMtFile

- [HTTP request](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#body.ImportAdaptiveMtFileResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#body.aspect)
- [FileInputSource](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#FileInputSource)
  - [JSON representation](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#FileInputSource.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#try-it)

Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

### HTTP request

`POST https://translate.googleapis.com/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{locationId}/adaptiveMtDatasets/{dataset}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { // Union field `source` can be only one of the following: "fileInputSource": { object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#FileInputSource`) }, "gcsInputSource": { object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/GcsInputSource`) } // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| Union field `source`. The source for the document. `source` can be only one of the following: ||
| `fileInputSource` | ``object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets/importAdaptiveMtFile#FileInputSource`)`` Inline file source. |
| `gcsInputSource` | ``object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/GcsInputSource`)`` Google Cloud Storage file source. |

### Response body

The response for importing an AdaptiveMtFile

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "adaptiveMtFile": { object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets.adaptiveMtFiles#AdaptiveMtFile`) } } ``` |

| Fields ||
|---|---|
| `adaptiveMtFile` | ``object (`https://docs.cloud.google.com/translate/docs/reference/rest/v3/projects.locations.adaptiveMtDatasets.adaptiveMtFiles#AdaptiveMtFile`)`` Output only. The Adaptive MT file that was imported. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-translation`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

## FileInputSource

An inlined file.

| JSON representation |
|---|
| ``` { "mimeType": string, "content": string, "displayName": string } ``` |

| Fields ||
|---|---|
| `mimeType` | `string` Required. The file's mime type. |
| `content` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The file's byte contents. A base64-encoded string. |
| `displayName` | `string` Required. The file's display name. |