The portal service is the content management service for a portal. The service can create, store, manage, and access different types of content.
Key features
You can use the portal service to:
- Securely store and access content in the cloud.
- Store different types of content such as web maps, web scenes, hosted layers, services, app configurations, and files.
- Manage content properties with items.
- Search for items.
- Access content items and content data.
- Share content with groups of users.
- Manage users and groups.
How the portal service works
The main operations you can perform with the portal service are:
- Search: Query to find private and public content.
- Items: Create, store, manage, and access items.
- Users: Search for users and manage user content.
- Groups: Create, search, and manage groups and group content.
Anonymous vs. restricted requests
The portal service can be accessed anonymously to perform some operations, such as searching for public content, while other operations are restricted (private). Examples of restricted operations include accessing private content, creating and sharing content, and performing administration tasks.
To access restricted operations, you must include an access token with the request. The service will grant or deny access to the operation based on the token's credentials.
Learn more about credentials and access tokens in Security and authentication.
Service URL
The portal service only supports an enhanced endpoint. The base URL is:
https://www.arcgis.com/sharing/rest
Learn more about standard and enhanced endpoints in Service endpoints.
Required parameters
token
The access token used to access restricted operations or private content. The value can be an API Key or OAuth 2.0 token.
API keys are limited and do not provide access to restricted operations, but they can be used to access private content such as private feature layers, vector tile layers, image tile layers, web maps, and web scenes. API keys must be scoped to access specific content.
OAuth 2.0 tokens, however, can be used to access restricted operations and all private data types within the scope of the user's credentials.
Learn more about access tokens and authentication methods in Security and authentication.
Code examples
Search for an item
Use search
to find different types of items.
REST API
## Public
curl https://www.arcgis.com/sharing/rest/search \
-d 'q=title:"Seven Natural Wonders of the World" AND type:"web map" AND owner:"esri_devlabs"' \
-d 'f=pjson'
## Private
curl https://www.arcgis.com/sharing/rest/search \
-d 'q=title:"Seven Natural Wonders of the World" AND type:"web map" AND owner:"<YOUR_USER_ID>"' \
-d 'f=pjson'
-d 'token=<ACCESS_TOKEN>'
Access an item
Use items
to access an item directly. To do so you need the item ID. You can get the item ID by using the portal or building an application to search for items. If the item is private, you need to include an access token.
REST API
## Public
curl https://www.arcgis.com/sharing/rest/content/items/5a5147abe878444cbac68dea9f2f64e7 \
-d 'f=pjson'
## Private
curl https://www.arcgis.com/sharing/rest/content/items/<ITEM_ID> \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>'
Access item data
Use data
to return the actual stored content for an item. The type returned depends on the item storage types. To access a private item's data, you need to include an access token
in the request along with the item ID.
REST API
## Public
curl https://www.arcgis.com/sharing/rest/content/items/5a5147abe878444cbac68dea9f2f64e7/data \
-d 'f=pjson'
## Private
curl https://www.arcgis.com/sharing/rest/content/items/<ITEM_ID>/data \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>'
Create an item
Use add
(POST) to create an item. At minimum, you need to set the title
and type
parameters in addition to your access token
. You can also upload files to create an item in supported formats like CSV.
REST API
curl https://www.arcgis.com/sharing/rest/content/users/<USER_NAME>/addItem \
-d 'f=pjson' \
-d 'title=World geography' \
-d 'description=This is the map of the world' \
-d 'type=Web Map'\
-d 'tags=map, world, geography' \
-d 'token=<ACCESS_TOKEN>'
Update sharing permissions
Use share
(POST) as the item owner to edit your item's level of access. The sharing parameters are: everyone
(accessible to the public), org
, and groups
. To perform this call, specify the item ID and set each parameter to a boolean (true
or false
) and, optionally, the group-id
for sharing. When sharing is set to false
, your item permissions are set as private
.
REST API
curl https://www.arcgis.com/sharing/rest/content/users/<YOUR_ORG>/items/<ITEM_ID>/share \
-d 'everyone=true' \
-d 'org=true' \
-d 'groups=<GROUP_IDs>' \
-d 'f=pjson' \
-d 'token=<ACCESS_TOKEN>'
Authentication
To make authenticated requests you need to use one of the following:
- API key: A permanent token that grants your application access to ready-to-use services and, with an ArcGIS Location Platform account, private content (currently in beta).
- User authentication (formerly _ArcGIS identity): Grants a short-lived token, generated via OAuth 2.0, giving your application permission to access the content and services authorized to an existing ArcGIS user's account.
- App authentication: Grants a short-lived token, generated via OAuth 2.0, authorizing your application access to ready-to-use services. See usage restrictions.
Learn more about getting access tokens in Security and authentication.
API support
- 1. Limited operations, use HTTP requests.
- 2. Access via ArcGIS REST JS.
Pricing
To determine how much it costs to access the portal service:
- If you have an ArcGIS Location Platform account, go to Pricing. Transactions are billed in US dollars. A free tier of transactions may be available.
- If you have an ArcGIS Online account, go to Understand credits. Transactions are billed in credits.
Tutorials
Use tools to create different types of content and build content-driven applications.
Web maps
Create a web map
Style layers in a web map
Display a web map
Create and display a map from a web map.
Web scenes
Create a web scene
Style layers in a web scene
Display a web scene
Create and display a scene from a web scene.
Feature layers
Import data to create a feature layer
Use data management tools to import files and create a 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.
Add a feature layer
Access and display point, line, and polygon features from a feature service.
Vector tile layers
Create a vector tile service
Use data management tools to create a new vector tile service from a feature service.
Add a vector tile layer
Access and display a vector tile layer in a map.
Basemap layers
Create a custom basemap style
Display a custom basemap style
Add and display a styled vector tile basemap layer.
Tools
Use tools to access the portal and create and manage content for applications.
ArcGIS Enterprise
Create, manage, analyze, and share data, maps, and applications in your organization.
Portal
Create, manage, and access content and data services for applications.
Map Viewer
Create, explore, and share web maps for 2D applications.
Scene Viewer
Create, style, and explore web scenes.
Vector Tile Style Editor
Create styles for basemap and vector tile layers.
Content management tools
Create, manage, organize, and share items in a portal.
Data management tools
Import data and create hosted layers and data services. Upload and manage documents, images, and other files.
Spatial analysis tools
Perform feature and raster analysis to create new datasets with the Map Viewer.
Developer credentials tool
Create API key and OAuth 2.0 developer credentials for custom applications.
Items
Manage and share items.
ArcGIS Pro
Create, style, and explore maps and scenes.
Geoprocessing tools
Import, manage, and analyze data.