- URL:
- https://dataaccess/notebookworkspace/uploadFile
- Methods:
POST
- Required Capability:
- Access allowed with the "Create and edit notebooks" privilege
- Version Introduced:
- 11.5
Description
The upload
operation allows uploads of a single file to your workspace directory (/arcgis/home
). By default, the file is uploaded to the root of the workspace directory. You can prefix a directory path to the file name to upload the file to a subdirectory.
The upload file size limit is 128 MB for a single file. Large files can also be uploaded in parts from a client that has the ability to split files into smaller parts. To initiate a multipart upload, the client passes in the is
parameter as true
, along with the file
and block
parameters. After uploading all parts, the operation can be completed by passing in the xml
and file
parameters, as well as the is
parameter set as true
.
Request parameters
Parameter | Details |
---|---|
(Optional) | The file to be uploaded. This is required when uploading a single file or a file in multiple parts. This is not required when |
(Required) | Defines the name of the file to be uploaded. Optionally, the file can be uploaded to a subdirectory by prefixing a folder path to the file name. If you upload a file using a Example
|
(Optional) | A Boolean that is set to Values: |
(Optional) | Required when uploading files in multiple parts. The Example
|
(Optional) | Required to complete the upload of a large file in multiple parts. Once the individual parts have been uploaded, specify values for the Example
|
(Optional) | Required when uploading a single file or a file in multiple parts. This parameter is not required when Value: |
| The response format. The default response format is Values: |
Example usage
The following are example requests for the upload
operation.
POST /<context>/notebooks/admin/dataaccess/notebookworkspace/uploadFile
Host: organization.domain.com
Content-Type: multipart/form-data; boundary=------boundary
------boundary
Content-Disposition: form-data; name="uploadFile"; filename=""
Content-Type: application/octet-stream
mjwater.zip
------boundary
Content-Disposition: form-data; name="fileName"
mjwaterzip
------boundary
Content-Disposition: form-data; name="blockId"
------boundary
Content-Disposition: form-data; name="xmlField"
------boundary
Content-Disposition: form-data; name="f"
pjson
------boundary
Content-Disposition: form-data; name="token"
Mya-BuB9qRjkorfcgskCrFjDgcLCqZzehI_3sHMgSVY8JQCdmUHzQCX6qayumb7ecIgrADEuTy-NnF35rlAH9AiXZg3M_AWVNaqyZwM8SNf_mfRVbyf1SfPkUNXJoFVwFYLb1AlIKHm_EONlTvr2V-gaxfnHgpJvvQ5u-mdO9yYvRzjzmuYQge6rsqftqCnXXU9S7NOLmTahmPpRKTGy8c0z2dVlnfZfp7IdnJfmUm-s1I-mu7HDJWTkw4TXxPiL
------WebKitFormBoundaryCuVJC964pmBXvkM6
Content-Disposition: form-data; name="x-ms-blob-type"
BlockBlob
------boundary--
JSON Response syntax
{"status": "<success | failure>"}
JSON Response example
{"status": "success"}