Skip To Content

/update: Update Proxy

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

Example usage

URL for Update Proxy

https://www.arcgis.com/sharing/rest/content/users/jsmith/items/d141c90171114982991d2f1ffc99f8aa/proxies/bxf1vC9DB7G0CFkP/update

Description

The Update Proxy operation (POST only) allows you to update an ArcGIS Online-hosted proxy service that has been set on an item. The operation is only available on registered app items with Registered App and App Proxy type keywords.

The operation can only be made by the item owner and the organization administrator.

Request parameters

ParameterDetails
[Common Parameters]

For a complete listing, see common parameters.

proxy

A JSON object representing the hosted proxy information to update, including source service URL, proxy URL, ID, and optionally rate limiting for the service.

Example:

{
	"sourceUrl": "https://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World",
	"proxyUrl": "https://utility.arcgis.com/sharing/appservices/bxf1vC9DB7G0CFkP/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World",
	"proxyId": "bxf1vC9DB7G0CFkP",
	"hitsPerInterval": 200,
	"intervalSeconds": 60
}

Response properties

PropertyDetails
success

Indicates whether the operation was successful.

proxyId

Proxy ID.

itemId

Item ID.

appProxies

A JSON array consisting of the updated proxy information, including source service URL, proxy URL, proxy ID, and optionally rate limiting for the service.

Example:

[
    {
      "sourceUrl": "https://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World",
      "proxyUrl": "https://utility.arcgis.com/sharing/appservices/bxf1vC9DB7G0CFkP/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World",
      "hitsPerInterval": 200,
      "intervalSeconds": 60,
      "proxyId": "bxf1vC9DB7G0CFkP"
    }
  ]

JSON Response syntax

{
  "success": true,
  "proxyId": "<proxy ID>",
  "itemId": "<item ID>",
  "appProxies": [
    {
      "sourceUrl": "<service url to proxy>",
      "proxyUrl": "<proxy service url>",
      "hitsPerInterval": <num of requests allowed per time interval>,
      "intervalSeconds": <time interval in seconds>,
      "proxyId": "<proxy ID>"
    }
  ]
}

JSON Response example

{
  "success": true,
  "proxyId": "bxf1vC9DB7G0CFkP",
  "itemId": "d141c90171114982991d2f1ffc99f8aa",
  "appProxies": [
    {
      "sourceUrl": "https://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World",
      "proxyUrl": "https://utility.arcgis.com/sharing/appservices/bxf1vC9DB7G0CFkP/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World",
      "hitsPerInterval": 200,
      "intervalSeconds": 60,
      "proxyId": "bxf1vC9DB7G0CFkP"
    }
  ]
}

or

{
	"error": {
		"code": 400,
		"message": "Unable to update proxy.",
		"details": ["ProxyId is Invalid"]
	}
}