Skip To Content

/addResource: Add Organization Resource

  • URL:https://[root]/portals/[portalID]/addResource(POST only)

Example usage

Below is a sample ArcGIS Online multipart POST request for the addResource operation:


POST /sharing/rest/portals/0123456789ABCDEF/addResource HTTP/1.1
Host: org.arcgis.com
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Length: []

------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="key"

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

logo.png
------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="text"

{"test": "content"}
------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="access"

org
------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="f"

pjson
------WebKitFormBoundary9Blzwh2i2nMd91xe--

Below is a sample ArcGIS Enterprise multipart POST request for the addResource operation:


POST /webadaptor/sharing/rest/portals/<portalID>/addResource HTTP/1.1
Host: machine.domain.com
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Length: []

------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="key"

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

logo.png
------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="text"

{"test": "content"}
------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="access"

org
------WebKitFormBoundary9Blzwh2i2nMd91xe
Content-Disposition: form-data; name="f"

pjson
------WebKitFormBoundary9Blzwh2i2nMd91xe--

Description

The add resource operation (POST only) allows the administrator to add a file resource, for example, the organization's logo or custom banner. The resource can be used by any member of the organization. File resources use storage space from your quota and are scanned for viruses.

If the file resource is from a file, it must be uploaded in an HTTP multi-part request as per IETF RFC1867.

Request parameters

ParameterDetails
key

The name the resource should be stored under.

Example

Logo
file

Multipart HTTP parameter containing the binary file to upload.

text

Some text to be written (for example, JSON or JavaScript) directly to the resource from a web client.

Example

{"test": "content"}
access

Sets the resources access level.

Values: orgprivate | public | org

If access is set to orgprivate, anonymous and public users will not have access to this resource whether the org is public or not.

f

The response format. The default format is html.

Values: html | json | pjson

Response properties

PropertyDetails
success

Indicates if the operation was successful.

JSON Response example


{
  "success": true
}