Upload

URL:
https://<root>/uploads/upload
Methods:
POST
Required Capability:
Access allowed only with the Publisher role
Version Introduced:
10.9

Description

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

  • .soe
  • .sd
  • .sde
  • .odc
  • .csv
  • .txt
  • .zshp
  • .agssite
  • .agssiteservices
  • .zip
  • .geodatabase
  • .kmz
  • .json
  • .geojson
  • .gpx
  • .xlsx
  • .xls

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.

1
2
3
4
5
6
7
8
9
10
11
{
  "status": "success",
  "item": {
    "itemID": "caf81a83-b6a7-4810-9e7c-dbff96c6050a",
    "description": "",
    "itemName": "FireWeatherWatch.kmz",
    "date": 1597190184236,
    "committed": true,
    "contentType": "application/octet-stream"
  }
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close