filestore¶
Summary¶
Resource | Operation | Description |
---|---|---|
Filestore | POST /api/app/v1/filestore | Add filestore |
DELETE /api/app/v1/filestore | Delete filestore | |
GET /api/app/v1/filestore | Get filestore information | |
GET /api/app/v1/filestore/list | Get filestore files |
Details¶
-
POST
/api/app/v1/filestore
¶ Add a filestore to the appliance.
New in version 1.0.
Query Parameters: - alias (required) – Desired name of the filestore
- host (required) – IPv4 address or hostname of the filestore
- path (required) – Directory to save the file to on the filestore
- type (required) – Protocol to use (ftp, samba)
- user (optional) – User to log in as
- password (optional) – Password for the user
- port (optional) – Port to connect across
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success - filestore added
- 400 Bad Request – Bad Request - invalid parameter
- 401 Unauthorized – Access Denied
- 424 Failed Dependency – Failed Dependency - Failed connection or max number of filestores reached
Accepted Authorization: admin
Example 1 - Request: Add filestore to the appliance:
POST /api/app/v1/filestore?alias=ftptest&host=10.206.6.196&path=.&type=ftp&user=<USER>&password=<PASSWORD>&port=21 HTTP/1.1 Accept: text/html
Example 1 - Response: Add filestore to the appliance:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
DELETE
/api/app/v1/filestore
¶ Delete filestore item by alias.
New in version 1.0.
Query Parameters: - alias (required) – Filestore alias to delete
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success - filestore deleted
- 400 Bad Request – Bad Request - invalid parameters
- 401 Unauthorized – Access Denied
- 404 Not Found – Not found - filestore does not exist
Accepted Authorization: admin
Example 1 - Request: Delete filestore:
DELETE /api/app/v1/filestore?alias=myfilestore HTTP/1.1 Accept: text/html
Example 1 - Response: Delete filestore:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
GET
/api/app/v1/filestore
¶ Get currently set up filestore information.
New in version 1.0.
Query Parameters: - filestore (optional) – Filestore alias to get information, if omitted list all filestore information
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success - filestore information
- 400 Bad Request – Bad Request - invalid parameters
- 401 Unauthorized – Access Denied
- 404 Not Found – Not found - filestore does not exist
Accepted Authorization: admin, audit
Example 1 - Request: Get filestore information for myfilestore alias:
GET /api/app/v1/filestore?alias=myfilestore HTTP/1.1 Accept: text/html
Example 1 - Response: Get filestore information for myfilestore alias:
HTTP/1.1 200 OK Content-Type: application/json { "myfilestore": { "alias": "myfilestore", "host": "10.206.6.131", "password": "", "path": ".", "type": "ftp", "user": "anonymous" } }
-
GET
/api/app/v1/filestore/list
¶ Get a list of all files in a filestore.
New in version 1.0.
Query Parameters: - filestore (required) – Filestore alias to get files from
- filetype (required) – Filetype to display
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success - filestore files
- 400 Bad Request – Bad Request - invalid parameters
- 401 Unauthorized – Access Denied
- 404 Not Found – Not found - filestore does not exist
Accepted Authorization: admin
Example 1 - Request: Show all txt files on a filestore:
GET /api/app/v1/filestore/?alias=myfilestore&filetype=txt HTTP/1.1 Accept: text/html
Example 1 - Response: Show all txt files on a filestore:
HTTP/1.1 200 OK Content-Type: application/json { "list": [ { "date": "05-02-17, 10:24AM", "filename": "foo.txt", "filesize": "129" }, { "date": "05-02-17, 10:41AM", "filename": "bar.txt", "filesize": "116" }, ] }