/addResource: Add Organization Resource

URL:
https://[root]/portals/[portalID]/addResource
Methods:
POST

Example usage

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 addResource operation:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 addResource 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

ParameterDetails

key

The name the resource should be stored under.

Example

1
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

1
{"test": "content"}

access

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

Values: orgprivate | public | org

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

1
2
3
{
  "success": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close