Skip To Content
ArcGIS Developer
Dashboard

Upload

Description

The upload operation uploads files to an organization. You can filter uploaded items by the following file extensions:

  • .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 its item ID, item name, and description. If the f parameter 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 from the item resource page, will be returned.


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