Items

An item, also known as a content item, is a reference to a specific type of content in the ArcGIS Platform portal. 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.

Create, manage, and access content items in the ArcGIS Platform portal.

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

ArcGIS OnlineDeveloper dashboard
 
1
https://www.arcgis.com/home/item.html?id=<ITEM_ID>

Examples:

 
1
https://developers.arcgis.com/layers/<ITEM_ID>

Example:

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

PublicPrivate
ArcGIS REST JSArcGIS JS APIArcGIS Python APIArcGIS iOS API
                        
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//

import { getItem } from "@esri/arcgis-rest-portal"

getItem("5a5147abe878444cbac68dea9f2f64e7", { portal: "https://www.arcgis.com/sharing/rest" })
  .then((response)=>{
    console.log(response);
  });


import { getItem } from "@esri/arcgis-rest-portal"
import { UserSession } from "@esri/arcgis-rest-auth"
import { ApiKey } from "@esri/arcgis-rest-auth"

const authentication = new UserSession ({
  token: "ACCESS_TOKEN" // Token representing an ArcGIS Identity from performing oAuth 2.0
});
// OR
const authentication = new ApiKey ("YOUR_API_KEY") // Scoped to access item below

getItem("ITEM_ID", { authentication: authentication })
.then((response)=>{
  console.log(response);
});
ArcGIS REST JSArcGIS JS APIArcGIS Python APIArcGIS iOS API
                        
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//

import { getItem } from "@esri/arcgis-rest-portal"

getItem("5a5147abe878444cbac68dea9f2f64e7", { portal: "https://www.arcgis.com/sharing/rest" })
  .then((response)=>{
    console.log(response);
  });


import { getItem } from "@esri/arcgis-rest-portal"
import { UserSession } from "@esri/arcgis-rest-auth"
import { ApiKey } from "@esri/arcgis-rest-auth"

const authentication = new UserSession ({
  token: "ACCESS_TOKEN" // Token representing an ArcGIS Identity from performing oAuth 2.0
});
// OR
const authentication = new ApiKey ("YOUR_API_KEY") // Scoped to access item below

getItem("ITEM_ID", { authentication: authentication })
.then((response)=>{
  console.log(response);
});

REST API

RequestResponse
          
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>'

Response

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
// Public

{
  "id": "5a5147abe878444cbac68dea9f2f64e7",
  "owner": "esri_devlabs",
  "orgId": "GVgbJbqm8hXASVYi",
  "created": 1569537110000,
  "modified": 1569537111000,
  "guid": null,
  "name": null,
  "title": "Seven Natural Wonders of the World Map",
  "type": "Web Map"
}

// Private

{
  "id": "ITEM_ID",
  "owner": "OWNER",
  "orgId": "ORG_ID",
  "created": "DATE_CREATED",
  "modified": "DATE_MODIFIED",
  "guid": null,
  "name": null,
  "title": "ITEM_TITLE",
  "type": "ITEM_TYPE"
}

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

PublicPrivate
ArcGIS REST JSArcGIS JS APIArcGIS Python APIArcGIS iOS API
                       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//

import { getItemData } from "@esri/arcgis-rest-portal"

getItemData("5a5147abe878444cbac68dea9f2f64e7", { portal: "https://www.arcgis.com/sharing/rest" }) // Web map item
  .then((response)=>{
    console.log(response);
  });

import { getItemData } from "@esri/arcgis-rest-portal"
import { ApiKey } from "@esri/arcgis-rest-auth"
import { UserSession } from "@esri/arcgis-rest-auth"

const authentication = new UserSession ({
  token: "ACCESS_TOKEN" // Token representing an ArcGIS Identity from performing oAuth 2.0
});
// OR
const authentication = new ApiKey ("YOUR_API_KEY")

getItemData("ITEM_ID", { authentication: authentication })
  .then((response)=>{
    console.log(response);
  });
ArcGIS REST JSArcGIS JS APIArcGIS Python APIArcGIS iOS API
                       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//

import { getItemData } from "@esri/arcgis-rest-portal"

getItemData("5a5147abe878444cbac68dea9f2f64e7", { portal: "https://www.arcgis.com/sharing/rest" }) // Web map item
  .then((response)=>{
    console.log(response);
  });

import { getItemData } from "@esri/arcgis-rest-portal"
import { ApiKey } from "@esri/arcgis-rest-auth"
import { UserSession } from "@esri/arcgis-rest-auth"

const authentication = new UserSession ({
  token: "ACCESS_TOKEN" // Token representing an ArcGIS Identity from performing oAuth 2.0
});
// OR
const authentication = new ApiKey ("YOUR_API_KEY")

getItemData("ITEM_ID", { authentication: authentication })
  .then((response)=>{
    console.log(response);
  });

REST API

RequestResponse
          
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>'
                                                                       
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Public

{
  "operationalLayers":[
     {
        "id":"Seven_Natural_Wonders_of_the_World_6051",
        "layerType":"ArcGISFeatureLayer",
        "url":"https://services.arcgis.com/uCXeTVveQzP4IIcx/arcgis/rest/services/Seven_Natual_Wonders_of_the_World/FeatureServer/0",
        "visibility":true,
        "opacity":1,
        "title":"Seven Natural Wonders of the World",
        "itemId":"da7cda8d38224b368bc74cc7d6f05d0f"
     }
  ],
  "baseMap":{
     "baseMapLayer":[
        {
           "id":"defaultBasemap",
           "layerType":"ArcGISTiledMapServiceLayer",
           "url":"https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",
           "visibility":true,
           "opacity":1,
           "itle":"Topographic"
        }
     ],
     "title":"Topographic"
  },
  "spatialReference":{
     "wkid":102100,
     "latestWkid":3857
  },
  "authoringApp":"WebMapViewer",
  "authoringAppVersion":"5.4",
  "version":"2.11"
}

// Private

{
   "operationalLayers":[
      {
         "id":"",
         "layerType":"",
         "url": "ITEM_URL"
         "visibility":true,
         "opacity":1,
         "title":"YOUR_ITEM_TITLE",
         "itemId":"ITEM_ID"
      }
   ],
   "baseMap":{
      "baseMapLayer":[
         {
            "id":"defaultBasemap",
            "layerType":"ArcGISTiledMapServiceLayer",
            "url":"https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",
            "visibility":true,
            "opacity":1,
            "itle":"TILE"
         }
      ],
      "title":"BASEMAP_TITLE"
   },
   "spatialReference":{
      "wkid":102100,
      "latestWkid":3857
   },
   "authoringApp":"WebMapViewer",
   "authoringAppVersion":"5.4",
   "version":"2.11"
 }

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

PublicPrivate
ArcGIS REST JSArcGIS JS APIArcGIS Python APIArcGIS iOS API
                                      
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
30
31
32
33
34
35
36
37
38
//

import { searchItems } from "@esri/arcgis-rest-portal";
// Define a query and text to search for
const query = new arcgisRest.SearchQueryBuilder()
  .match("Seven Natural Wonders of the World")
  .in("title")
  .and()
  .match("Web Map")
  .in("type")
  .and()
  .match("esri_devlabs")
  .in("owner")

searchItems(query, { portal: "https://www.arcgis.com/sharing/rest" })
  .then((response) => {
    console.log(response);
});

import { searchItems } from "@esri/arcgis-rest-portal";
import { UserSession } from "@esri/arcgis-rest-auth"

const authentication = new UserSession ({
  token: "ACCESS_TOKEN" // Token representing an ArcGIS Identity from performing oAuth 2.0
});

// Define a query and text to search for in your account
const query = new arcgisRest.SearchQueryBuilder()
  .match("Web Map")
  .in("type")
  .and()
  .match(authentication.username)
  .in("owner")

searchItems(query, { portal: "https://www.arcgis.com/sharing/rest", authentication: authentication })
  .then((response) => {
    console.log(response);
});
ArcGIS REST JSArcGIS JS APIArcGIS Python APIArcGIS iOS API
                                      
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
30
31
32
33
34
35
36
37
38
//

import { searchItems } from "@esri/arcgis-rest-portal";
// Define a query and text to search for
const query = new arcgisRest.SearchQueryBuilder()
  .match("Seven Natural Wonders of the World")
  .in("title")
  .and()
  .match("Web Map")
  .in("type")
  .and()
  .match("esri_devlabs")
  .in("owner")

searchItems(query, { portal: "https://www.arcgis.com/sharing/rest" })
  .then((response) => {
    console.log(response);
});

import { searchItems } from "@esri/arcgis-rest-portal";
import { UserSession } from "@esri/arcgis-rest-auth"

const authentication = new UserSession ({
  token: "ACCESS_TOKEN" // Token representing an ArcGIS Identity from performing oAuth 2.0
});

// Define a query and text to search for in your account
const query = new arcgisRest.SearchQueryBuilder()
  .match("Web Map")
  .in("type")
  .and()
  .match(authentication.username)
  .in("owner")

searchItems(query, { portal: "https://www.arcgis.com/sharing/rest", authentication: authentication })
  .then((response) => {
    console.log(response);
});

REST API

RequestResponse
            
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>'
                                                               
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  "query": "title:\"Seven Natural Wonders of the World\" AND type:\"web map\" AND owner:\"esri_devlabs\"",
  "total": 1,
  "start": 1,
  "num": 10,
  "nextStart": -1,
  "results": [{
    "id": "5a5147abe878444cbac68dea9f2f64e7",
    "owner": "esri_devlabs",
    "created": 1569537110000,
    "modified": 1569537111000,
    "guid": null,
    "name": null,
    "title": "Seven Natural Wonders of the World Map",
    "type": "Web Map",
    "typeKeywords": [
      "ArcGIS Online",
      "Explorer Web Map",
      "Map",
      "Online Map",
      "Web Map"
    ],
    "description": null,
    "tags": ["map"],
    "snippet": null,
    "thumbnail": "thumbnail/ago_downloaded.png",
    "documentation": null,
    "extent": [
      [
        -180,
        -68.6081
      ],
      [
        180,
        82.5122
      ]
    ],
    "categories": [],
    "spatialReference": null,
    "accessInformation": null,
    "licenseInfo": null,
    "culture": "en-us",
    "properties": null,
    "url": null,
    "proxyFilter": null,
    "access": "public",
    "size": -1,
    "subInfo": 0,
    "appCategories": [],
    "industries": [],
    "languages": [],
    "largeThumbnail": null,
    "banner": null,
    "screenshots": [],
    "listed": false,
    "numComments": 0,
    "numRatings": 0,
    "avgRating": 0,
    "numViews": 6,
    "scoreCompleteness": 33,
    "groupDesignations": null
  }]
}

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 REST JSArcGIS JS APIArcGIS Python APIArcGIS iOS API
                    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { createItem } from "@esri/arcgis-rest-portal";
import { UserSession } from "@esri/arcgis-rest-auth";

const authentication = new UserSession({
  token: "ACCESS_TOKEN" // Token representing an ArcGIS Identity from performing oAuth 2.0
});
// Create an item for a web map
createItem({
  portal: "https://www.arcgis.com/sharing",
  item: {
    title: "World geography",
    description: "This is a web map of the world.",
    tags: ["map", "world", "geography"],
    type: "Web Map"
  },
  authentication: authentication
})
.then((response) => {
    console.log(response); // Item ID
});

REST API

RequestResponse
       
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>'
    
1
2
3
4
{
  "success": true,
  "id": "ITEM_ID"
}

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 REST JSArcGIS Python APIArcGIS iOS API
            
1
2
3
4
5
6
7
8
9
10
11
12
import { setItemAccess } from "@esri/arcgis-rest-portal";
import { UserSession } from "@esri/arcgis-rest-portal";

const authentication = new UserSession({
  token: "ACCESS_TOKEN" //Token representing an ArcGIS Identity from performing oAuth 2.0
});

setItemAccess({
  id: "ITEM_ID",  // Hosted item
  access: "public", // 'org' || 'private'
  authentication: authentication
})

REST API

RequestResponse
      
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>'
   
1
2
3
{"results": [{"itemId": "ITEM_ID",
  "success": true,
  "notSharedWith": []}]} // Groups item not shared with

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 API for JavaScriptFully supportedFully supportedLimited operationsLimited operations
ArcGIS Runtime API for AndroidFully supportedFully supportedLimited operationsLimited operations
ArcGIS Runtime API for iOSFully supportedFully supportedLimited operationsLimited operations
ArcGIS Runtime API for JavaFully supportedFully supportedLimited operationsLimited operations
ArcGIS Runtime API for .NETFully supportedFully supportedLimited operationsLimited operations
ArcGIS Runtime API for QtFully supportedFully supportedLimited operationsLimited operations
ArcGIS API for PythonFully supportedFully supportedFully supportedFully supported
Esri LeafletRequires ArcGIS REST JSRequires ArcGIS REST JSRequires ArcGIS REST JSRequires ArcGIS REST JS
MapBox GL JSRequires ArcGIS REST JSRequires ArcGIS REST JSRequires ArcGIS REST JSRequires ArcGIS REST JS
OpenLayersRequires ArcGIS REST JSRequires ArcGIS REST JSRequires ArcGIS REST JSRequires ArcGIS REST JS
ArcGIS REST JSFully supportedFully supportedFully supportedFully supported
Full supportPartial support (see notes)Not supported

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.