Nas

Lists all NAS.

get

API Key Scope: nas / index

Authorizations
Query parameters
limitintegerOptional

The number of items to display for pagination.

offsetintegerOptional

The number of items to skip for pagination.

sort_bystring[]Optional

Sort results by attribute.

Can sort on multiple attributes, separated by |. Order direction can be suffixing the attribute by either :asc (default) or :desc.

idstringOptional

Filter on id

namestringOptional

Filter on name

commentstringOptional

Filter on comment

hoststringOptional

Filter on host

typestringOptional

Filter on type

pricestringOptional

Filter on price

Responses
200

List of NAS.

application/json
get
/nas
GET /api/v2/nas HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
200

List of NAS.

{
  "count": 1,
  "nas": [
    {
      "id": 2,
      "name": "samba",
      "host": "samba.local",
      "type": "smb_v3",
      "comment": "Local NAS",
      "price": "120.0"
    }
  ]
}

Creates a new NAS.

post

API Key Scope: nas / create

Authorizations
Body
idinteger · int64Read-onlyOptionalExample: 2
namestringOptionalExample: samba
hoststringOptionalExample: samba.local
typestring · enumOptionalExample: smb_v3Possible values:
commentstringOptionalExample: Local NAS
pricestringOptionalExample: 120.0
Responses
201

A specific NAS.

application/json
post
/nas
POST /api/v2/nas HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 91

{
  "name": "samba",
  "host": "samba.local",
  "type": "smb_v3",
  "comment": "Local NAS",
  "price": "120.0"
}
{
  "id": 2,
  "name": "samba",
  "host": "samba.local",
  "type": "smb_v3",
  "comment": "Local NAS",
  "price": "120.0"
}

Displays a specific NAS.

get

API Key Scope: nas / show

Authorizations
Path parameters
nas_idstringRequired

Numeric ID or name of NAS.

Responses
200

A specific NAS.

application/json
get
/nas/{nas_id}
GET /api/v2/nas/{nas_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
{
  "id": 2,
  "name": "samba",
  "host": "samba.local",
  "type": "smb_v3",
  "comment": "Local NAS",
  "price": "120.0"
}

Updates a specific NAS.

put

API Key Scope: nas / update

Authorizations
Path parameters
nas_idstringRequired

Numeric ID or name of NAS.

Body
idinteger · int64Read-onlyOptionalExample: 2
namestringOptionalExample: samba
hoststringOptionalExample: samba.local
typestring · enumOptionalExample: smb_v3Possible values:
commentstringOptionalExample: Local NAS
pricestringOptionalExample: 120.0
Responses
200

A specific NAS.

application/json
put
/nas/{nas_id}
PUT /api/v2/nas/{nas_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 91

{
  "name": "samba",
  "host": "samba.local",
  "type": "smb_v3",
  "comment": "Local NAS",
  "price": "120.0"
}
{
  "id": 2,
  "name": "samba",
  "host": "samba.local",
  "type": "smb_v3",
  "comment": "Local NAS",
  "price": "120.0"
}

Destroys a specific NAS.

delete

API Key Scope: nas / destroy

Authorizations
Path parameters
nas_idstringRequired

Numeric ID or name of NAS.

Responses
204

NAS destroyed.

No content

delete
/nas/{nas_id}
DELETE /api/v2/nas/{nas_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
204

NAS destroyed.

No content

Last updated

Was this helpful?