create a new content with a layer that prefers the layer properties over item properties

create a new content with a layer that prefers the layer properties over item properties


Parameter Type Default Notes
content Required IHubContent

service or layer content

layerId Optional number

id of the layer


a new content

Property Type Notes
identifier string

The preferred identifier to use for Hub URLs. This will be either the slug, hubId, or item id.

isDownloadable boolean

Whether the content is downloadable in the Hub app

item IItem

The underlying portal item referenced by this content

permissions {

Content visibility and access control, including groups

publishedDate Date

Date the content was published (formal metadata), defaults to the date the content was created

createdDate Inherited Date

Date the entity was created

createdDateSource Inherited string

Source of the creation date

id Inherited string

Id of the entity as a string

name Inherited string

Name of the Entity For Entities backed by items, this is typically the title

owner Inherited string

Username of the owner of the item

tags Inherited string[]

User configurable tags

type Inherited string

Type of entity

updatedDate Inherited Date

Date the entity was last updated

updatedDateSource Inherited string

Source of the updated date

additionalResources Optional IHubAdditionalResource[]

links to additional resources specified in the formal item metadata

categories Optional string[]

Parsed item categories (see parseItemCategories)

family Optional HubFamily

The the family of related types that this content belongs to.

hubActions Optional object

Configure which Hub application actions (i.e. create web map) are available for this content

hubId Optional string

The content's ID for use with the Hub API For most content this will be the item's id For layers this will be <itemId>_<layerId> This will be undefined for private items and in enterprise because only public online items are included in the Hub API

isProxied Optional boolean

Whether or not the layer or table is actually a proxied CSV

itemCategories Optional string[]
layer Optional Partial<ILayerDefinition>

Information about the layer referenced by this content (geometryType, fields, etc)

normalizedType Optional string
orgId Optional string
portalApiUrl Optional string

URL of the Portal API endpoint for the resource

portalDataUrl Optional string

URL of the Portal API data endpoint for the resource

portalHomeUrl Optional string

URL of the resource's page in the Portal Home application

publishedDateSource Optional string

Description of the source of the published date

slug Optional string

Slug that can be used to lookup an entity by something other than it's id

structuredLicense Optional IStructuredLicense

The content's structured license info

updateFrequency Optional string

Frequency at which the content is updated

viewDefinition Optional {

definition for content that refers to a client-side layer view

boundary Optional Inherited IHubGeography

boundary will default to the item extent but can be overwritten by enrichments from the Hub API (inline) or fetched from a location such as /resources/boundary.json

culture Optional Inherited string

Culture code of the content i.e. en-us

data Optional Inherited [key: string]: any

The portal item's data (if any)

description Optional Inherited string

Description for the item

errors Optional Inherited IEnrichmentErrorInfo[]

Any errors encountered when fetching enrichments see

groupIds Optional Inherited string[]

The ids of any groups that the item belongs to

layers Optional Inherited Array<Partial<ILayerDefinition>>

Detailed information about the service's layers (geometryType, fields, etc) for related layers in the service

metadata Optional Inherited any

The content's formal metadata

org Optional Inherited Partial<IPortal>

The owner's organization (portal) details (id, name, extent, etc)

ownerUser Optional Inherited IUser

The user that owns the item

recordCount Optional Inherited number

The count of records for the layer referenced by this content

server Optional Inherited Partial<IFeatureServiceDefinition>

Information about the service referenced by this content (currentVersion, capabilities, maxRecordCount etc)

statistics Optional Inherited any
summary Optional Inherited string

Simple summary of the Entity. For items, this is typically the snippet property.

thumbnailUrl Optional Inherited string

Thumbnail Uril (read-only)

typeKeywords Optional Inherited string[]

System configurable typekeywords

url Optional Inherited string

Canonical Url for the Entity

Function defined in content/src/enrichments.ts:637