Class ContentClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class ContentClient : ClientBase
Constructors
ContentClient(IBusinessProcessClient, IPictureparkServiceSettings, HttpClient)
Declaration
public ContentClient(IBusinessProcessClient businessProcessClient, IPictureparkServiceSettings settings, HttpClient httpClient)
Parameters
IBusinessProcessClient
businessProcessClient
|
IPictureparkServiceSettings
settings
|
HttpClient
httpClient
|
ContentClient(Contract.IPictureparkServiceSettings, Http.HttpClient)
Declaration
public ContentClient(Contract.IPictureparkServiceSettings configuration, Http.HttpClient httpClient)
Parameters
Picturepark.SDK.V1.Contract.IPictureparkServiceSettings
configuration
|
System.Net.Http.HttpClient
httpClient
|
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Newtonsoft.Json.JsonSerializerSettings
|
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
System.Boolean
|
Methods
AggregateAsync(ContentAggregationRequest, CancellationToken)
Aggregate contents
Declaration
public virtual async Task<ObjectAggregationResult> AggregateAsync(ContentAggregationRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentAggregationRequest
request
Content aggregation request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ObjectAggregationResult>
Object aggregation result |
Remarks
Aggregates content by content fields values as specified in the aggregation request.
AggregateOnChannelAsync(ContentAggregationOnChannelRequest, CancellationToken)
Aggregate contents on channel
Declaration
public virtual async Task<ObjectAggregationResult> AggregateOnChannelAsync(ContentAggregationOnChannelRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentAggregationOnChannelRequest
request
Content aggregation on channel request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ObjectAggregationResult>
Object aggregation result |
Remarks
Aggregates content by content fields values as specified in the aggregators saved on a channel.
BatchUpdateFieldsByFilterAsync(ContentFieldsBatchUpdateFilterRequest, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationResult> BatchUpdateFieldsByFilterAsync(ContentFieldsBatchUpdateFilterRequest updateRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentFieldsBatchUpdateFilterRequest
updateRequest
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationResult>
|
BatchUpdateFieldsByFilterCoreAsync(ContentFieldsBatchUpdateFilterRequest, CancellationToken)
Batch update fields - by filter
Declaration
protected virtual async Task<BusinessProcess> BatchUpdateFieldsByFilterCoreAsync(ContentFieldsBatchUpdateFilterRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentFieldsBatchUpdateFilterRequest
request
Content fields batch update filter request. It contains the changes that need to be applied to the contents and the filter request to identify the contents. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Updates metadata layers' fields of multiple contents. For file-less contents, the content's fields themselves can be updated as well.
A filter must be provided to limit the update to specific contents. The same set of changes is applied to all the contents.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
BatchUpdateFieldsByIdsAsync(ContentFieldsBatchUpdateRequest, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationResult> BatchUpdateFieldsByIdsAsync(ContentFieldsBatchUpdateRequest updateRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentFieldsBatchUpdateRequest
updateRequest
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationResult>
|
BatchUpdateFieldsByIdsCoreAsync(ContentFieldsBatchUpdateRequest, CancellationToken)
Batch update content fields - by IDs
Declaration
protected virtual async Task<BusinessProcess> BatchUpdateFieldsByIdsCoreAsync(ContentFieldsBatchUpdateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentFieldsBatchUpdateRequest
request
Content fields batch update request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Updates metadata layers' fields of multiple contents. For file-less contents, the content's fields themselves can be updated as well.
A list of content IDs must be provided to limit the update to specific contents. The same set of changes is applied to all the contents.
See ShouldUpdateMetadataMany tests.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
CheckContentSchemaChangeAsync(CheckContentSchemaIdChangeRequest, CancellationToken)
Check if given changes of ContentSchemaId are possible without incurring data loss (due to assigned Layers and LayerSchemaIds)
Declaration
public virtual async Task<CheckContentSchemaIdChangeResult> CheckContentSchemaChangeAsync(CheckContentSchemaIdChangeRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
CheckContentSchemaIdChangeRequest
request
Changes to check |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<CheckContentSchemaIdChangeResult>
Result indicating if data loss would occur for given requests |
CheckUpdateFileAsync(String, ContentFileUpdateCheckRequest, CancellationToken)
Check if a file update is possible without incurring data loss
Declaration
public virtual async Task<CheckContentSchemaIdChangeResult> CheckUpdateFileAsync(string id, ContentFileUpdateCheckRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The ID of the content to replace. |
ContentFileUpdateCheckRequest
request
Content file update request |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<CheckContentSchemaIdChangeResult>
Information about data loss, if any |
CreateAndAwaitDownloadLinkAsync(ContentDownloadLinkCreateRequest, Nullable<TimeSpan>, CancellationToken)
Declaration
public async Task<DownloadLink> CreateAndAwaitDownloadLinkAsync(ContentDownloadLinkCreateRequest request, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentDownloadLinkCreateRequest
request
|
System.Nullable<TimeSpan>
timeout
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<DownloadLink>
|
CreateAsync(ContentCreateRequest, IEnumerable<ContentResolveBehavior>, Nullable<Boolean>, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Create content
Declaration
public virtual async Task<ContentDetail> CreateAsync(ContentCreateRequest request, IEnumerable<ContentResolveBehavior> resolveBehaviors = null, bool? allowMissingDependencies = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentCreateRequest
request
Content create request. |
System.Collections.Generic.IEnumerable<ContentResolveBehavior>
resolveBehaviors
List of enums that control which parts of the content are resolved and returned. |
System.Nullable<System.Boolean>
allowMissingDependencies
Allows creating contents that refer to list items or contents that don't exist in the system. |
System.Nullable<System.TimeSpan>
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
System.Nullable<System.Boolean>
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentDetail>
The content details |
Remarks
Create a single file-less content item. To import files, see Transfer.
CreateCommentAsync(String, CommentCreateRequest, Nullable<TimeSpan>, CancellationToken)
Create comment
Declaration
public virtual async Task<Comment> CreateCommentAsync(string id, CommentCreateRequest request, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
CommentCreateRequest
request
Comment creation request. |
System.Nullable<System.TimeSpan>
timeout
Operation timeout. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<Comment>
Created comment |
CreateDownloadLinkAsync(ContentDownloadLinkCreateRequest, CancellationToken)
Create download link
Declaration
public virtual async Task<BusinessProcess> CreateDownloadLinkAsync(ContentDownloadLinkCreateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentDownloadLinkCreateRequest
request
Content download link request |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Download link |
Remarks
Creates a download link for one or more contents. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
CreateManyAsync(ContentCreateManyRequest, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationWithRequestIdResult> CreateManyAsync(ContentCreateManyRequest contentCreateManyRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentCreateManyRequest
contentCreateManyRequest
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationWithRequestIdResult>
|
CreateManyCoreAsync(ContentCreateManyRequest, CancellationToken)
Create multiple contents
Declaration
protected virtual async Task<BusinessProcess> CreateManyCoreAsync(ContentCreateManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentCreateManyRequest
request
Content create many request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Create multiple file-less content items. To import files, see Transfer.
The operation is executed asynchronous and it's not awaited. Call WaitForCompletion to wait for the process to finish.
CreateVersionDownloadLinkAsync(String, Int32, CancellationToken)
Get historic version download link
Declaration
public virtual async Task<string> CreateVersionDownloadLinkAsync(string id, int versionId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
System.Int32
versionId
Version ID. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.String>
Download token to be used with download/{token} endpoint |
DeleteAsync(String, Nullable<Boolean>, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Delete content
Declaration
public virtual async Task DeleteAsync(string id, bool? forceReferenceRemoval = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The ID of the content to delete. |
System.Nullable<System.Boolean>
forceReferenceRemoval
A value indicating whether references to the content should be removed. |
System.Nullable<System.TimeSpan>
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
System.Nullable<System.Boolean>
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
Ok |
Remarks
Deletes a single content. The lifecycle is changed to Inactive. After a customer instance specified time (default 30 days), the content and all files will be hard deleted.
DeleteCommentAsync(String)
Declaration
public async Task DeleteCommentAsync(string id)
Parameters
System.String
id
|
Returns
System.Threading.Tasks.Task
|
DeleteCommentCoreAsync(String, String, Nullable<TimeSpan>, CancellationToken)
Delete comment
Declaration
protected virtual async Task DeleteCommentCoreAsync(string id, string commentId, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
System.String
commentId
Comment ID. |
System.Nullable<System.TimeSpan>
timeout
Operation timeout. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
DeleteManyAsync(ContentDeleteManyRequest, CancellationToken)
Delete multiple contents
Declaration
public virtual async Task<BusinessProcess> DeleteManyAsync(ContentDeleteManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentDeleteManyRequest
request
Delete many request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Deletes multiple contents. The lifecycle is changed to Inactive. After a customer instance specified time (default 30 days), the content and all files will be hard deleted.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
DeleteManyByFilterAsync(ContentDeleteManyFilterRequest, CancellationToken)
Delete multiple contents - by filter
Declaration
public virtual async Task<BusinessProcess> DeleteManyByFilterAsync(ContentDeleteManyFilterRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentDeleteManyFilterRequest
request
Delete many by filter request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Deletes multiple contents. A filter must be provided to limit the deletion to specific contents.
The lifecycle is changed to Inactive. After a customer instance specified time (default 30 days), the content 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.
DeleteVersionAsync(String, Int32, CancellationToken)
Delete historic version
Declaration
public virtual async Task DeleteVersionAsync(string id, int versionId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
System.Int32
versionId
Version ID. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
DownloadAsync(String, String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken)
Download content
Declaration
public virtual async Task<FileResponse> DownloadAsync(string contentId, string outputFormatId, int? width = null, int? height = null, string range = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
contentId
The content ID. |
System.String
outputFormatId
The output format ID. |
System.Nullable<System.Int32>
width
Optional width in pixels to resize image. |
System.Nullable<System.Int32>
height
Optional height in pixels to resize image. |
System.String
range
The range of bytes to download (http range header): bytes={from}-{to} (e.g. bytes=0-100000). |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<FileResponse>
|
Remarks
Download a single content in a specific output format. To resize images on download specify target width & height. To download only a portion of the file, specify the range parameter.
To use conversion presets on download, e.g. to crop or rotate, please see EditOutput.
DownloadFilesAsync(ContentSearchResult, String, Boolean, Int32, String, String, Boolean, Action<ContentDetail>, Action<Exception>, CancellationToken)
Declaration
public async Task DownloadFilesAsync(ContentSearchResult contents, string exportDirectory, bool overwriteIfExists, int concurrentDownloads = 4, string outputFormat = "Original", string outputExtension = "", bool contentIdAsFilename = false, Action<ContentDetail> successDelegate = null, Action<Exception> errorDelegate = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentSearchResult
contents
|
System.String
exportDirectory
|
System.Boolean
overwriteIfExists
|
System.Int32
concurrentDownloads
|
System.String
outputFormat
|
System.String
outputExtension
|
System.Boolean
contentIdAsFilename
|
Action<ContentDetail>
successDelegate
|
Action<Exception>
errorDelegate
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task
|
DownloadThumbnailAsync(String, ThumbnailSize, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Download thumbnail
Declaration
public virtual async Task<FileResponse> DownloadThumbnailAsync(string id, ThumbnailSize size, int? width = null, int? height = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The content ID. |
ThumbnailSize
size
Thumbnail size. Either small, medium or large. |
System.Nullable<System.Int32>
width
Optional width in pixels to resize image. |
System.Nullable<System.Int32>
height
Optional height in pixels to resize image. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<FileResponse>
|
Remarks
Provides a lightweight endpoint to download content thumbnails.
EditOutputAsync(String, String, String, CancellationToken)
Edit output
Declaration
public virtual async Task<FileResponse> EditOutputAsync(string contentId, string outputFormatId, string conversionPreset, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
contentId
The content ID. |
System.String
outputFormatId
The output format ID. |
System.String
conversionPreset
The conversion preset. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<FileResponse>
|
Remarks
Edits a single content in a specific output format.
GetAsync(String, IEnumerable<ContentResolveBehavior>, CancellationToken)
Get content
Declaration
public virtual async Task<ContentDetail> GetAsync(string id, IEnumerable<ContentResolveBehavior> resolveBehaviors = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The content ID. |
System.Collections.Generic.IEnumerable<ContentResolveBehavior>
resolveBehaviors
List of enums that control which parts of the content are resolved and returned. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentDetail>
Content detail |
Remarks
Gets the content detail by ID.
GetCommentAsync(String)
Declaration
public async Task<Comment> GetCommentAsync(string id)
Parameters
System.String
id
|
Returns
System.Threading.Tasks.Task<Comment>
|
GetCommentCoreAsync(String, String, CancellationToken)
Get comment
Declaration
protected virtual async Task<Comment> GetCommentCoreAsync(string id, string commentId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
System.String
commentId
Comment ID. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<Comment>
Comment if found |
GetDownloadLinkAsync(String, CancellationToken)
Resolve download token to Url
Declaration
public virtual async Task<DownloadLink> GetDownloadLinkAsync(string token, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Token |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<DownloadLink>
Download link information |
GetManyAsync(IEnumerable<String>, IEnumerable<ContentResolveBehavior>, CancellationToken)
Get multiple contents
Declaration
public virtual async Task<ICollection<ContentDetail>> GetManyAsync(IEnumerable<string> ids, IEnumerable<ContentResolveBehavior> resolveBehaviors = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Collections.Generic.IEnumerable<System.String>
ids
List of content IDs |
System.Collections.Generic.IEnumerable<ContentResolveBehavior>
resolveBehaviors
List of enums that control which parts of the content are resolved and returned. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<ContentDetail>>
List of Content detail |
Remarks
Gets multiple content details by IDs.
Can fetch 100 contents at most.
GetOutputsAsync(String, CancellationToken)
Get outputs
Declaration
public virtual async Task<ICollection<OutputResolveResult>> GetOutputsAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of content. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<OutputResolveResult>>
Array of Result of output resolution. |
Remarks
Retrieves all outputs available for content, also dynamic rendered outputs are returned, if requested.
GetOutputsManyAsync(OutputResolveManyRequest, CancellationToken)
Get outputs
Declaration
public virtual async Task<ICollection<OutputResolveResult>> GetOutputsManyAsync(OutputResolveManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
OutputResolveManyRequest
request
Output resolve many request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<OutputResolveResult>>
Array of Result of output resolution. |
Remarks
Retrieves all outputs available for contents, also dynamic rendered outputs are returned, if requested.
A maximum of 1000 content ids can be specified.
GetReferencesAsync(String, ContentReferencesRequest, CancellationToken)
Get content references
Declaration
public virtual async Task<ContentReferencesResult> GetReferencesAsync(string id, ContentReferencesRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The content ID whose references to retrieve. |
ContentReferencesRequest
request
Content references request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentReferencesResult>
ContentReferencesResult |
Remarks
Gets the references (list items, contents, shares) to a single content.
GetReferencesManyAsync(ContentManyReferencesRequest, CancellationToken)
Get many content references
Declaration
public virtual async Task<ContentReferencesResult> GetReferencesManyAsync(ContentManyReferencesRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentManyReferencesRequest
request
Content many references request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentReferencesResult>
Content references result |
Remarks
Gets references (list items, contents, shares) to content documents defined by IDs.
GetVersionDownloadLinkAsync(String, Int32, CancellationToken)
Declaration
public async Task<DownloadLink> GetVersionDownloadLinkAsync(string contentId, int version, CancellationToken cancellationToken)
Parameters
System.String
contentId
|
System.Int32
version
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<DownloadLink>
|
GetVersionsAsync(String, HistoricVersionSearchRequest, CancellationToken)
Get historic versions
Declaration
public virtual async Task<HistoricVersionSearchResult> GetVersionsAsync(string id, HistoricVersionSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
HistoricVersionSearchRequest
request
Request allowing for paging |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<HistoricVersionSearchResult>
Historic versions |
ReadObjectResponseAsync<T>(Http.HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<ContentClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(Http.HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
System.Net.Http.HttpResponseMessage
response
|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>>
headers
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentClient.ObjectResponseResult<T>>
|
Type Parameters
T
|
RepairContentsBatchAsync(ContentRepairBatchRequest, CancellationToken)
Repair contents
Declaration
public virtual async Task<BusinessProcess> RepairContentsBatchAsync(ContentRepairBatchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentRepairBatchRequest
request
Content repair request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
A repair operation re-extracts Metadata from the originally uploaded file, applies it and triggers follow-up actions where needed (e.g. Rendering, XmpWriteback)
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
RepairContentsByFilterAsync(ContentRepairByFilterRequest, CancellationToken)
Repair contents by filter
Declaration
public virtual async Task<BusinessProcess> RepairContentsByFilterAsync(ContentRepairByFilterRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentRepairByFilterRequest
request
Content repair request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
A repair operation re-extracts Metadata from the originally uploaded file, applies it and triggers follow-up actions where needed (e.g. Rendering, XmpWriteback)
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
RestoreAsync(String, Nullable<Boolean>, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Restore content
Declaration
public virtual async Task RestoreAsync(string id, bool? allowMissingDependencies = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The content ID. |
System.Nullable<System.Boolean>
allowMissingDependencies
Allows restoring contents that refer to list items or contents that don't exist in the system. |
System.Nullable<System.TimeSpan>
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
System.Nullable<System.Boolean>
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
Ok |
Remarks
Restores a previously deleted content.
RestoreManyAsync(ContentRestoreManyRequest, CancellationToken)
Restore multiple contents
Declaration
public virtual async Task<BusinessProcess> RestoreManyAsync(ContentRestoreManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentRestoreManyRequest
request
Content restore many request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Restores previously deleted contents.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
SearchAsync(ContentSearchRequest, CancellationToken)
Search contents
Declaration
public virtual async Task<ContentSearchResult> SearchAsync(ContentSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentSearchRequest
request
Content search request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentSearchResult>
Result for content search operation |
Remarks
Searches contents as specified in the search request.
SearchCommentsAsync(String, CommentSearchRequest, CancellationToken)
Search comments
Declaration
public virtual async Task<CommentSearchResult> SearchCommentsAsync(string id, CommentSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
CommentSearchRequest
request
Search request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<CommentSearchResult>
List of found comments |
SetDisplayContentAsync(String, SetDisplayContentRequest, IEnumerable<ContentResolveBehavior>, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Sets/unsets a DisplayContent for a content with an id given in the request
Declaration
public virtual async Task<ContentDetail> SetDisplayContentAsync(string id, SetDisplayContentRequest setDisplayContentRequest, IEnumerable<ContentResolveBehavior> resolveBehaviors = null, TimeSpan? timeout = null, bool? waitForContinuation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Id of the content |
SetDisplayContentRequest
setDisplayContentRequest
Request with DisplayContentId |
System.Collections.Generic.IEnumerable<ContentResolveBehavior>
resolveBehaviors
List of enums that control which parts of the content are resolved and returned. |
System.Nullable<System.TimeSpan>
timeout
Timeout for the operation |
System.Nullable<System.Boolean>
waitForContinuation
Wait for the creation of the search doc update. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentDetail>
Result of the operation |
SetManyDisplayContentsAsync(SetDisplayContentsManyRequest, CancellationToken)
Process many requests to set/unset display contents for given contents
Declaration
public virtual async Task<BusinessProcess> SetManyDisplayContentsAsync(SetDisplayContentsManyRequest setDisplayContentsManyRequest, CancellationToken cancellationToken = default(CancellationToken))
Parameters
SetDisplayContentsManyRequest
setDisplayContentsManyRequest
Set many display contents request |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
TransferOwnershipAsync(String, ContentOwnershipTransferRequest, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Transfer content ownership
Declaration
public virtual async Task TransferOwnershipAsync(string id, ContentOwnershipTransferRequest request, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The content ID. |
ContentOwnershipTransferRequest
request
Content ownership transfer request. |
System.Nullable<System.TimeSpan>
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
System.Nullable<System.Boolean>
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
Ok |
Remarks
Transfers ownership of a content to another user. The target user must have the ManageContent UserRight.
TransferOwnershipManyAsync(ContentOwnershipTransferManyRequest, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationResult> TransferOwnershipManyAsync(ContentOwnershipTransferManyRequest contentOwnershipTransferManyRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentOwnershipTransferManyRequest
contentOwnershipTransferManyRequest
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationResult>
|
TransferOwnershipManyCoreAsync(ContentOwnershipTransferManyRequest, CancellationToken)
Transfer multiple contents ownerships
Declaration
protected virtual async Task<BusinessProcess> TransferOwnershipManyCoreAsync(ContentOwnershipTransferManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentOwnershipTransferManyRequest
request
Content ownership transfer many request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Transfers ownerships of multiple contents to specified users. The target users must have the ManageContent UserRight.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
UpdateCommentAsync(String, CommentEditable)
Declaration
public async Task<Comment> UpdateCommentAsync(string id, CommentEditable request)
Parameters
System.String
id
|
CommentEditable
request
|
Returns
System.Threading.Tasks.Task<Comment>
|
UpdateCommentCoreAsync(String, String, CommentEditable, Nullable<TimeSpan>, CancellationToken)
Update comment
Declaration
protected virtual async Task<Comment> UpdateCommentCoreAsync(string id, string commentId, CommentEditable request, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Content ID. |
System.String
commentId
Comment ID. |
CommentEditable
request
Comment update. |
System.Nullable<System.TimeSpan>
timeout
Operation timeout. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<Comment>
Updated comment |
UpdateFileAsync(String, ContentFileUpdateRequest, Nullable<Boolean>, CancellationToken)
Update content file
Declaration
public virtual async Task<BusinessProcess> UpdateFileAsync(string id, ContentFileUpdateRequest request, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The ID of the content to replace. |
ContentFileUpdateRequest
request
Content file update request |
System.Nullable<System.Boolean>
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Updates binary file of existing content. The file must already be uploaded before calling this endpoint. See Transfer.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
UpdateMetadataAsync(String, ContentMetadataUpdateRequest, IEnumerable<ContentResolveBehavior>, Nullable<Boolean>, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Update content metadata
Declaration
public virtual async Task<ContentDetail> UpdateMetadataAsync(string id, ContentMetadataUpdateRequest request, IEnumerable<ContentResolveBehavior> resolveBehaviors = null, bool? allowMissingDependencies = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The content ID. |
ContentMetadataUpdateRequest
request
Content metadata update request. |
System.Collections.Generic.IEnumerable<ContentResolveBehavior>
resolveBehaviors
List of enums that control which parts of the content are resolved and returned. |
System.Nullable<System.Boolean>
allowMissingDependencies
Allows storing references to list items or contents that don't exist in the system. |
System.Nullable<System.TimeSpan>
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
System.Nullable<System.Boolean>
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentDetail>
Content detail |
Remarks
Updates metadata layers of a specified content. For file-less contents, the content itself can be updated as well.
The update is flexible enough to allow the update of only the fields that are specified in the request (leaving untouched the other existing ones) or to allow
the entire replacement of all the values of a schema or even of all the schemas.
See ShouldUpdateMetadata tests.
UpdateMetadataManyAsync(ContentMetadataUpdateManyRequest, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationResult> UpdateMetadataManyAsync(ContentMetadataUpdateManyRequest updateRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentMetadataUpdateManyRequest
updateRequest
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationResult>
|
UpdateMetadataManyCoreAsync(ContentMetadataUpdateManyRequest, CancellationToken)
Update multiple content metadata
Declaration
protected virtual async Task<BusinessProcess> UpdateMetadataManyCoreAsync(ContentMetadataUpdateManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentMetadataUpdateManyRequest
request
Content metadata update many request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Updates metadata layers of multiple contents. For file-less contents, the contents itself can be updated a swell.
See ShouldUpdateMetadata tests.
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
UpdatePermissionsAsync(String, ContentPermissionsUpdateRequest, IEnumerable<ContentResolveBehavior>, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Update content permissions
Declaration
public virtual async Task<ContentDetail> UpdatePermissionsAsync(string id, ContentPermissionsUpdateRequest request, IEnumerable<ContentResolveBehavior> resolveBehaviors = null, TimeSpan? timeout = null, bool? waitSearchDocCreation = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The content ID. |
ContentPermissionsUpdateRequest
request
Content permissions update request. |
System.Collections.Generic.IEnumerable<ContentResolveBehavior>
resolveBehaviors
List of enums that control which parts of the content are resolved and returned. |
System.Nullable<System.TimeSpan>
timeout
Maximum time to wait for the operation to complete. If timeout is exceeded, the operation is not aborted but continues anyhow.
|
System.Nullable<System.Boolean>
waitSearchDocCreation
Wait for the creation of the search document and the rendered display values.
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ContentDetail>
Content detail |
Remarks
Updates the content permission sets of a single content. To get a list of available content permission sets, see Permissions
UpdatePermissionsManyAsync(ContentPermissionsUpdateManyRequest, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationResult> UpdatePermissionsManyAsync(ContentPermissionsUpdateManyRequest updateManyRequest, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentPermissionsUpdateManyRequest
updateManyRequest
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationResult>
|
UpdatePermissionsManyCoreAsync(ContentPermissionsUpdateManyRequest, CancellationToken)
Update multiple contents permissions
Declaration
protected virtual async Task<BusinessProcess> UpdatePermissionsManyCoreAsync(ContentPermissionsUpdateManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ContentPermissionsUpdateManyRequest
request
Content permissions update many request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Updates the content permission sets of multiple contents. To get a list of available content permission sets, see Permissions
The operation is executed asynchronous and is not awaited. Call WaitForCompletion to wait for the process to finish.
WaitForBusinessProcessAndReturnResult(String, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationResult> WaitForBusinessProcessAndReturnResult(string businessProcessId, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
businessProcessId
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationResult>
|
WaitForBusinessProcessAndReturnResultWithRequestId(String, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<ContentBatchOperationWithRequestIdResult> WaitForBusinessProcessAndReturnResultWithRequestId(string businessProcessId, TimeSpan? timeout = null, bool waitSearchDocCreation = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
businessProcessId
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitSearchDocCreation
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ContentBatchOperationWithRequestIdResult>
|