4. Complete File Transfer

This API completes a file upload session where the file can be uploaded in chunks.

Description

End a new file upload

URL Path

/transfer_file

Method

POST

Permissions Restrictions

The API is limited to the user roles listed above (i.e. CO, Administrator, User), but assuming that a valid set of parameters is provided, including a group_id, only the transfer owner will be able alter the transfer.

Example:

The user test1 initiates a group transfer (i.e. calls /transfer successfully) and it receives a transfer group ID - group_id.

The user test2 tries to append a file to transfer with ID group_id. A 403 - Forbidden error will be returned stating that the user that has made the request is not authorized to alter the transfer.

The user test1 tries to append a file to the transfer - operation successful.

The user test1 completes the transfer by calling POST /transfer - operation successful.

Transfer with ID group_id will be accessible to the user until its expiration date.

HTTP header parameters

Authorization

The API key of the caller

REQUIRED

This header should have the following format:
Bearer [API key obtained from the authenticate API]
Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD

group_id

Transfer group id

REQUIRED

A transfer group id obtained from the Initialize Group Transfer call.

file_id

File id

REQUIRED

A file id obtained from the Initialize File Transfer call.

Request Codes

200

OK

OK success code

400

Bad Request

Invalid HTTP request

401

Invalid parameter

An invalid header parameter was specified.

403

Forbidden

Authentication credentials incorrect

500

Internal Server Error

Server is temporarily unavailable

Response

Example of a successful request:

{  
"result": "success"
}

Descriptions of response:

result

Result of operation