URL:
https://[root]/community/users/[userName]/addResource
Methods:
POST

Example usage

Below is a sample ArcGIS Enterprise POST request for addResource:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
POST /<context>/sharing/rest/community/users/jdoe/addResource HTTP/1.1
Host: organization.example.com
Content-Type: multipart/form-data; boundary=----boundary
Content-Length: []

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

logo.png
----boundary
Content-Disposition: form-data; name="file"; filename=""
Content-Type: application/octet-stream

<content of file>
----boundary
Content-Disposition: form-data; name="text"

City of Cloud Creek logo
----boundary
Content-Disposition: form-data; name="access"

Public
----boundary

Description

The addResource operation allows a user or administrator to add a file resource, for example, a thumbnail. The resource is only available for use by the user. 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.

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.

access

The type of access allowed to the user resource. Setting the access type to UserAppPrivate means it is only available to the owner thorugh the app from which the resource was uploaded. Setting it to AllOrgUsersPrivateApp means it is available to all members of an organization that the owner is a part of through the app where the resource was uploaded. Setting it to Public means it is available to everyone, including anonymous access, through any app. Setting it to UserPrivateAllApps means it is available to the owner thorugh any app.

Values: UserAppPrivate | AllOrgUsersPrivateApp | Public | UserPrivateAllApps

JSON Response example

Use dark colors for code blocksCopy
1
{"success": true}

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