- URL:
- https://[root]/portals/[portalID]/addResource
- Methods:
POST
Example usage
The following is a sample ArcGIS Online multipart POST request for the add
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--
The following is a sample ArcGIS Enterprise multipart POST request for the add
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
operation allows an 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
Parameter | Details |
---|---|
| The name the resource should be stored under. Example
|
| Multipart HTTP parameter containing the binary file to upload. |
| Some text to be written (for example, JSON or JavaScript) directly to the resource from a web client. Example
|
| Sets the resources access level. If Values: |
| The response format. The default format is Values: |
Response properties
Property | Details |
---|---|
| Indicates if the operation was successful. |
JSON Response example
{
"success": true
}