# Update

`PUT /api/2.0/accounts/{account_id}/workspaces/{workspace_id}/network`

Updates the network option for a workspace. This operation associates the workspace with the specified network policy.
 To revert to the default policy, specify 'default-policy' as the network_policy_id.

API scopes: networking

## Path parameters

- `account_id` (string, optional)
  Your <Databricks> account ID. You can find your account ID in your <Databricks> accounts console.
  Example: `123e4567-e89b-12d3-a456-426614174000`
- `workspace_id` (int64, optional)
  The workspace ID.
  Example: `1234567890`

## Request body

- `workspace_network_option` (object, optional)
  The network option details for the workspace.
  - `network_policy_id` (string, optional)
    The network policy ID to apply to the workspace. This controls the network access rules
     for all serverless compute resources in the workspace. Each workspace can only be
     linked to one policy at a time. If no policy is explicitly assigned,
     the workspace will use 'default-policy'.
    Example: `my-network-policy`
  - `workspace_id` (int64, optional)
    The workspace ID.
    Example: `1234567890`

## Returns

Returns the WorkspaceNetworkOption object.

## Response

```json
{
  "network_policy_id": "my-network-policy",
  "workspace_id": 1234567890
}
```

