Skip To Content ArcGIS for Developers Sign In Dashboard

Update Proxy

Description

The update proxy operation (POST only) allows 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 if 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"
    }
  ]

Example Usage

URL for Update Proxy

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

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"]
	}
}