Upload Item

URL:
https://<root>/uploads/upload
Methods:
POST
Required Capability:
Access allowed with any authorized privilege
Version Introduced:
10.1

Description

The upload operation uploads a new item to the server. Once the operation is completed successfully, the JSON structure of the uploaded item is returned.

Request parameters

ParameterDetails

itemFile

The file to be uploaded, processed as a multipart post file.

description

(Optional)

An description for the uploaded item.

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the upload operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
POST /webadaptor/admin/uploads/upload HTTP/1.1
Host: machine.domain.com
Content-Type: multipart/form-data; boudnary=----boundary
Content-Length: []

------boundary
Content-Disposition: form-data; name="itemFile"; filename=""
Content-Type: application/octet-stream

FireWeatherWatch.kmz
------boundary
Content-Disposition: form-data; name="description"


------boundary
Content-Disposition: form-data; name="f"

pjson
------boundary
Content-Disposition: form-data; name="csrfPreventToken"

aArYcVTHhrDvc-V6RghZUNx-tKjzAgoTU6cSB0VZEdzRRp9Drph_gBBSiwInP-5iG75J3jPhMGhP0PXfkyJYI9Fuicb2mERvj_GxlPeVcmUGhmDk2Y1_0X8RLjOlJBNhs5DozQ2N0Un1l4siWwQ5SBUd6UZE6YF1lMQYCQqTXxwpzkLC6A_bAKMz-cHARp9N,https://machine.domain.com/webadaptor/admin
------boundary--

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
{
   "status": "success",
   "item": "if4582d33-f10a-41fe-85bc-cf2e2880c46e"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.