# IRPCExportedDataSetsAdmin.AddNewExportedDataSet

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Exported data set administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExportedDataSetsAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExportedDataSetsAdmin/AddNewExportedDataSet/

Badges: `Administration API / specialized` `admin` `session`

Adds an exported data set.

- **Service:** [Exported data set administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExportedDataSetsAdmin/index.md) `MFiles.IRPCExportedDataSetsAdmin`
- **gRPC method:** `/MFiles.IRPCExportedDataSetsAdmin/AddNewExportedDataSet`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/add-new-exported-data-set`
- **Request:** [`AddNewExportedDataSetRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExportedDataSetsAdmin/AddNewExportedDataSet/index.md#request)
- **Response:** [`AddNewExportedDataSetResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExportedDataSetsAdmin/AddNewExportedDataSet/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires a vault session, the vault right `see_all_objects`, and the server right `run_code`:
  a caller without `run_code` cannot set a connection string, so the call fails with "Access
  denied." for it.
- The server assigns the ID; `dataset.id` is ignored.

<a id="request"></a>

## Request: AddNewExportedDataSetRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `expdataset` | [`ExportedDataSetAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExportedDataSetAdmin/index.md) | The new data set. `dataset.id` is ignored. |
| `expdataset.dataset` | [`ExportedDataSet`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExportedDataSet/index.md) | The non-admin version of the struct. |
| `expdataset.dataset.id` | `int32` | Exported data set ID. |
| `expdataset.dataset.name` | `string` | The name of the data set. |
| `expdataset.dataset.object_types[]` | repeated [`ExportedDataObjectType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExportedDataObjectType/index.md) | Root nodes representing an object type. |
| `expdataset.dataset.options` | [`EXPORTEDDATASETFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.EXPORTEDDATASETFLAGS/index.md) | Data set flags. |
| `expdataset.dataset.schedule` | `bytes` | The schedule of this data set extraction (a serialized Task object of Task Scheduler). |
| `expdataset.dataset.database_connection_string` | `string` | The database connection string. |
| `expdataset.dataset.run_as_user_id` | `int32` | "Run as" user id for the exported data set. |
| `expdataset.dataset.database_schema` | [`ExportedDataSetDBSchema`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExportedDataSetDBSchema/index.md) | The database schema. Values: `EXPORTED_DATA_SET_DBSCHEMA_GENERIC` (0). |
| `expdataset.aliases` | `string` | Semicolon-separated list of semantic aliases. |

<a id="response"></a>

## Response: AddNewExportedDataSetResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `result` | [`ExportedDataSetAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExportedDataSetAdmin/index.md) | The stored data set, with its new `dataset.id`. |
| `result.dataset` | [`ExportedDataSet`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExportedDataSet/index.md) | The non-admin version of the struct. |
| `result.dataset.id` | `int32` | Exported data set ID. |
| `result.dataset.name` | `string` | The name of the data set. |
| `result.dataset.object_types[]` | repeated [`ExportedDataObjectType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExportedDataObjectType/index.md) | Root nodes representing an object type. |
| `result.dataset.options` | [`EXPORTEDDATASETFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.EXPORTEDDATASETFLAGS/index.md) | Data set flags. |
| `result.dataset.schedule` | `bytes` | The schedule of this data set extraction (a serialized Task object of Task Scheduler). |
| `result.dataset.database_connection_string` | `string` | The database connection string. |
| `result.dataset.run_as_user_id` | `int32` | "Run as" user id for the exported data set. |
| `result.dataset.database_schema` | [`ExportedDataSetDBSchema`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExportedDataSetDBSchema/index.md) | The database schema. Values: `EXPORTED_DATA_SET_DBSCHEMA_GENERIC` (0). |
| `result.aliases` | `string` | Semicolon-separated list of semantic aliases. |
