What is sharing?
Sharing is the process of making geographic content accessible to users in ArcGIS Online and ArcGIS Enterprise. The Share setting allows you to set the sharing level for an item. Restricting the sharing level is how you secure both the item in a portal and the underlying data in the data service.
You can use the share setting to:
- Change the discoverability of an item in a portal.
- Make an item private or public.
- Give specific groups of users or an organization access to an item.
- Require data services to be accessed with an access token.
Types of sharing levels
The following is a list of the sharing levels available for the different types of ArcGIS products:
- Owner (private): Only the owner has access. The hosted layer (item) and data service are private and will not be visible or accessible to others. A valid access token or scoped API key is required. Learn more about scoping items to an API key in API keys.
How to set the sharing level
The general steps on how to share an item.
1. Create an item
An item represents various types of data, such as web maps, layers, web apps, tools and more. An item can also be shared, used, and managed in a portal using the item page. You use the portal service to create these items in your organization.
The most common types of items added to a portal include:
- Shapefiles (.shp): A common geospatial vector data format used in GIS software.
- CSV (.csv): Comma-separated values files often used to store tabular data.
- GeoJSON (.geojson): A format for encoding geographic data structures.
- KML (.kml): Keyhole Markup Language for encoding and visualizing geographic information.
- Web maps (.webmap): Specific to ArcGIS, containing information about layers, symbology, and other map properties.
- Tile packages (.tpk): Bundled raster data used for efficient map display.
- Hosted layers: Layers hosted on ArcGIS Online for sharing and collaboration.
2. Select a sharing level
Determining the right level of sharing, whether for the general public, internal members, or specific groups, requires an understanding of the target users. This involves considering the sharing requirements and potential uses of the specific item.
The table below shows authorization required for each sharing level.
Sharing level | Authorization required | ArcGIS account required |
---|---|---|
Owner (private) | Yes | Yes |
Group | Yes | Yes |
Organization | Yes | Yes |
Everyone(public) | No | No |
The table below shows types of ArcGIS products charged to access an item for each sharing level.
Sharing level | ArcGIS Location Platform | ArcGIS Online | ArcGIS Enterprise |
---|---|---|---|
Owner (private) | Pay-as-you-go | Free tier | Free tier |
Group | Unsupported | Free tier | Free tier |
Organization | Unsupported | Free tier | Free tier |
Everyone (public) | Unsupported | Free tier | Free tier |
3. Set the sharing level
Once the share levels are configured, ensure the item has the appropriate sharing levels by reviewing the item page.
Below is an example of how to share an item:
# Update the sharing level
item.share(everyone=True, org=True if sharing_level == 'organization' else False, groups='')
Code examples
You can use data management tools to manage the sharing level of a hosted feature layer (item) or you can use the ArcGIS REST APIs. The following examples illustrate how to set the sharing level of a hosted feature layer (item).
Set sharing to private
Restrict the hosted layer (item) and data service access to the owner only. An access token is required to access the service.
POST https://{host}/sharing/rest/content/users/{organizationId}/items/{itemId}/share HTTP/1.1
Content-Type: application/x-www-form-urlencoded
everyone=false
&org=false
&groups=
&token={access_token}
Set sharing to group
Restrict the hosted layer (item) and data service access to private or public groups in the organization. An access token is required to access the service.
This sharing level is not available.
Set sharing to organization
Restrict the hosted layer (item) and data service access to members of the organization. An access token is required to access the service.
This sharing level is not available.
Set sharing to public
Allow unrestricted access to the hosted layer (item) and data service. An access token is not required to access the service.
This sharing level is not available.
Tutorials
Import data to create a feature layer
Use data management tools to import files and create a feature layer in a feature service.
Define a new feature layer
Use data management tools to define and create a new empty feature layer in a feature service.
Manage a feature layer
Use a hosted feature layer item to set the properties and settings of a feature layer in a feature service.
Create a vector tile service
Use data management tools to create a new vector tile service from a feature service.
Create a map tile service
Use ArcGIS Online or scripting APIs to publish a map tile service.
Services
Feature service
Add, update, delete, and query feature data.
Vector tile service
Store and access vector tile data.
Map tile service
Store and access map tile data.
Image service
Store and access imagery and raster data.