Create an item

Content

Content items in an in ArcGIS .

An in a represents different types of geographic data and resources. Items can include , , , tools, , and other resources that support spatial analysis and visualization.

Each item in a portal is associated with metadata, including a title, description, tags, and sharing settings. Items can be created, accessed, shared, and managed within an organization through the in a portal. Users can control item visibility by configuring : private, organization, group or public.

You use the for item creation and management in , , or . Using the portal service, developers and administrators can programmatically create, update, and delete items, as well as configure permissions and ownership settings.

Code examples

Below are example on how to create items in a portal.

Create a web map

Create a new web map item.

ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
1
2
3
4
5
6
7
8
9
10
from arcgis.gis import GIS
gis = GIS(username="USERNAME", password="PASSWORD")
item = {
    "title": "Word geography",
    "description": "This is a map of the world",
    "tags": ["map", "world", "geography"],
    "type": "Web Map"
}
results = gis.content.add(item)
print(results)
REST API
cURLcURLHTTP
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>'

Import a CSV file

Create an item in a portal by importing a CSV file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from arcgis.gis import GIS
import getpass

gis = GIS(
  url="https://www.arcgis.com",
  username="username",
  password=getpass.getpass("Enter password:")
)

trailhead_properties = {
  "title": "Trailheads",
  "description": "Trailheads imported from CSV file",
  "tags": "LA Trailheads"
}

csv_file = './data/LA_Hub_datasets/LA_Hub_datasets/Trailheads.csv'
csv_item = gis.content.add(trailhead_properties, csv_file)

trailhead_service = csv_item.publish()
trailhead_service

Tutorials

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

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.


Services

API support

SearchItemsUsersGroupsSettingsSecurity
ArcGIS Maps SDK for JavaScript1111
ArcGIS Maps SDK for .NET1111
ArcGIS Maps SDK for Kotlin1111
ArcGIS Maps SDK for Swift1111
ArcGIS Maps SDK for Flutter1111
ArcGIS Maps SDK for Java1111
ArcGIS Maps SDK for Qt1111
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet222222
MapLibre GL JS222222
OpenLayers222222
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.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close