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.
https://api.digitalocean.com
Endpoints
POST Initiate an NFS action
/v2/nfs/{nfs_id}/actions
Authorizations:
bearer_auth
(1 scope)
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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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
required
0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5dThe 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
optional
atl1The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.
type
required
resizeThe type of action to initiate for the NFS share (such as resize or snapshot).
params
optional
Show child properties
size_gib
required
2048The new size for the NFS share.
region
optional
atl1The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.
type
required
resizeThe type of action to initiate for the NFS share (such as resize or snapshot).
params
optional
Show child properties
name
required
daily-backupSnapshot name of the NFS share
region
optional
atl1The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.
type
required
resizeThe type of action to initiate for the NFS share (such as resize or snapshot).
params
optional
Show child properties
vpc_id
required
vpc-id-123The ID of the VPC to which the NFS share will be attached
region
optional
atl1The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.
type
required
resizeThe type of action to initiate for the NFS share (such as resize or snapshot).
params
optional
Show child properties
vpc_id
required
vpc-id-123The ID of the VPC from which the NFS share will be detached
region
optional
atl1The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.
type
required
resizeThe type of action to initiate for the NFS share (such as resize or snapshot).
params
optional
Show child properties
performance_tier
required
standardThe performance tier to which the NFS share will be switched (e.g., standard, high).
Request: /v2/nfs/{nfs_id}/actions
{
"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.
action.ratelimit-limit
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
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
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.
application/json
action
required
The action that was submitted.
Show child properties
region_slug
required
atl1The DigitalOcean region slug where the resource is located.
resource_id
required
b5eb9e60-6750-4f3f-90b6-8296966eaf35The unique identifier of the resource on which the action is being performed.
resource_type
required
network_file_shareThe type of resource on which the action is being performed.
started_at
required
2025-10-14T11:55:31.615157397ZThe timestamp when the action was started.
status
required
in-progressThe current status of the action.
type
required
resizeThe type of action being performed.
401
Authentication failed due to invalid credentials.
ratelimit-limit
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
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
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.
application/json
id
required
not_foundA 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
required
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
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, 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
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
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
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.
application/json
id
required
not_foundA 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
required
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
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, 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
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
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
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.
application/json
id
required
not_foundA 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
required
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
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, 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
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
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
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.
application/json
id
required
not_foundA 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
required
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
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, 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
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
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
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.
application/json
id
required
not_foundA 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
required
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
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"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"
}