Skip to content

Initiate an NFS action

post/v2/nfs/{nfs_id}/actions

To execute an action (such as resize) on a specified NFS share, send a POST request to /v2/nfs/{nfs_id}/actions. In the JSON body to the request, set the type attribute to on of the supported action types:

Action Details
resize Resizes an NFS share. Set the size_gib attribute to a desired value in GiB
snapshot Takes a snapshot of an NFS share
Path ParametersExpand Collapse
nfs_id: string
Body ParametersExpand Collapse
body: object { region, type, params } or object { region, type, params }
Accepts one of the following:
NfsActionResize = object { region, type, params }
region: string

The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.

type: "resize" or "snapshot"

The type of action to initiate for the NFS share (such as resize or snapshot).

Accepts one of the following:
"resize"
"snapshot"
params: optional object { size_gib }
size_gib: number

The new size for the NFS share.

NfsActionSnapshot = object { region, type, params }
region: string

The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.

type: "resize" or "snapshot"

The type of action to initiate for the NFS share (such as resize or snapshot).

Accepts one of the following:
"resize"
"snapshot"
params: optional object { name }
name: string

Snapshot name of the NFS share

ReturnsExpand Collapse
action: object { region_slug, resource_id, resource_type, 3 more }

The action that was submitted.

region_slug: string

The DigitalOcean region slug where the resource is located.

resource_id: string

The unique identifier of the resource on which the action is being performed.

formatuuid
resource_type: "network_file_share" or "network_file_share_snapshot"

The type of resource on which the action is being performed.

Accepts one of the following:
"network_file_share"
"network_file_share_snapshot"
started_at: string

The timestamp when the action was started.

formatdate-time
status: "in-progress" or "completed" or "errored"

The current status of the action.

Accepts one of the following:
"in-progress"
"completed"
"errored"
type: string

The type of action being performed.

Initiate an NFS action
curl https://api.digitalocean.com/v2/nfs/$NFS_ID/actions \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" \
    -d '{
          "region": "atl1",
          "type": "resize"
        }'
{
  "action": {
    "region_slug": "atl1",
    "resource_id": "b5eb9e60-6750-4f3f-90b6-8296966eaf35",
    "resource_type": "network_file_share",
    "started_at": "2025-10-14T11:55:31.615157397Z",
    "status": "in-progress",
    "type": "resize"
  }
}
Returns Examples
{
  "action": {
    "region_slug": "atl1",
    "resource_id": "b5eb9e60-6750-4f3f-90b6-8296966eaf35",
    "resource_type": "network_file_share",
    "started_at": "2025-10-14T11:55:31.615157397Z",
    "status": "in-progress",
    "type": "resize"
  }
}