Create a S.M.A.R.T. self-test schedule
POST
/disk/smart/self-test/schedules
const url = 'https://sylve.lan:8181/api/disk/smart/self-test/schedules';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"cronExpr":"example","device":"example","enabled":true,"testType":"example"}'};
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/disk/smart/self-test/schedules \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "cronExpr": "example", "device": "example", "enabled": true, "testType": "example" }'Create and validate a scheduled S.M.A.R.T. self-test for a physical disk
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”S.M.A.R.T. self-test schedule
Media typeapplication/json
object
cronExpr
required
string
device
required
string
enabled
boolean
testType
required
string
Examplegenerated
{ "cronExpr": "example", "device": "example", "enabled": true, "testType": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
object
cronExpr
string
device
string
diskKey
string
enabled
boolean
estimatedMinutes
integer
id
integer
lastError
string
lastRunAt
string
lastStatus
string
model
string
nextRunAt
string
progressKnown
boolean
progressPct
integer
queuedAt
string
serial
string
testType
string
error
string
message
string
status
string
Examplegenerated
{ "data": { "cronExpr": "example", "device": "example", "diskKey": "example", "enabled": true, "estimatedMinutes": 1, "id": 1, "lastError": "example", "lastRunAt": "example", "lastStatus": "example", "model": "example", "nextRunAt": "example", "progressKnown": true, "progressPct": 1, "queuedAt": "example", "serial": "example", "testType": "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"}Payload Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unprocessable Entity
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"}Service Unavailable
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}