---
title: "Transfer files from a data release component to an external Globus collection."
method: POST
path: "/datacatalog/api/component/{id}/files/globus-transfer-out"
tags: ["Data Release"]
---

# Transfer files from a data release component to an external Globus collection.

`POST /datacatalog/api/component/{id}/files/globus-transfer-out`

## Request

- Base URL: `https://data.usgs.gov` (the document declares no server; this is the origin it was published from)
- URL: `https://data.usgs.gov/datacatalog/api/component/{id}/files/globus-transfer-out`
- Auth: OAuth 2
  - Authorization code: `https://auth.globus.org/v2/oauth2/authorize?scope=openid`
  - Token URL: `https://data.usgs.gov/datacatalog/api/auth/login`

Transfer files out from a data release component to an external Globus
collection.

This endpoint takes a JSON payload consisting of a `destination_collection_id`
string and either a `files_to_transfer` list (paths relative to the component
directory) or a `transfer_all` flag. When `transfer_all` is true, the entire
component directory is transferred. Set `recursive` to true to transfer
directory entries listed in `files_to_transfer`.

The transfer mirrors the component's directory structure in the destination
collection, i.e. files land under a `<release_id>/<component_name>/` directory.
Files are placed relative to the destination collection's default directory;
supply `destination_path` to target a specific directory the destination
endpoint permits writes to (files then land under
`<destination_path>/<release_id>/<component_name>/`).

A file path cannot contain any of the following characters: < > : " / \ | ? *.

.. code-block::

    {
        "destination_collection_id": "<Globus collection ID>",
        "destination_path": "globus-connect-personal",
        "files_to_transfer": ["example.xml", "data/subset.csv"],
        "recursive": false
    }

Alternatively, transfer everything:

.. code-block::

    {
        "destination_collection_id": "<Globus collection ID>",
        "transfer_all": true
    }

The response `data` includes a `task_id` for the submitted transfer. Poll
the transfer's status with `GET /data-release/files/task/{task_id}`.

:param id: The ID of the data release component.
:param params: The JSON payload containing the `destination_collection_id`
    and either `files_to_transfer` or `transfer_all`.

## Path parameters

- `id` string, required

## Request body

- HorizonTransferOutParams
  - `destination_collection_id` string, required
  - `destination_path` string: Directory within the destination collection to transfer files into, relative to that collection's default directory. Files are mirrored under `<destination_path>/<release_id>/...`. Leave empty to use the collection's default directory. Set this to a directory the destination endpoint permits writes to (for Globus Connect Personal, one of its configured accessible directories).
  - `files_to_transfer` string[], nullable: Paths, relative to the data release or component directory, of the files or directories to transfer out to the destination collection. Directory entries require `recursive` to be true. Mutually exclusive with `transfer_all`.
  - `transfer_all` boolean: When true, transfer the entire data release directory (including all component files) or the entire component directory. Mutually exclusive with `files_to_transfer`.
  - `recursive` boolean: When true, entries in `files_to_transfer` that refer to directories are transferred recursively.

## Response `200`

Successful Response

- unknown

## Other responses

- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/usgs/apis/usgs-science-data-catalog-api-documentation.md) - [All operations](https://skmtc.dev/usgs/apis/usgs-science-data-catalog-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/usgs/apis/usgs-science-data-catalog-api-documentation/revisions/f5f6a07ba13f?raw)
