NFS Actions

Validated on 13 Oct 2025 • Last edited on 23 Mar 2026

NFS actions are tasks that can be executed on an NFS share. These can be things like resizing, snapshotting, etc.

Base URL https://api.digitalocean.com

POST Initiate an NFS action

/v2/nfs/{nfs_id}/actions
Authorizations: bearer_auth (1 scope)
Http: Bearer
Required scopes: nfs:create

OAuth Authentication

In order to interact with the DigitalOcean API, you or your application must authenticate.

The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints.

You can generate an OAuth token by visiting the Apps & API section of the DigitalOcean control panel for your account.

An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair.

Because of this, it is absolutely essential that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised.

DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens.

  • dop_v1_ for personal access tokens generated in the control panel
  • doo_v1_ for tokens generated by applications using the OAuth flow
  • dor_v1_ for OAuth refresh tokens

Scopes

Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes.

Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete).

HTTP Verb CRUD Operation Scope
GET Read <resource>:read
POST Create <resource>:create
PUT/PATCH Update <resource>:update
DELETE Delete <resource>:delete

For example, creating a new Droplet by making a POST request to the /v2/droplets endpoint requires the droplet:create scope while listing Droplets by making a GET request to the /v2/droplets endpoint requires the droplet:read scope.

Each endpoint below specifies which scope is required to access it when using custom scopes.

How to Authenticate with OAuth

In order to make an authenticated request, include a bearer-type Authorization header containing your OAuth token. All requests must be made over HTTPS.

Authenticate with a Bearer Authorization Header

curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT"

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
attach Attaches an NFS share to a VPC. Set the vpc_id attribute to the desired VPC ID
detach Detaches an NFS share from a VPC. Set the vpc_id attribute to the desired VPC ID
switch_performance_tier Switches the performance tier of an NFS share. Set the performance_tier attribute to the desired tier (e.g., standard, high)

Path Parameters

nfs_id string required
Example: 0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d

The unique ID of the NFS share

Request Body: application/json

The type attribute set in the request body will specify the action that will be taken on the NFS share. Some actions will require additional attributes to be set as well.

region string optional
Example: atl1

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

type string, one of: resize, snapshot required
Example: resize

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

params object optional
Show child properties
size_gib integer required
Example: 2048

The new size for the NFS share.

region string optional
Example: atl1

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

type string, one of: resize, snapshot required
Example: resize

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

params object optional
Show child properties
name string required
Example: daily-backup

Snapshot name of the NFS share

region string optional
Example: atl1

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

type string, one of: resize, snapshot required
Example: resize

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

params object optional
Show child properties
vpc_id string required
Example: vpc-id-123

The ID of the VPC to which the NFS share will be attached

region string optional
Example: atl1

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

type string, one of: resize, snapshot required
Example: resize

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

params object optional
Show child properties
vpc_id string required
Example: vpc-id-123

The ID of the VPC from which the NFS share will be detached

region string optional
Example: atl1

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

type string, one of: resize, snapshot required
Example: resize

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

params object optional
Show child properties
performance_tier string required
Example: standard

The performance tier to which the NFS share will be switched (e.g., standard, high).

Content type application/json
{
  "params": {
    "size_gib": 2048
  },
  "region": "atl1",
  "type": "resize"
}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{"type": "resize", "params": {"size_gib": 1024}, "region": "atl1"}' \
  "https://api.digitalocean.com/v2/nfs/${nfs_id}/actions"

Responses

201

The response will be a JSON object with a key called action.

ratelimit-limit integer

The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.

ratelimit-remaining integer

The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

ratelimit-reset integer

The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

action object required

The action that was submitted.

Show child properties
region_slug string required
Example: atl1

The DigitalOcean region slug where the resource is located.

resource_id string (uuid) required
Example: b5eb9e60-6750-4f3f-90b6-8296966eaf35

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

resource_type string, one of: network_file_share, network_file_share_snapshot required
Example: network_file_share

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

started_at string (date-time) required
Example: 2025-10-14T11:55:31.615157397Z

The timestamp when the action was started.

status string, one of: in-progress, completed, errored required
Example: in-progress

The current status of the action.

type string required
Example: resize

The type of action being performed.

401

Authentication failed due to invalid credentials.

ratelimit-limit integer

The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.

ratelimit-remaining integer

The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

ratelimit-reset integer

The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

id string required
Example: not_found

A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."

message string required
Example: The resource you were accessing could not be found.

A message providing additional information about the error, including details to help resolve it when possible.

request_id string optional
Example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9

Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

404

The resource was not found.

ratelimit-limit integer

The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.

ratelimit-remaining integer

The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

ratelimit-reset integer

The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

id string required
Example: not_found

A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."

message string required
Example: The resource you were accessing could not be found.

A message providing additional information about the error, including details to help resolve it when possible.

request_id string optional
Example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9

Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

429

The API rate limit has been exceeded.

ratelimit-limit integer

The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.

ratelimit-remaining integer

The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

ratelimit-reset integer

The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

id string required
Example: not_found

A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."

message string required
Example: The resource you were accessing could not be found.

A message providing additional information about the error, including details to help resolve it when possible.

request_id string optional
Example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9

Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

500

There was a server error.

ratelimit-limit integer

The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.

ratelimit-remaining integer

The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

ratelimit-reset integer

The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

id string required
Example: not_found

A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."

message string required
Example: The resource you were accessing could not be found.

A message providing additional information about the error, including details to help resolve it when possible.

request_id string optional
Example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9

Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

default

There was an unexpected error.

ratelimit-limit integer

The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.

ratelimit-remaining integer

The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

ratelimit-reset integer

The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.

id string required
Example: not_found

A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."

message string required
Example: The resource you were accessing could not be found.

A message providing additional information about the error, including details to help resolve it when possible.

request_id string optional
Example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9

Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

{
  "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"
  }
}
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}
{
  "id": "too_many_requests",
  "message": "API rate limit exceeded."
}
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}
{
  "id": "example_error",
  "message": "some error message"
}

We can't find any results for your search.

Try using different keywords or simplifying your search terms.