Interface ITransferClient
Namespace: System.Dynamic.ExpandoObject
Syntax
[GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
public interface ITransferClient
Methods
CancelAsync(string, CancellationToken)
Cancel transfer
Declaration
[Obsolete]
Task CancelAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
ID of transfer. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
OK |
Remarks
Requests cancellation of transfer.
Note: Transfers can only be cancelled when state is UploadInProgress.
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 |
CancelTransferAsync(string, CancellationToken)
Cancel transfer
Declaration
[Obsolete("This method will be removed in future versions. Please use CancelAsync method instead.")]
Task CancelTransferAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
ID of transfer. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
OK |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
CreateAndWaitForCompletionAsync(CreateTransferRequest, TimeSpan?, CancellationToken)
Creates a transfer and waits for its completion.
Declaration
[Obsolete]
Task<CreateTransferResult> CreateAndWaitForCompletionAsync(CreateTransferRequest request, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
CreateTransferRequest
request
The create request. |
TimeSpan?
timeout
The timeout to wait for completion. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<CreateTransferResult>
The transfer. |
CreateAndWaitForCompletionAsync(string, IEnumerable<FileLocations>, TimeSpan?, CancellationToken, UploadOptions)
Creates a transfer and waits for its completion.
Declaration
[Obsolete]
Task<CreateTransferResult> CreateAndWaitForCompletionAsync(string transferName, IEnumerable<FileLocations> files, TimeSpan? timeout = null, CancellationToken cancellationToken = default, UploadOptions uploadOptions = null)
Parameters
string
transferName
The name of the transfer. |
IEnumerable<FileLocations>
files
The file names of the transfer. |
TimeSpan?
timeout
The timeout to wait for completion. |
CancellationToken
cancellationToken
The cancellation token. |
UploadOptions
uploadOptions
The upload options. |
Returns
Task<CreateTransferResult>
The transfer. |
CreateAsync(CreateTransferRequest, CancellationToken)
Create transfer
Declaration
[Obsolete]
Task<Transfer> CreateAsync(CreateTransferRequest request, CancellationToken cancellationToken = default)
Parameters
CreateTransferRequest
request
The create transfer request |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Transfer>
Transfer |
Remarks
For transfers of type FileUpload or FileUploadAutoImport, after creating the transfer, wait for the returned BusinessProcess to hit the "Created" state before attempting to upload files.
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 |
MaximumTransferSizeException
A server side error occurred. |
DeleteAsync(string, CancellationToken)
Delete transfer
Declaration
[Obsolete]
Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
ID of transfer. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
OK |
Remarks
A transfer cannot be deleted if it's currently in the UploadInProgress or ImportInProgress state.
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 |
DeleteFilesAsync(FileTransferDeleteRequest, CancellationToken)
Delete files
Declaration
[Obsolete]
Task DeleteFilesAsync(FileTransferDeleteRequest request, CancellationToken cancellationToken = default)
Parameters
FileTransferDeleteRequest
request
The file transfer delete request |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task |
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 |
GetAsync(string, CancellationToken)
Get transfer details
Declaration
[Obsolete]
Task<TransferDetail> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
ID of transfer. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<TransferDetail>
TransferDetail |
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 |
GetBlacklistAsync(CancellationToken)
Get blacklist
Declaration
[Obsolete]
Task<Blacklist> GetBlacklistAsync(CancellationToken cancellationToken = default)
Parameters
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Blacklist>
Blacklist |
Remarks
The blacklist is a list of patterns that a filename must not match.
A filename matching an item on the blacklist will be skipped during uploading.
The client is responsibly for matching uploaded files against the blacklist
when creating the transfer. Otherwise, during transfer creation some items might get skipped
causing issues when uploading later on.
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 |
GetFileAsync(string, CancellationToken)
Get file
Declaration
[Obsolete]
Task<FileTransferDetail> GetFileAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
ID of file transfer. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<FileTransferDetail>
FileTransferDetail |
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 |
ImportAndWaitForCompletionAsync(Transfer, ImportTransferRequest, TimeSpan?, CancellationToken)
Transfers the uploaded files and waits for its completions.
Declaration
[Obsolete]
Task ImportAndWaitForCompletionAsync(Transfer transfer, ImportTransferRequest createRequest, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
Transfer
transfer
The transfer. |
ImportTransferRequest
createRequest
The create request. |
TimeSpan?
timeout
The timeout to wait for completion. |
CancellationToken
cancellationToken
The cancellcation token. |
Returns
Task
The task. |
ImportAsync(string, ImportTransferRequest, CancellationToken)
Import transfer
Declaration
[Obsolete]
Task<Transfer> ImportAsync(string id, ImportTransferRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
ID of transfer. |
ImportTransferRequest
request
The ImportTransfer request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Transfer>
Transfer |
Remarks
This triggers the import of a Transfer, creating Contents. All items in the Transfer will be enqueued for rendering.
Wait for completion on the Business process ID that is returned to wait for import completion.
Note: Before attempting to import a Transfer, the transfer has to be in the TransferReady state.
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 |
ImportTransferAsync(string, ImportTransferRequest, CancellationToken)
Import transfer
Declaration
[Obsolete("This method will be removed in future versions. Please use ImportAsync method instead.")]
Task<Transfer> ImportTransferAsync(string id, ImportTransferRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
ID of transfer. |
ImportTransferRequest
request
The ImportTransfer request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Transfer>
Transfer |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
PartialImportAsync(string, ImportTransferPartialRequest, CancellationToken)
Import transfer partially
Declaration
[Obsolete]
Task<Transfer> PartialImportAsync(string id, ImportTransferPartialRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
ID of transfer. |
ImportTransferPartialRequest
request
The ImportTransferPartial request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Transfer>
Transfer |
Remarks
This triggers the import of selected items in a Transfer, creating contents. All imported items will be enqueued for rendering.
Wait for completion on the Business process ID that is returned to wait for import completion.
Transfer will transition to state ImportDone if no files of the transfer remain for import.
Transfer will transition to state TransferReady if any files of the transfer remain for import.
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(TransferSearchRequest, CancellationToken)
Search
Declaration
[Obsolete]
Task<TransferSearchResult> SearchAsync(TransferSearchRequest request, CancellationToken cancellationToken = default)
Parameters
TransferSearchRequest
request
The transfer search request |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<TransferSearchResult>
TransferSearchResult |
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 |
SearchFilesAsync(FileTransferSearchRequest, CancellationToken)
Search for files
Declaration
[Obsolete]
Task<FileTransferSearchResult> SearchFilesAsync(FileTransferSearchRequest request, CancellationToken cancellationToken = default)
Parameters
FileTransferSearchRequest
request
The file transfer search request |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<FileTransferSearchResult>
FileTransferSearchResult |
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 |
SearchFilesByTransferIdAsync(string, int?)
Searches files of a given transfer ID.
Declaration
[Obsolete]
Task<IReadOnlyCollection<FileTransfer>> SearchFilesByTransferIdAsync(string transferId, int? limit = null)
Parameters
string
transferId
The transfer ID. |
int?
limit
The maximum number of search results. |
Returns
Task<IReadOnlyCollection<FileTransfer>>
The result. |
UploadFileAsync(FileParameter, long, long, long, long, string, string, CancellationToken)
Upload file
Declaration
[Obsolete("This overload is going to be removed in future versions. Please use the (long, long, long, long, string, string, Stream, CancellationToken) one")]
Task UploadFileAsync(FileParameter formFile, long chunkNumber, long currentChunkSize, long totalSize, long totalChunks, string transferId, string requestId, CancellationToken cancellationToken = default)
Parameters
FileParameter
formFile
Information about chunk. |
long
chunkNumber
Information about chunk. |
long
currentChunkSize
Information about chunk. |
long
totalSize
Information about chunk. |
long
totalChunks
Information about chunk. |
string
transferId
ID of transfer. |
string
requestId
Identifier of file. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
OK |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
UploadFileAsync(long, long, long, long, string, string, FileParameter, CancellationToken)
Upload file
Declaration
[Obsolete("This overload is going to be removed in future versions. Please use the (long, long, long, long, string, string, Stream, CancellationToken) one")]
Task UploadFileAsync(long chunkNumber, long currentChunkSize, long totalSize, long totalChunks, string transferId, string requestId, FileParameter formFile = null, CancellationToken cancellationToken = default)
Parameters
long
chunkNumber
Information about chunk. |
long
currentChunkSize
Information about chunk. |
long
totalSize
Information about chunk. |
long
totalChunks
Information about chunk. |
string
transferId
ID of transfer. |
string
requestId
Identifier of file. |
FileParameter
formFile
Information about chunk. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
OK |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
UploadFileAsync(long, long, long, long, string, string, Stream, CancellationToken)
Upload file
Declaration
[Obsolete]
Task UploadFileAsync(long chunkNumber, long currentChunkSize, long totalSize, long totalChunks, string transferId, string requestId, Stream body = null, CancellationToken cancellationToken = default)
Parameters
long
chunkNumber
Information about chunk. |
long
currentChunkSize
Information about chunk. |
long
totalSize
Information about chunk. |
long
totalChunks
Information about chunk. |
string
transferId
ID of transfer. |
string
requestId
Identifier of file. |
Stream
body
Body |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
OK |
Remarks
Uploads the specified chunk data.
Use Content-Type: application/octet-stream
for uploading chunked data.
The chunk data should be contained in the body of your request.
To upload a file, it is recommended to use a single chunk that has the same size as the file. This is only possible if you're using
the octet-stream upload method. If you choose to use formdata upload or multiple chunks per file, the file must be chunked into
1MB-100MB chunks. The last chunk may be smaller than 1MB.
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 |
UploadFilesAsync(Transfer, IEnumerable<FileLocations>, UploadOptions, TimeSpan?, CancellationToken)
Uploads multiple files from the filesystem.
Declaration
[Obsolete]
Task UploadFilesAsync(Transfer transfer, IEnumerable<FileLocations> files, UploadOptions uploadOptions, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
Transfer
transfer
The existing transfer object. |
IEnumerable<FileLocations>
files
The file paths on the filesystem with optional overrides. |
UploadOptions
uploadOptions
The file upload options. |
TimeSpan?
timeout
The timeout to wait for completion. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task
The created transfer object. |
UploadFilesAsync(string, IEnumerable<FileLocations>, UploadOptions, TimeSpan?, CancellationToken)
Uploads multiple files from the filesystem.
Declaration
[Obsolete]
Task<CreateTransferResult> UploadFilesAsync(string transferName, IEnumerable<FileLocations> files, UploadOptions uploadOptions, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
string
transferName
The name of the created transfer. |
IEnumerable<FileLocations>
files
The file paths on the filesystem with optional overrides. |
UploadOptions
uploadOptions
The file upload options. |
TimeSpan?
timeout
The timeout to wait for completion. |
CancellationToken
cancellationToken
The cancellation token. |
Returns
Task<CreateTransferResult>
The created transfer object. |