IBM API Hub
IBM Aspera Transfer SDK

By IBM Aspera

The IBM Aspera Transfer SDK allows you to initiate, monitor and control file transfers and streams.


TransferSpec: Definition

The transfer specification (transferSpec) contains all the necessary configuration parameters for your transfer, including authentication, paths, and direction of transfer.

For a complete description of the parameters that are in the transferSpec, see: transferd.html, transderd.md, or transfer.proto that are in the api directory.

There are two methods for getting the transfer specification:

Method 1. v2.

Construct a custom transfer specification by using modular categories of configuration parameters.

These modules contain the parameters for asset locations, security, transport details, and more.

- Example of a transferSpec:

transfer_spec = {
        "session_initiation": {
            "ssh": {
                "ssh_port": 33001,
                "remote_user": "aspera",
                "remote_password": "demoaspera"
            }
        },
        "direction": "recv",
        "remote_host": "demo.asperasoft.com",
        "file_system": {
            "overwrite": "always"
        },
        "assets": {
            "paths": [
                {
                    "source": 'aspera-test-dir-small/10MB.1'
                },
                {
                    "source": 'aspera-test-dir-tiny/200KB.2'
                },
                {
                    "source": 'aspera-test-dir-tiny/200KB.3'
                }
            ]
        }
    }

Method 2. v1.

Obtain the transfer specification by submitting a GET request to your remote Aspera transfer server application with the /ops/transfers endpoint.

- For example:

root@vagrant:~# curl -ki https://ak123:aspera@localhost:9092/ops/transfers/038d583b-6a2a-4dcc-b81c-2199bdd6937b
HTTP/1.1 200 OK
Cache: no-cache
Connection: close
Content-Type: application/json; charset=utf-8
{
    "id": "038d583b-6a2a-4dcc-b81c-2199bdd6937b",
    "status": "completed",
    "start_spec": {
      "source_paths": [
        "/test.txt"
      ],
      "destination_path": "/",
      "tags": {
        "aspera": {
          "xfer_id": "038d583b-6a2a-4dcc-b81c-2199bdd6937b",
          "xfer_retry": 15
        }
      },
      "client_token_user_id": "ASPERA_NODE_ADMIN",
      "direction": "send",
      "fasp_port": 33001,
      "rate_policy": "fair"
    }
  }

Consult the documentation of your remote server application to get more information about requesting the transferSpec.

Legend
Technologies
Products & Services
Company information
Company logoIBM Aspera