Manage items

An item, also known as a content item, is a reference to a specific type of content in the portal service. An item is created when content is added to the portal. It is used to manage and access the resource. Items can reference many different types of content, such as maps, layers, styles, tools, applications, files, data services, or notebooks. The structure of the content is typically Text/JSON or a reference to a file.

You can use an item to:

  • Securely store different types of content in the portal.
  • Manage all properties and capabilities of the content.
  • Share content with different users and groups.
  • Access data and services.

How to work with items

To create and access items, you can use interactive tools, client APIs, or the REST API.

The typical workflow is:

  1. Create and store an item with tools, such as ArcGIS Online and the developer dashboard.
  2. Manage your items with tools.
  3. Access items in the portal service with a client API or the REST API.
content management
Create, manage, and access content items using the portal service.

Item types

Many different types of items can be stored in the portal, including maps, layers, styles, tools, applications, files, data sources, or notebooks. Each item has a set of properties that describe and reference the content. For items that reference content that can be stored as text, such as a web map, the JSON data is stored in a child data source. For items that reference services, properties such as the URL are stored, and depending upon the type of service, child data may also be stored with the item such as a renderer or pop-up configuration.

Below is a list of some of the more common item types, the label used in ArcGIS Online, and the data type.

TypeLabel (in ArcGIS Online)Data TypeDescription
Web MapWeb mapText/JSONA map with its configuration stored as a JSON structure.
Web SceneWeb sceneText/JSONA scene with its configuration stored as a JSON structure.
Feature ServiceFeature Layer (hosted)Text/JSONA hosted layer that references a feature layer in a feature service.
Vector Tile ServiceTile Layer (hosted)Text/JSONA hosted layer that references tile data and styles for a vector tile service.
Map ServiceTile Layer (hosted)Text/JSONA hosted layer that references static tile data in a Map service.
CSVCSVFileA reference to a file that contains comma separated values.
ShapefileShapefileFileA reference to a zipped file that contains a shapefile.

Item properties

All items contain a common set of properties such as the owner, title, type, tags, thumbnail, and description. These properties are common to all types of items and are set when the item is created. The properties are also used to search for the item.

When an item is created, it is assigned a unique identifier, also known as an item ID. You can use an item ID to find and directly access an item and its content in the portal.

Items that reference services can be used to manage the properties and capabilities of that service. For example, you can use a hosted feature layer item to store the pop-up and styling information for a hosted feature layer. It can also be used to set the editing capabilities for the feature layer in the feature service.

An item's sharing permissions can also be set with its access property, so that it can be accessed by only its owner (private), the members of an organization (org), or everyone (public).

These properties are typically set using an item page. See Manage an item for more details.

Manage an item

The easiest way to access and manage an item is to use an item page. An item page is a web page where you can access item properties through tools such as ArcGIS Online and the developer dashboard.

Item pages

Use dark colors for code blocksCopy
1
https://www.arcgis.com/home/item.html?id=<ITEM_ID>

Examples:

Access an item

To access and work with items in the portal, you can use client APIs or the REST API.

Get an item

To access an item and its properties, you can access it by item ID. The response contains the item properties.

The public example shows how to access a public web map item by its ID. The private example shows how to access any private item that you own by ID.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
24
25
    const item = new PortalItem({
      id: "5a5147abe878444cbac68dea9f2f64e7",
      portal: "https://www.arcgis.com/sharing/rest"
    });
    item.load().then((response)=>{
      console.log(response);
    });

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
## 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>'

Get item data

Items can contain child data. The data is typically stored as text (JSON) or as a reference to services, files, or other resources.

The public example gets the child data for a public web map item. The private example gets the child data for an item that you own. The data returned is the JSON. To create your own private item, see Create a web map.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
24
25
26
27
28
29
  const item = new PortalItem({
    portal: "https://www.arcgis.com/sharing/rest",
    id: "5a5147abe878444cbac68dea9f2f64e7"
  });
  item.load().then(()=>{
    item.fetchData().then((response)=>{
      console.log(response);
    });
  });

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
## 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>'

Search for an item

Use a query to search for items in the portal. If many results are returned, use paging.

The public example searches for all items that contain the string, type, and owner. The private example searches for your private items that are web maps.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
24
25
26
const portal = new Portal({
  url: "https://www.arcgis.com/"
});
portal.load().then(()=>{
  const query = {
    query: "title: Seven Natural Wonders, type: web map, owner: esri_devlabs"
  };
  portal.queryItems(query).then((response)=>{
    console.log(response);
  });
});

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
## 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>'

Create an item

You can create and store new items in the portal by specifying the item type and other required parameters. This request requires an access token.

This example creates a web map item.

NOTE: Child data should also be provided to define the JSON for the web map itself. See Create a web map to learn how to create a web map and get the JSON.

APIs

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for PythonArcGIS REST JS
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
const portal = new Portal();
portal.url = "https://www.arcgis.com/"
portal.authMode = "immediate";
// Prompts for username and password
portal.load()
  .then(()=> {
    const item = new PortalItem({
      title: "World geography",
      description: "This is a map of the world",
      tags: ["map", "world", "geography"],
      type: "Web Map"
    });
      const params = {
        item: item
      };
      portal.user.addItem(params).then((response)=>{
        console.log(response); // Item information
      });
});

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
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>'

Share an item

To share an item with different users, set the access property. The scope can be public (everyone), organization (your organization members only), group (private or public group), or private (only you).

You must be the item's owner or an administrator for the organization to change this property.

APIs

ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
Use dark colors for code blocksCopy
1
2
3
4
5
from arcgis.gis import GIS
gis = GIS(username="USERNAME", password="PASSWORD")
item = gis.content.get("ITEM_ID")
results = item.share(everyone=True)
print(results)

REST API

cURLcURLHTTP
Use dark colors for code blocksCopy
1
2
3
4
5
6
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>'

Tutorials

Use tools to create different types of content and build content-driven applications.

Web maps

Web scenes

Feature layers

Vector tile layers

Basemap layers

Services

Portal service

Store, manage, and access private and public content.

API support

SearchItemsUsersGroups
ArcGIS Maps SDK for JavaScript11
ArcGIS Maps SDK for .NET11
ArcGIS Maps SDK for Kotlin11
ArcGIS Maps SDK for Swift11
ArcGIS Maps SDK for Java11
ArcGIS Maps SDK for Qt11
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet2222
MapLibre GL JS2222
OpenLayers2222
Full supportPartial supportNo support
  • 1. Limited operations, use HTTP requests.
  • 2. Access via ArcGIS REST JS.

Tools

Use tools to access the portal and create and manage content for applications.

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