# `DocuSign.Api.WorkspaceItems`
[🔗](https://github.com/neilberkman/docusign_elixir/blob/v3.4.0/lib/docusign/api/workspace_items.ex#L5)

API calls for all endpoints tagged `WorkspaceItems`.

# `workspace_file_get_workspace_file`

```elixir
@spec workspace_file_get_workspace_file(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, nil} | {:error, Req.Response.t()}
```

Gets a workspace file
This method returns a binary version of a file in a workspace.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `file_id` (String.t): The ID of the file.
- `folder_id` (String.t): The ID of the folder.
- `workspace_id` (String.t): The ID of the workspace.
- `opts` (keyword): Optional parameters
  - `:is_download` (String.t): When **true,** the `Content-Disposition` header is set in the response. The value of the header provides the filename of the file. The default is **false.**
  - `:pdf_version` (String.t): When **true** the file is returned in PDF format.

### Returns

- `{:ok, nil}` on success
- `{:error, Req.Response.t}` on failure

# `workspace_file_pages_get_workspace_file_pages`

```elixir
@spec workspace_file_pages_get_workspace_file_pages(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, DocuSign.Model.PageImages.t()} | {:error, Req.Response.t()}
```

List File Pages
This method returns a workspace file as rasterized pages.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `file_id` (String.t): The ID of the file.
- `folder_id` (String.t): The ID of the folder.
- `workspace_id` (String.t): The ID of the workspace.
- `opts` (keyword): Optional parameters
  - `:count` (String.t): The maximum number of results to return.  Use `start_position` to specify the number of results to skip. 
  - `:dpi` (String.t): The number of dots per inch (DPI) for the resulting images. Valid values are 1-310 DPI. The default value is 94.
  - `:max_height` (String.t): Sets the maximum height of the returned images in pixels.
  - `:max_width` (String.t): Sets the maximum width of the returned images in pixels.
  - `:start_position` (String.t): The zero-based index of the result from which to start returning results.  Use with `count` to limit the number of results.  The default value is `0`. 

### Returns

- `{:ok, DocuSign.Model.PageImages.t}` on success
- `{:error, Req.Response.t}` on failure

# `workspace_file_post_workspace_files`

```elixir
@spec workspace_file_post_workspace_files(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, DocuSign.Model.WorkspaceItem.t()} | {:error, Req.Response.t()}
```

Creates a workspace file.
This method adds a file to a workspace.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `folder_id` (String.t): The ID of the folder.
- `workspace_id` (String.t): The ID of the workspace.
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, DocuSign.Model.WorkspaceItem.t}` on success
- `{:error, Req.Response.t}` on failure

# `workspace_file_put_workspace_file`

```elixir
@spec workspace_file_put_workspace_file(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, DocuSign.Model.WorkspaceItem.t()} | {:error, Req.Response.t()}
```

Update workspace file or folder metadata
This method updates the metadata for one or more specific files or folders in a workspace.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `file_id` (String.t): The ID of the file.
- `folder_id` (String.t): The ID of the folder.
- `workspace_id` (String.t): The ID of the workspace.
- `opts` (keyword): Optional parameters

### Returns

- `{:ok, DocuSign.Model.WorkspaceItem.t}` on success
- `{:error, Req.Response.t}` on failure

# `workspace_folder_delete_workspace_items`

```elixir
@spec workspace_folder_delete_workspace_items(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, nil} | {:error, Req.Response.t()}
```

Deletes files or sub-folders from a workspace.
This method deletes one or more files or sub-folders from a workspace folder or root.  Note: To delete items from a workspace, the `status` of the workspace must be `active`.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `folder_id` (String.t): The ID of the folder.
- `workspace_id` (String.t): The ID of the workspace.
- `opts` (keyword): Optional parameters
  - `:body` (WorkspaceItemList): 

### Returns

- `{:ok, nil}` on success
- `{:error, Req.Response.t}` on failure

# `workspace_folder_get_workspace_folder`

```elixir
@spec workspace_folder_get_workspace_folder(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.WorkspaceFolderContents.t()} | {:error, Req.Response.t()}
```

List workspace folder contents
This method returns the contents of a workspace folder, which can include sub-folders and files.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `folder_id` (String.t): The ID of the folder.
- `workspace_id` (String.t): The ID of the workspace.
- `opts` (keyword): Optional parameters
  - `:count` (String.t): The maximum number of results to return.  Use `start_position` to specify the number of results to skip. 
  - `:include_files` (String.t): When **true,** the response includes file information (in addition to folder information). The default is **false.**
  - `:include_sub_folders` (String.t): When **true,** the response includes information about the sub-folders of the current folder. The default is **false.**
  - `:include_thumbnails` (String.t): When **true,** the response returns thumbnails.  The default is **false.**
  - `:include_user_detail` (String.t): When **true,** the response includes extended details about the user. The default is **false.**
  - `:start_position` (String.t): The zero-based index of the result from which to start returning results.  Use with `count` to limit the number of results.  The default value is `0`. 
  - `:workspace_user_id` (String.t): If set, the response only includes results associated with the `userId` that you specify.

### Returns

- `{:ok, DocuSign.Model.WorkspaceFolderContents.t}` on success
- `{:error, Req.Response.t}` on failure

---

*Consult [api-reference.md](api-reference.md) for complete listing*
