RESTAPI:Transfer Status: Unterschied zwischen den Versionen

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 13: Zeile 13:


=== Understanding the status for Transfer Polling after finalizing a transfer session and recipients' download links ===
=== Understanding the status for Transfer Polling after finalizing a transfer session and recipients' download links ===
In the second field '''status''' the state of the transfer can be seen in its subfield '''state'''. As soon as the finalization of the transfer session was triggered, the state of the transfer is set to '''processing'''. By polling this endpoint, the state should change after some time to either '''active''' or '''failed'''. The length of the processing depends on the size of the transfer files and the configured file-processing steps by the Cryptshare Server administrator.
{| class="wikitable"
|+Transfer States
!State name
! Description
|-
|Active
|The transfer is available to be downloaded by the recipients.
|-
|Deleted_by_expiration
|The transfer is not available anymore, due to reaching the expiration date.
|-
|Deleted_by_revocation
|The transfer is not available anymore, due to revocation by the sender.
|-
|Deleted_by_admin
|The transfer is not available anymore, due to deletion by the Cryptshare server administrator via the Transfer Log.
|-
|Deleted_by_security
|The transfer is not available anymore, due to too many failed download attempts by recipients.
|-
|Processing
|The transfer is not available yet. The finalization of this transfer-session was triggered, but is not finished yet.
|-
|Failed
|The transfer is not available, due all files have been removed during finalization.
|-
|Unknown
|Transfers that were sent with Cryptshare version 5.7.0 and older have this state.
|}
The download links for recipients can be found in the respective RecipientStatus objects inside the subfield '''recipients''' of the '''status''' field. If the Cryptshare server should not handle the notification of recipients, these links should be sent to recipients manually, in order to notify them that a transfer is available for them.
All recipients are listed with the following fields:
{| class="wikitable"
|+RecipientStatus
!Field name
!Description
|-
|mail
|The email address of this recipient
|-
|downloadUrl
|The download url for this recipient.
When using a password mode other than "no password", it contains a URL with only the recipient's transfer id.
When password mode "no password" was used, a password is added to the URL. In case a verification token was used for executing this request than the one for finalizing the transfer, the URL will be set to null, since the password cannot be decrypted anymore for Transfer Status purposes.
|-
|id
|The transfer id of this recipient.
|-
|notificationFailed
|If the sending of a notification email failed (when configured in the Transfer Session)
|-
|fileDownloads
|For each transfer file a list of performed downloads.
|}


=== Understanding the status for Error Handling ===
=== Understanding the status for Error Handling ===

Version vom 3. Juli 2023, 09:14 Uhr

Please note that the Cryptshare Server only allows this operation for verified sender addresses or verified email addresses (see Verification).

With this endpoint, a sender of a transfer is able to request information about the transfer's status. This status includes information about its file downloads, the processing status of the transfer itself and possible errors regarding files or sending of email notifications. After triggering the finalization of a transfer session, this endpoint can also be used as a polling endpoint to determine when file processing has ended and if the transfer files are available for download or if problems with files led to the non-availability of the transfer.

Requesting the status of a transfer as its sender

GET https://<your-url>/api/users/<sender email-address>/transfers/<tracking-id>

General transfer information

The endpoints returns an object with two fields. The first field transfer contains mostly the same general transfer information as the Transfer Session State endpoint including the used configuration, the files, the recipients, and the expiration date.

Understanding the status for the transfer's downloads

Understanding the status for the transfer's lifecycle

Understanding the status for Transfer Polling after finalizing a transfer session and recipients' download links

In the second field status the state of the transfer can be seen in its subfield state. As soon as the finalization of the transfer session was triggered, the state of the transfer is set to processing. By polling this endpoint, the state should change after some time to either active or failed. The length of the processing depends on the size of the transfer files and the configured file-processing steps by the Cryptshare Server administrator.

Transfer States
State name Description
Active The transfer is available to be downloaded by the recipients.
Deleted_by_expiration The transfer is not available anymore, due to reaching the expiration date.
Deleted_by_revocation The transfer is not available anymore, due to revocation by the sender.
Deleted_by_admin The transfer is not available anymore, due to deletion by the Cryptshare server administrator via the Transfer Log.
Deleted_by_security The transfer is not available anymore, due to too many failed download attempts by recipients.
Processing The transfer is not available yet. The finalization of this transfer-session was triggered, but is not finished yet.
Failed The transfer is not available, due all files have been removed during finalization.
Unknown Transfers that were sent with Cryptshare version 5.7.0 and older have this state.

The download links for recipients can be found in the respective RecipientStatus objects inside the subfield recipients of the status field. If the Cryptshare server should not handle the notification of recipients, these links should be sent to recipients manually, in order to notify them that a transfer is available for them.

All recipients are listed with the following fields:

RecipientStatus
Field name Description
mail The email address of this recipient
downloadUrl The download url for this recipient.

When using a password mode other than "no password", it contains a URL with only the recipient's transfer id. When password mode "no password" was used, a password is added to the URL. In case a verification token was used for executing this request than the one for finalizing the transfer, the URL will be set to null, since the password cannot be decrypted anymore for Transfer Status purposes.

id The transfer id of this recipient.
notificationFailed If the sending of a notification email failed (when configured in the Transfer Session)
fileDownloads For each transfer file a list of performed downloads.

Understanding the status for Error Handling