Skip To Content
ArcGIS Developers
Dashboard

Upload

Description

Uploads a new item to the server associated with your deployment. Item uploads are filtered by an approved list of filename extensions, which are outlined below:

  • .soe
  • .sd
  • .sde
  • .odc
  • .csv
  • .txt
  • .zshp
  • .kmz

Request parameters

ParameterDetails
itemFile

(Required)

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

description

(Optional)

A description for the uploaded item.

f

The response format. The default format is html.

Vales: html | json | pjson

Example usage

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

POST /context/admin/uploads/upload HTTP/1.1
Host: organization.domain.com
Content-Type: multipart/form-data; boundary=------boundary

------boundary
Content-Disposition: form-data; name="itemFile"; filename="fireWeatherWatch.kmz"
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="token"

eDleqkNQOm5GJnRfphx61zCwr1rLF5dKEqnTQal53RYl5KoMFHweXHJfkwDk7zYMLGjdKTYA63yWKnFw-jbL6i-Xq0rcPTh4rsz8YhWta-k-7RJ3pqKYJEHcmxfX5EdeVuKMlUlOqT5t06AFwpo_lVOAPOD2RdOhPjCDDPD4Nca2g1ddcLdmdDnyN5GBaPY5wXENqaP9dgLMfkkx86RO5f4LBBiGZ5mmLg1oRx7EqtCo7fTdHrHetOUVJEptFfXp
------boundary--

JSON Response example

Once the upload has completed, users viewing the HTML view will be redirected to the new uploaded item resource page that outlines the item properties, such as it's item ID, item name, and description. If f was specified as either json or pjson, users will not be redirected to the item resource page. Instead, a response that includes a success message, as well as the JSON representation of the item's properties that can be found on the item resource page, is returned.

{
  "status": "success",
  "item": {
    "itemID": "caf81a83-b6a7-4810-9e7c-dbff96c6050a",
    "description": "",
    "itemName": "FireWeatherWatch.kmz",
    "date": 1597190184236,
    "committed": true,
    "contentType": "application/octet-stream"
  }
}