Skip To Content
ArcGIS Developer
Dashboard

/update: Update Item

  • URL:https://[root]/content/users/[userName]/items/[itemID]/update(POST only)

Example Usage

The following is a sample ArcGIS Online POST request for the update operation:


POST /sharing/rest/content/users/serviceOwner/items/2b4c7a08699146f0b270ab609ec4aa91/update HTTP/1.1
Host: org.arcigs.com
Content-Type: multipart/form-data; boundary=----boundary
Content-Length: []

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

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

firewatch.png
------boundary
Content-Disposition: form-data; name="thumbnailUrl"


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

serviceMetadata.xml
------boundary
Content-Disposition: form-data; name="typeKeywords"

ArcGIS Server, Data, Feature Access, Feature Service, Service, Hosted Service
------boundary
Content-Disposition: form-data; name="description"

This map is used to monitor the state of fires surrounding the Inland Empire area and should be used as a resource for safety officials and residents.
------boundary
Content-Disposition: form-data; name="tags"

feature service, fire, fire watch, Inland Empire
------boundary
Content-Disposition: form-data; name="snippet"

Fires and their containment status within the Inland Empire
------boundary
Content-Disposition: form-data; name="extent"

-117.7976, 33.7443, -116.7834, 34.2351
------boundary
Content-Disposition: form-data; name="spatialReference"


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


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


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

en-us
------boundary
Content-Disposition: form-data; name="properties"


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

https://machine.domain.com/webadaptor/rest/services/Hosted/InlandEmpire_FireWatch/FeatureServer
------boundary
Content-Disposition: form-data; name="serviceUsername"


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


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


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


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


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


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


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


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


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

MapImage.png
------boundary
Content-Disposition: form-data; name="banner"; filename=""
Content-Type: application/octet-stream


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

Riverside.png
------boundary
Content-Disposition: form-data; name="screenshot"; filename=""
Content-Type: application/octet-stream

SanBernardino.png
------boundary
Content-Disposition: form-data; name="screenshot"; filename=""
Content-Type: application/octet-stream


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


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


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


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


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


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

pjson
------boundary--

The following is a sample ArcGIS Enterprise POST request for the update operation:


POST /webadaptor/sharing/rest/content/users/serviceOwner/items/2b4c7a08699146f0b270ab609ec4aa91/update HTTP/1.1
HOST: machine.domain.com
Content-Type: multipart/form-data; boundary=----boundary
Content-Length: []

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

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

firewatch.png
------boundary
Content-Disposition: form-data; name="thumbnailUrl"


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

serviceMetadata.xml
------boundary
Content-Disposition: form-data; name="typeKeywords"

ArcGIS Server, Data, Feature Access, Feature Service, Service, Hosted Service
------boundary
Content-Disposition: form-data; name="description"

This map is used to monitor the state of fires surrounding the Inland Empire area and should be used as a resource for safety officials and residents.
------boundary
Content-Disposition: form-data; name="tags"

feature service, fire, fire watch, Inland Empire
------boundary
Content-Disposition: form-data; name="snippet"

Fires and their containment status within the Inland Empire
------boundary
Content-Disposition: form-data; name="extent"

-117.7976, 33.7443, -116.7834, 34.2351
------boundary
Content-Disposition: form-data; name="spatialReference"


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


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


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

en-us
------boundary
Content-Disposition: form-data; name="properties"


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

https://machine.domain.com/webadaptor/rest/services/Hosted/InlandEmpire_FireWatch/FeatureServer
------boundary
Content-Disposition: form-data; name="serviceUsername"


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


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


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


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


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


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


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


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


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

MapImage.png
------boundary
Content-Disposition: form-data; name="banner"; filename=""
Content-Type: application/octet-stream


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

Riverside.png
------boundary
Content-Disposition: form-data; name="screenshot"; filename=""
Content-Type: application/octet-stream

SanBernardino.png
------boundary
Content-Disposition: form-data; name="screenshot"; filename=""
Content-Type: application/octet-stream


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


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


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


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


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


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

pjson
------boundary--

Description

The update operation allows users to update an item's information and file, URL, or text, depending on type. Users can use this operation to update item information such as title, description, tags, and so on, or use it to update an item's file, URL, or text. This call is available to the user and the administrator of the organization. The parameters that should be updated need to be specified in the request. Parameters not specified will not be affected. All parameters for this operation are optional.

Uploading files can be done asynchronously or in multiple parts. See Add Item for more information.

Request parameters

ParameterDetails
title

The title of the item. This is the only name that users and applications use for the title, as there is no concept of display names or aliases in the API.

thumbnail

The path to the thumbnail image to be used for the item. For best results, images that are 600 pixels wide by 400 pixels high or larger with an aspect ratio of 1.5:1 are recommended. Supported file formats are PNG, GIF, and JPEG with a maximum file size of 10 MB. The file will be stored on the sharing servers.

Supported retrievable thumbnail widths for item are 200 pixels (default), 400 pixels, 800 pixels, and 2400 pixels, with an aspect ratio of 1.5:1. Other specified sizes will be snapped to the next highest supported dimension for query. If the original image dimension is smaller than the size queried, the original image will be returned.

Example

subfolder/thumbnail.jpg

Item thumbnails can be retrieved at different dimensions by specifying a URL parameter w for the desired image width:

https://<item-url>/info/thumbnail/thumbnail.png?w=400
thumbnailUrl

Enter the URL to the thumbnail image to be used for the item. The recommended image size is 200 pixels wide by 133 pixels high. Acceptable image formats are PNG, GIF, and JPEG. The maximum file size for an image is 1 MB.

https://server/arcgis/subfolder/thumbnail.jpg
metadata

The file that stores the metadata information for an item. It's stored in the metadata folder under esriinfo, for example, https://www.arcgis.com/sharing/rest/content/items/<itemid>/info/metadata/metadata.xml.

Example

metadata.xml
metadataEditable

Indicates if the organization has metadata enabled.

If metadataEditable is true, all members of the organization can view the metadata. Only item owners and administrators can update metadata. If metadataEditabl is false, no one in the organization can access the metadata.

Values: true | false

metadataFormats

Metadata style used for organization. Default is iso19139.

Values: fgdc | inspire | iso19139 | iso19139-3.2 | iso19115

typeKeywords

Type keywords describe the type and should logically apply to all items of that type. See Items and Item types for a list of predefined type keywords that will be automatically added based on the supplied type. This parameter should be used only if you want to add additional type keywords. Keywords can be applied to any type of item, in addition to hosted feature services.

Syntax

<keyword1>, <keyword2>

Example

Static
description

An item description. The size of the description needs to be less than 63 KB.

Example

This application represents point locations within the United States and Canada for common institution landmark types including hospitals, educational institutions, religious institutions, government centers, and cemeteries.
tags

Tags are words or short phrases that describe the specific item, separated by commas.

Syntax

<tag1>, <tag2>

Example

landmarks, United States, Canada
snippet

Snippet or summary for the item. Limit this brief descriptive text to 2048 characters.

Example

Landmarks in United States and Canada
extent

The bounding rectangle of the item.

Syntax

<xmin>, <ymin>, <xmax>, <ymax>

Example

-110.05, 44.13, -110, 44.98
spatialReference

The coordinate system of the item.

Example

spGCS_North_American_1983
accessInformation

The source credits for the item.

Copyright:© 2008 ESRI, AND, TANA, ESRI Japan, UNEP-WCMC
licenseInfo

Includes any license information or restrictions.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
culture

The item locale (language and country) information. The browser locale will not be taken into consideration if the culture parameter is used to update an item. The format for a culture code is based on a language code and country code, separated by a dash. The language code is based on the two-letter codes found in the Library of Congress Codes for the Representation of Names of Languages. The country code is based on the two-letter codes found by searching the ISO Online Browsing Platform.

Example

en
properties

A JSON object that primarily applies to system requirements, terms and conditions, version, supported platforms, and video IDs associated with the application.

If the item is of type notebook, you can specify the runtime version of the notebook.

Notebook example:

{"notebookRuntimeName":"ArcGIS Notebook Python 3 Standard","notebookRuntimeVersion":"5.0"}

url

The URL of the item to be updated.

serviceUsername

Sets the user name on a secure, on-premises map, feature, or image service.

myuser1
servicePassword

Sets the password on a secure, on-premises map, feature, or image service.

mypassword1
serviceProxyParams

A JSON object that provides rate limiting and referrer checks when accessing secured services.

Example

{"hitsPerInterval":2,"intervalSeconds":60,"referrers":["https://<servername>"]}
serviceProxyFilter

A JSON object with category, sourceCountry, and searchExtent properties that are used to restrict service item response results based on specified filters, such as limiting results returned from a geocode service based on defined filters. This parameter is only applicable to geocoding service item types. The category property is a comma-delimited list of one or more categories from the geocoding service. The sourceCountry property is a 2- or 3-digit country code supported by the geocoding service. The searchExtent property is a JSON envelope object that is used to limit geocoding to a specified search area. The three properties (category, sourceCountry, and searchExtent) can be used independently or in any combination; they are applied as a Boolean AND operator when combined.

Examples


{
  "sourceCountry": "USA",
  "searchExtent": {
    "xmin": -13184700,
    "ymin": 3988556,
    "xmax": -13004945,
    "ymax": 4061479,
    "spatialReference": {
      "wkid": 102100
    }
  }
}

//or 
{
  "category" : "MGRS"
}
createAsServiceProxy

If true, a service URL item is updated as a proxy item without embedding credentials. It can be used to take advantage of the portal sharing model for security reasons, hide actual service URLs, rate limiting and referrer checks, and so on.

Values: true | false

removeServiceProxy

Allows users to remove the service proxy created for an item (true). The default value is false.

Values: true | false

appCategories

An array that primarily applies to a list of categories that the application item is applicable to.

clearEmptyFields

Clears any fields that are passed in empty (true). The default value is false.

Values: true | false

categories

A JSON array or comma-separated list of categories to add to the item.


//Format one
["/Categories/Basemaps", "/Categories/Transportation"]

//Format two
/Categories/Basemaps, /Categories/Transportation
industries

An array that primarily applies to industries associated with the application.

languages

An array that primarily applies to languages associated with the application.

largeThumbnail

Primarily applies to thumbnails associated with an application. The URL to the thumbnail is used for the application.

banner

Primarily applies to the banner associated with an application. The URL to the banner is used for the application.

screenshot

An array that primarily applies to screen shots associated with an application. The URL to the screen shots is used for the application.

listingProperties

A JSON object that consists of listing properties when the item is listed in ArcGIS Marketplace. For more information on syntax and properties, see Listing properties.

file

The file to be updated.

async

If true, the file is uploaded asynchronously. If false, the file is uploaded synchronously. This only applies to item types that require files. The default value is false.

Values: true | false

text

The JSON content for the item to be updated.

Example

text={'myAttribute':'myValue'}
dataUrl

The URL where the item can be downloaded. The resource will be downloaded and stored as a file type. This is similar to uploading a file to be added, but instead of transferring the contents of the file, the URL of the data file is referenced and creates a file item.

Please see the implementation details section below which discusses this parameter in further details.

multipart

If true, the file is uploaded in multiple parts. See the description above for more information.

Values: true | false

filename

The name of the file being uploaded in multipart mode. This parameter is required if the file is being uploaded in multiple parts and the multipart parameter is set as true.

f

The response format. The default format is html.

Values: html | json | pjson

Implementation details for using the dataUrl parameter

  • The referenced dataUrl parameter has to be an unsecured URL where data can be downloaded.
  • This operation is asynchronous; therefore, the client should check the item's status before using. If the status is completed, the resource is downloaded and the file item is added successfully.
  • If the resource supports byte ranges and the content length is larger than 500 KB, Range GET requests are used to download the file in parts.
  • Multiple parallel threads download the file parts and perform a file-based merge on them. This is not performed in-memory in order to avoid buffering. If a part can't be downloaded, it attempts once more before failing. All parts need to be downloaded successfully before the item can be created.

Service proxy parameters

ArcGIS Online and ArcGIS Enterprise users can register premium services, as well as services published on their own server, as secured service proxies. If working with secured services, you have the option to save the user name and password credentials directly with the item. Setting the serviceProxyParams provides additional control over how these services are accessed by supplying rate limiting and referrer checks. In other words, by setting these parameters, you provide more control over who can access these services and how much they can use them.

The serviceProxyParams JSON object used to set rate limiting and referrer checks on secured services is described below.

ParameterDetails
hitsPerInterval

Number of requests that will be allowed within a specified time interval of intervalInSeconds. Default value is 2.

intervalSeconds

Integer value indicating the interval time in seconds. Default value is 60.

referrers

Array of referrers allowed to access service.

A sample serviceProxyParams JSON object is as follows:


{
  "hitsPerInterval":2,
  "intervalSeconds":60,
  "referrers":["https://server1","https://server2"],
  "https://*arcgis.com] //*.arcgis.com allows any subdomain from arcgis.com to be added
}

Response example

If the rate limit is exceeded, an error will be returned:

Note:

Both hitsPerInterval and IntervalSeconds need to be greater than zero (0) for rate limiting to work.


{
  "error": {
    "code": 429,
    "messageCode": "CONT_0049",
    "message": "Rate limit exceeded. Please try again later.",
    "details": []
  }
}

Response properties

PropertyDetails
success

Indicates if the operation was successful.

id

The ID of the updated item.

JSON Response syntax


{
  "success": true | false,
  "id": "<item id>"
}

JSON Response example


{
  "success": true,
  "id": "b512083cd1b64e2da1d3f66dbb135956"
}