Create a ZFS snapshot
POST
/zfs/datasets/snapshot
const url = 'https://sylve.lan:8181/api/zfs/datasets/snapshot';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"guid":"example","name":"example","recursive":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/zfs/datasets/snapshot \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "guid": "example", "name": "example", "recursive": true }'Create a ZFS snapshot
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Create Snapshot Request
Media typeapplication/json
object
guid
required
string
name
required
string
recursive
boolean
Examplegenerated
{ "guid": "example", "name": "example", "recursive": true}Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Not Found
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}