Class ListItemClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
[GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
public class ListItemClient : ClientBase, IListItemClient
Constructors
ListItemClient(IBusinessProcessClient, IPictureparkServiceSettings, HttpClient)
Declaration
public ListItemClient(IBusinessProcessClient businessProcessClient, IPictureparkServiceSettings settings, HttpClient httpClient)
Parameters
IBusinessProcessClient businessProcessClient |
IPictureparkServiceSettings settings |
HttpClient httpClient |
ListItemClient(IPictureparkServiceSettings, HttpClient)
Declaration
public ListItemClient(IPictureparkServiceSettings configuration, HttpClient httpClient)
Parameters
IPictureparkServiceSettings configuration |
HttpClient httpClient |
Fields
RootObjectRequestId
Properties
JsonSerializerSettings
Declaration
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
JsonSerializerSettings |
ReadResponseAsString
Methods
AggregateAsync(ListItemAggregationRequest, CancellationToken)
Aggregate list items
Declaration
public virtual Task<ObjectAggregationResult> AggregateAsync(ListItemAggregationRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemAggregationRequest
request
The list item aggregation request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ObjectAggregationResult>
Object aggregation result |
Implements
Remarks
Aggregates list items as specified in the aggregation request.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
BatchUpdateFieldsByFilterAsync(ListItemFieldsBatchUpdateFilterRequest, TimeSpan?, bool, CancellationToken)
Batch update fields - by filter
Declaration
public Task<ListItemBatchOperationResult> BatchUpdateFieldsByFilterAsync(ListItemFieldsBatchUpdateFilterRequest updateRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
ListItemFieldsBatchUpdateFilterRequest
updateRequest
The metadata update request. |
TimeSpan?
timeout
Timeout to wait for business process to complete. |
bool
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. By default the method waits for the search documents creation. Passing false, the method will return when the main entities have been updated and the creation of the search documents has been enqueued but not yet performed. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemBatchOperationResult> |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkException
Internal server error |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkValidationException
Validation exception |
BatchUpdateFieldsByFilterCoreAsync(ListItemFieldsBatchUpdateFilterRequest, CancellationToken)
Batch update fields - by filter
Declaration
protected virtual Task<BusinessProcess> BatchUpdateFieldsByFilterCoreAsync(ListItemFieldsBatchUpdateFilterRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemFieldsBatchUpdateFilterRequest
request
List item fields batch update by filter request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
Business process |
Remarks
Updates fields of multiple list items. A filter must be provided to limit the update to specific list items.
The same set of changes is applied to all the list items.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
BatchUpdateFieldsByIdsAsync(ListItemFieldsBatchUpdateRequest, TimeSpan?, bool, CancellationToken)
Batch update fields - by ids
Declaration
public Task<ListItemBatchOperationResult> BatchUpdateFieldsByIdsAsync(ListItemFieldsBatchUpdateRequest updateRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
ListItemFieldsBatchUpdateRequest
updateRequest
The metadata update request. |
TimeSpan?
timeout
Timeout to wait for business process to complete. |
bool
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. By default the method waits for the search documents creation. Passing false, the method will return when the main entities have been updated and the creation of the search documents has been enqueued but not yet performed. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemBatchOperationResult>
BusinessProcess |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkException
Internal server error |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkValidationException
Validation exception |
BatchUpdateFieldsByIdsCoreAsync(ListItemFieldsBatchUpdateRequest, CancellationToken)
Batch update fields - by IDs
Declaration
protected virtual Task<BusinessProcess> BatchUpdateFieldsByIdsCoreAsync(ListItemFieldsBatchUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemFieldsBatchUpdateRequest
request
List item fields batch update request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
Business process |
Remarks
Updates fields of multiple list items. A list of list item IDs must be provided to limit the update to specific list items.
The same set of changes is applied to all the list items.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
CreateAsync(ListItemCreateRequest, IEnumerable<ListItemResolveBehavior>, bool?, TimeSpan?, bool?, CancellationToken)
Create list item
Declaration
public virtual Task<ListItemDetail> CreateAsync(ListItemCreateRequest request, IEnumerable<ListItemResolveBehavior> resolveBehaviors = null, bool? allowMissingDependencies = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default)
Parameters
ListItemCreateRequest
request
List item create request. |
IEnumerable<ListItemResolveBehavior>
resolveBehaviors
List of enums that control which parts of the list item are resolved and returned. |
bool?
allowMissingDependencies
Allows creating list items that refer to list items or contents that don't exist in the system. |
TimeSpan?
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
bool?
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemDetail>
List item detail |
Implements
Remarks
Create a new list item.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
CreateFromObjectAsync(object, bool, TimeSpan?, bool, CancellationToken)
Creates a ListItems based on an object and its references.
Declaration
public Task<ListItemBatchOperationWithRequestIdResult> CreateFromObjectAsync(object content, bool allowMissingDependencies = false, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
object
content
The object to create ListItems from. |
bool
allowMissingDependencies
Allow creating ListItems that refer to list items or contents that don't exist in the system. |
TimeSpan?
timeout
Timeout to wait for business process to complete. |
bool
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. By default the method waits for the search document creation. Passing false, the method will return when the main entity has been created and the creation of the search document has been enqueued but not yet performed. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<ListItemBatchOperationWithRequestIdResult>
The created ListItems. |
Implements
Exceptions
ApiException
A server side error occurred. |
CreateManyAsync(ListItemCreateManyRequest, TimeSpan?, bool, CancellationToken)
Creates multiple ListItems.
Declaration
public Task<ListItemBatchOperationWithRequestIdResult> CreateManyAsync(ListItemCreateManyRequest createManyRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
ListItemCreateManyRequest
createManyRequest
The create many request. |
TimeSpan?
timeout
Timeout to wait for business process to complete. |
bool
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. By default the method waits for the search documents creation. Passing false, the method will return when the main entities have been created and the creation of the search documents has been enqueued but not yet performed. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<ListItemBatchOperationWithRequestIdResult> |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkException
The business process has not been completed. |
CreateManyCoreAsync(ListItemCreateManyRequest, CancellationToken)
Create multiple list items
Declaration
protected virtual Task<BusinessProcess> CreateManyCoreAsync(ListItemCreateManyRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemCreateManyRequest
request
List item create many request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
Business process |
Remarks
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
DeleteAsync(string, bool?, TimeSpan?, bool?, CancellationToken)
Delete list item
Declaration
public virtual Task DeleteAsync(string id, bool? forceReferenceRemoval = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default)
Parameters
string
id
The ID of the list item to delete. |
bool?
forceReferenceRemoval
A value indicating whether references to the list item should be removed. |
TimeSpan?
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
bool?
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
Ok |
Implements
Remarks
Deletes a list item. The lifecycle is changed to Inactive. After a customer instance specified time (default 30 days), the list item and all related files will be deleted.
Exceptions
ApiException
A server side error occurred. |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
PictureparkValidationException
Validation exception |
ReferencesUpdateException
Validation prevents deletion of item |
DeleteManyAsync(ListItemDeleteManyRequest, CancellationToken)
Delete multiple list items
Declaration
public virtual Task<BusinessProcess> DeleteManyAsync(ListItemDeleteManyRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemDeleteManyRequest
request
List item delete many request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
Business process |
Implements
Remarks
The lifecycle is changed to Inactive. After a customer instance specified time (default 30 days), the list item and all files will be deleted.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
DeleteManyByFilterAsync(ListItemDeleteManyFilterRequest, CancellationToken)
Delete multiple list items - by filter
Declaration
public virtual Task<BusinessProcess> DeleteManyByFilterAsync(ListItemDeleteManyFilterRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemDeleteManyFilterRequest
request
Delete many by filter request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
Business process |
Implements
Remarks
Deletes multiple list items. A filter must be provided to limit the deletion to specific list items.
The lifecycle is changed to Inactive. After a customer instance specified time (default 30 days), the list item and all files will be hard deleted.
The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetAndConvertToAsync<T>(string, string, CancellationToken)
Gets an existing list item and converts its content to the requested type.
Declaration
public Task<T> GetAndConvertToAsync<T>(string listItemId, string schemaId, CancellationToken cancellationToken = default)
Parameters
string
listItemId
The list item ID. |
string
schemaId
The schema ID of the requested type. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<T>
The converted object. |
Type Parameters
T
The requested content type. |
Implements
Exceptions
ApiException
A server side error occurred. |
GetAsync(string, IEnumerable<ListItemResolveBehavior>, CancellationToken)
Get list item
Declaration
public virtual Task<ListItemDetail> GetAsync(string id, IEnumerable<ListItemResolveBehavior> resolveBehaviors = null, CancellationToken cancellationToken = default)
Parameters
string
id
The list item ID. |
IEnumerable<ListItemResolveBehavior>
resolveBehaviors
List of enums that control which parts of the list item are resolved and returned. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemDetail>
List item detail |
Implements
Remarks
Gets the list item detail by ID.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetManyAndConvertToAsync<T>(IEnumerable<string>, string, CancellationToken)
Gets a list of existing list items and converts their content to the requested type
Declaration
public Task<ICollection<T>> GetManyAndConvertToAsync<T>(IEnumerable<string> listItemIds, string schemaId, CancellationToken cancellationToken = default)
Parameters
IEnumerable<string>
listItemIds
The list of list item IDs. |
string
schemaId
The schema ID of the requested type. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<ICollection<T>>
The list of converted objects. |
Type Parameters
T
The requested content type. |
Implements
Exceptions
ApiException
A server side error occurred. |
GetManyAsync(IEnumerable<string>, IEnumerable<ListItemResolveBehavior>, CancellationToken)
Get multiple list items
Declaration
public virtual Task<ICollection<ListItemDetail>> GetManyAsync(IEnumerable<string> ids = null, IEnumerable<ListItemResolveBehavior> resolveBehaviors = null, CancellationToken cancellationToken = default)
Parameters
IEnumerable<string>
ids
List of list item IDs. |
IEnumerable<ListItemResolveBehavior>
resolveBehaviors
List of enums that control which parts of the list items are resolved and returned. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ICollection<ListItemDetail>>
List of list item details |
Implements
Remarks
Gets multiple list item details by IDs.
Can fetch 100 list items at most.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetReferencesAsync(string, ListItemReferencesRequest, CancellationToken)
Get list item references
Declaration
public virtual Task<ListItemReferencesResult> GetReferencesAsync(string id, ListItemReferencesRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
The ID of the list item. |
ListItemReferencesRequest
request
Request options to specify how many references to fetch. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemReferencesResult>
List item references |
Implements
Remarks
Gets the references (list items, contents) to a single list item.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetReferencesManyAsync(ListItemManyReferencesRequest, CancellationToken)
Get multiple list items references
Declaration
public virtual Task<ListItemReferencesResult> GetReferencesManyAsync(ListItemManyReferencesRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemManyReferencesRequest
request
ListItemManyReferencesRequest |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemReferencesResult>
A list of references per list item. |
Implements
Remarks
Gets the references (list items, contents) to multiple list items.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetReferencesToListItemAsync(string, ListItemReferencesRequest, CancellationToken)
Get list item references
Declaration
public Task<ListItemReferencesResult> GetReferencesToListItemAsync(string id, ListItemReferencesRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
The ID of the list item. |
ListItemReferencesRequest
request
Request options to specify how many references to fetch. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemReferencesResult>
List item references |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
GetReferencesToListItemsAsync(ListItemManyReferencesRequest, CancellationToken)
Get multiple list items references
Declaration
public Task<ListItemReferencesResult> GetReferencesToListItemsAsync(ListItemManyReferencesRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemManyReferencesRequest
request
ListItemManyReferencesRequest |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemReferencesResult>
A list of references per list item. |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
Declaration
protected virtual Task<ListItemClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
HttpResponseMessage response |
IReadOnlyDictionary<string, IEnumerable<string>> headers |
CancellationToken cancellationToken |
Returns
Task<ListItemClient.ObjectResponseResult<T>> |
Type Parameters
T |
RestoreAsync(string, bool?, TimeSpan?, bool?, CancellationToken)
Restore list item
Declaration
public virtual Task RestoreAsync(string id, bool? allowMissingDependencies = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default)
Parameters
string
id
The list item ID. |
bool?
allowMissingDependencies
Allows restoring list items that refer to list items or contents that don't exist in the system. |
TimeSpan?
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
bool?
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
Ok |
Implements
Remarks
Restores a previously deleted list item.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
RestoreManyAsync(ListItemRestoreManyRequest, CancellationToken)
Restore multiple list items
Declaration
public virtual Task<BusinessProcess> RestoreManyAsync(ListItemRestoreManyRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemRestoreManyRequest
request
List item restore many request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
Business process |
Implements
Remarks
Restores previously deleted list items.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
SearchAsync(ListItemSearchRequest, CancellationToken)
Search list items
Declaration
public virtual Task<ListItemSearchResult> SearchAsync(ListItemSearchRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemSearchRequest
request
The list item search request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemSearchResult>
List item search result |
Implements
Remarks
Searches list items as specified in the search request.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
UpdateAsync(string, ListItemUpdateRequest, IEnumerable<ListItemResolveBehavior>, bool, TimeSpan?, bool, CancellationToken)
Updates a list item
Declaration
public Task<ListItemDetail> UpdateAsync(string listItemId, ListItemUpdateRequest updateRequest, IEnumerable<ListItemResolveBehavior> resolveBehaviors = null, bool allowMissingDependencies = false, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
string
listItemId
The list item ID. |
ListItemUpdateRequest
updateRequest
The update request. |
IEnumerable<ListItemResolveBehavior>
resolveBehaviors
List of enum that control which parts of the list item are resolved and returned. |
bool
allowMissingDependencies
Allow creating ListItems that refer to list items or contents that don't exist in the system. |
TimeSpan?
timeout
The timeout in milliseconds to wait for completion. |
bool
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. By default the method waits for the search document creation. Passing false, the method will return when the main entity has been updated and the creation of the search document has been enqueued but not yet performed. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<ListItemDetail>
The updated ListItemDetail. |
Implements
UpdateAsync(string, object, UpdateOption, IEnumerable<ListItemResolveBehavior>, bool, TimeSpan?, bool, CancellationToken)
Updates a list item by providing its content
Declaration
public Task<ListItemDetail> UpdateAsync(string listItemId, object content, UpdateOption updateOption = UpdateOption.Merge, IEnumerable<ListItemResolveBehavior> resolveBehaviors = null, bool allowMissingDependencies = false, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
string
listItemId
The list item ID. |
object
content
The content which must match the item's schema ID. |
UpdateOption
updateOption
Fields update option, Merge will merge the values specified in the Content object with the existing content, while Replace will replace the existing content with the values from the request |
IEnumerable<ListItemResolveBehavior>
resolveBehaviors
List of enum that control which parts of the list item are resolved and returned. |
bool
allowMissingDependencies
Allow creating ListItems that refer to list items or contents that don't exist in the system. |
TimeSpan?
timeout
The timeout in milliseconds to wait for completion. |
bool
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. By default the method waits for the search document creation. Passing false, the method will return when the main entity has been updated and the creation of the search document has been enqueued but not yet performed. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<ListItemDetail>
The updated ListItemDetail. |
Implements
UpdateCoreAsync(string, ListItemUpdateRequest, IEnumerable<ListItemResolveBehavior>, bool?, TimeSpan?, bool?, CancellationToken)
Update list item
Declaration
protected virtual Task<ListItemDetail> UpdateCoreAsync(string id, ListItemUpdateRequest request, IEnumerable<ListItemResolveBehavior> resolveBehaviors = null, bool? allowMissingDependencies = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default)
Parameters
string
id
The list item ID. |
ListItemUpdateRequest
request
The list item update request. |
IEnumerable<ListItemResolveBehavior>
resolveBehaviors
List of enums that control which parts of the list item are resolved and returned. |
bool?
allowMissingDependencies
Allows creating list items that refer to list items or contents that don't exist in the system. |
TimeSpan?
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
bool?
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemDetail>
List item detail |
Remarks
Updates a single list item.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
UpdateManyAsync(ListItemUpdateManyRequest, TimeSpan?, bool, CancellationToken)
Update - many
Declaration
public Task<ListItemBatchOperationResult> UpdateManyAsync(ListItemUpdateManyRequest listItemUpdateManyRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
ListItemUpdateManyRequest
listItemUpdateManyRequest
List item update many request. |
TimeSpan?
timeout
Timeout to wait for business process to complete. |
bool
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. By default the method waits for the search documents creation. Passing false, the method will return when the main entities have been updated and the creation of the search documents has been enqueued but not yet performed. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ListItemBatchOperationResult> |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkException
Internal server error |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkValidationException
Validation exception |
UpdateManyCoreAsync(ListItemUpdateManyRequest, CancellationToken)
Update multiple list items
Declaration
protected virtual Task<BusinessProcess> UpdateManyCoreAsync(ListItemUpdateManyRequest request, CancellationToken cancellationToken = default)
Parameters
ListItemUpdateManyRequest
request
List item update many request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
Business process |
Remarks
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
WaitForBusinessProcessAndReturnResult(string, TimeSpan?, bool, CancellationToken)
Waits for a business process and returns a ListItemBatchOperationResult.
Declaration
public Task<ListItemBatchOperationResult> WaitForBusinessProcessAndReturnResult(string businessProcessId, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
string
businessProcessId
The business process id. |
TimeSpan?
timeout
The timeout to wait on the business process. |
bool
waitSearchDocCreation
Wait for the creation of the search documents and the rendered display values |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<ListItemBatchOperationResult> |
Implements
WaitForBusinessProcessAndReturnResultWithRequestId(string, TimeSpan?, bool, CancellationToken)
Waits for a business process and returns a ListItemBatchOperationWithRequestIdResult.
Declaration
public Task<ListItemBatchOperationWithRequestIdResult> WaitForBusinessProcessAndReturnResultWithRequestId(string businessProcessId, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default)
Parameters
string
businessProcessId
The business process id. |
TimeSpan?
timeout
The timeout to wait on the business process. |
bool
waitSearchDocCreation
Wait for the creation of the search documents and the rendered display values |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<ListItemBatchOperationWithRequestIdResult> |