Echo is an application for copying files from one location to another. It provides two ways to communicate with the service: RabbitMQ or a REST API.
git clone https://github.com/mskcc/echo/
cd echo
# Create configuration .env file
docker-compose up
Service status
GET /status
Response 200
{
"message": "Server is running"
}
Copy file request
POST /copy
Body: {
"source": "/path/to/source/source_file.txt",
"destination": "/path/to/source/source_file.txt"
}
Response 202
{
"id": "`<request_id>`",
"message": "File copy request accepted with id: `<request_id>`"
"task": "COPY"
}
Delete file request
POST /delete
Body: {
"source": "/path/to/source/source_file.txt"
}
Response 202
{
"id": "`<request_id`",
"message": "Delete file request accepted with id: `<request_id`",
"task": "DELETE"
}
Copy Message
{
"id": "`<request_id>`",
"task": "COPY",
"source": "/path/to/source/source_file.txt",
"destination": "/path/to/source/source_file.txt"
}
Delete Message
{
"id": "`<request_id>`",
"task": "DELETE",
"source": "/path/to/source/source_file.txt",
}
Response Message
{
"id": "`<request_id>`",
"status": `<task_status>`, # success or fail
"message": `<message>`
}
RABBITMQ_URL=amqp://{username}:{password}@{url}:{port}/
API_TOKEN={api_token}
FILE_TASK_QUEUE={task_queue}
CONFIRMATION_QUEUE={confirmation_queue}
NUMBER_OF_WORKERS={number_of_workers}
SERVER_PORT={server_port}