System Administration >
Configuration
>
Fabric
>
Nodes
>
File Store
Upload a file to the file store
When you issue this API, the client must specify:
- HTTP header Content-Type:application/octet-stream.
- Request body with the contents of the file in the filestore.
In the CLI, you can view the filestore with the
get files
command.
Request:
Method:
POST
URI Path(s):
/api/v1/transport-nodes/{transport-node-id}/node/file-store/{file-name}
/api/v1/cluster/{cluster-node-id}/node/file-store/{file-name}
/api/v1/node/file-store/{file-name}
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a
Example Request:
POST https://<nsx-mgr>/api/v1/node/file-store/test.txt This is a sentence that is added to the file test.txt.
Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
FileProperties
+
FileProperties
(
schema
)
Name
Description
Type
Notes
_links
References related to this resource
The server will populate this field when returing the resource. Ignored on PUT and POST.
array of
ResourceLink
Readonly
_schema
Schema for this resource
string
Readonly
_self
Link to this resource
SelfResourceLink
Readonly
created_epoch_ms
File creation time in epoch milliseconds
integer
Required
modified_epoch_ms
File modification time in epoch milliseconds
integer
Required
name
File name
string
Required
Pattern: "^[^/]+$"
path
File path
string
Readonly
size
Size of the file in bytes
integer
Required
Example Response:
{ "_schema": "FileProperties", "_self": "/node/file-store/test.txt", "created_epoch_ms": 1457048560936, "modified_epoch_ms": 1457048560936, "name": "test.txt", "size": 54 }
Required Permissions:
crud
Feature:
system_administration
Additional Errors:
301 Moved Permanently
307 Temporary Redirect
400 Bad Request
403 Forbidden
409 Conflict
412 Precondition Failed
500 Internal Server Error
503 Service Unavailable