Show / Hide Table of Contents

Method AddPortalItemAsync

AddPortalItemAsync(PortalItem)

Adds an item without content asynchronously. This operation is available only to authenticated users.

Declaration
public Task<PortalItem> AddPortalItemAsync(PortalItem portalItem)
Parameters
Type Name Description
PortalItem portalItem

The portal item to add.

Returns
Type Description
System.Threading.Tasks.Task<PortalItem>

The task object representing the asynchronous add item operation. The value of the task result is a PortalItem object.

Remarks

The user automatically becomes the owner of the item. The item by default is flagged as private (e.g., not shared with any group). This can be changed with the share item operation.

The url used for an item must be unique within the particular user's folder.

Exceptions
Type Condition
System.ArgumentNullException

portalItem

Exception

Operation is available only to authenticated users.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15

AddPortalItemAsync(PortalItem, PortalItemContentParameters)

Adds an item with content asynchronously. This operation is available only to authenticated users.

Declaration
public Task<PortalItem> AddPortalItemAsync(PortalItem portalItem, PortalItemContentParameters portalItemContent)
Parameters
Type Name Description
PortalItem portalItem

The portal item to add.

PortalItemContentParameters portalItemContent

Content of the portal item.

Returns
Type Description
System.Threading.Tasks.Task<PortalItem>

The task object representing the asynchronous add item operation. The value of the task result is a PortalItem object.

Remarks

The user automatically becomes the owner of the item. The item by default is flagged as private (e.g., not shared with any group). This can be changed with the share item operation.

The url used for an item must be unique within the particular user's folder.

Exceptions
Type Condition
System.ArgumentNullException

portalItem

Exception

Operation is available only to authenticated users.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15

AddPortalItemAsync(PortalItem, PortalItemContentParameters, PortalFolder)

Adds an item with or without content asynchronously. This operation is available only to authenticated users.

Declaration
public Task<PortalItem> AddPortalItemAsync(PortalItem portalItem, PortalItemContentParameters portalItemContent, PortalFolder folder)
Parameters
Type Name Description
PortalItem portalItem

The portal item to add.

PortalItemContentParameters portalItemContent

Content of the portal item (may be null).

PortalFolder folder

The user folder (root folder if null or empty).

Returns
Type Description
System.Threading.Tasks.Task<PortalItem>

The task object representing the asynchronous add item operation. The value of the task result is a PortalItem object.

Remarks

The user automatically becomes the owner of the item. The item by default is flagged as private (e.g., not shared with any group). This can be changed with the share item operation.

The url used for an item must be unique within the particular user's folder.

Exceptions
Type Condition
System.ArgumentNullException

portalItem

Exception

Operation is available only to authenticated users.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15

AddPortalItemAsync(PortalItem, PortalItemContentParameters, PortalFolder, CancellationToken)

Adds an item with or without content asynchronously. This operation is available only to authenticated users.

Declaration
public Task<PortalItem> AddPortalItemAsync(PortalItem portalItem, PortalItemContentParameters portalItemContent, PortalFolder folder, CancellationToken cancellationToken)
Parameters
Type Name Description
PortalItem portalItem

The portal item to add.

PortalItemContentParameters portalItemContent

Content of the portal item (may be null).

PortalFolder folder

The user folder (root folder if null or empty).

CancellationToken cancellationToken

A CancellationToken with which to cancel the operation if required.

Returns
Type Description
System.Threading.Tasks.Task<PortalItem>

The task object representing the asynchronous add item operation. The value of the task result is a PortalItem object.

Remarks

The user automatically becomes the owner of the item. The item by default is flagged as private (e.g., not shared with any group). This can be changed with the share item operation.

The url used for an item must be unique within the particular user's folder.

Exceptions
Type Condition
System.ArgumentNullException

portalItem

Exception

Operation is available only to authenticated users.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.14
In This Article
Back to top Copyright © 2022 Esri.