# Create

Launch stage: GA

`POST /api/2.0/workspace/import`

Imports a workspace object (for example, a notebook or file) or the contents of an entire directory.
 If `path` already exists and `overwrite` is set to `false`, this call returns an error `RESOURCE_ALREADY_EXISTS`.
 To import a directory, you can use either the `DBC` format or the `SOURCE` format with the `language` field unset.
 To import a single file as `SOURCE`, you must set the `language` field.
 Zip files within directories are not supported.

API scopes: workspace

## Request body

- `path` (string, optional)
  The absolute path of the object or directory. Importing a directory is only supported for the `DBC` and `SOURCE` formats.
- `format` (string, optional)
  This specifies the format of the file to be imported.
  
   The value is case sensitive.
  
    - `AUTO`: The item is imported depending on an analysis of the item's extension and
       the header content provided in the request. If the item is imported as a notebook,
       then the item's extension is automatically removed.
    - `SOURCE`: The notebook or directory is imported as source code.
    - `HTML`: The notebook is imported as an HTML file.
    - `JUPYTER`: The notebook is imported as a Jupyter/IPython Notebook file.
    - `DBC`: The notebook is imported in <Databricks> archive format. Required for directories.
    - `R_MARKDOWN`: The notebook is imported from R Markdown format.
  Possible values: `SOURCE`, `HTML`, `JUPYTER`, `DBC`, `R_MARKDOWN`, `AUTO`, `RAW`
  Default: `SOURCE`
- `language` (string, optional)
  The language of the object. This value is set only if the object type is `NOTEBOOK`.
  Possible values: `SCALA`, `PYTHON`, `SQL`, `R`
- `content` (string, optional)
  The base64-encoded content. This has a limit of 10 MB.
   
   If the limit (10MB) is exceeded, exception with error code **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown.
   This parameter might be absent, and instead a posted file is used.
- `overwrite` (boolean, optional)
  The flag that specifies whether to overwrite existing object. It is `false` by default.
   For `DBC` format, `overwrite` is not supported since it may contain a directory.
  Default: `false`

## Response

```json
{}
```

