> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataraven.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Confirm Rclone Import

> Confirm and execute the rclone.conf import, creating secrets and locations.

**Required Role:** ADMIN or OWNER

This is step 2 of the import workflow. Send the confirmed list of remotes
(with any user modifications like name changes or bucket names) along with
the actual credential values.

For each remote, this endpoint creates:
1. A **Secret** with credentials stored in AWS SSM Parameter Store
2. A **Location** linked to that secret

Remotes are processed independently - if one fails, others still succeed.

Request body:
```json
{
    "remotes": [
        {
            "name": "My S3 Remote",
            "location_type": "s3",
            "auth_method": "s3_access_key",
            "region": "us-east-1",
            "bucket_name": "my-bucket",
            "credentials": {
                "access_key_id": "AKIA...",
                "secret_access_key": "wJal..."
            }
        }
    ]
}
```

Returns created resource pairs and any errors encountered.



## OpenAPI

````yaml POST /v1/teams/{team_id}/rclone-import/confirm
openapi: 3.1.0
info:
  title: Data Raven API
  description: Cloud-to-cloud data transfer platform powered by RClone
  version: 0.5.0
servers: []
security: []
paths:
  /v1/teams/{team_id}/rclone-import/confirm:
    post:
      tags:
        - Rclone Import
      summary: Confirm Rclone Import
      description: >-
        Confirm and execute the rclone.conf import, creating secrets and
        locations.


        **Required Role:** ADMIN or OWNER


        This is step 2 of the import workflow. Send the confirmed list of
        remotes

        (with any user modifications like name changes or bucket names) along
        with

        the actual credential values.


        For each remote, this endpoint creates:

        1. A **Secret** with credentials stored in AWS SSM Parameter Store

        2. A **Location** linked to that secret


        Remotes are processed independently - if one fails, others still
        succeed.


        Request body:

        ```json

        {
            "remotes": [
                {
                    "name": "My S3 Remote",
                    "location_type": "s3",
                    "auth_method": "s3_access_key",
                    "region": "us-east-1",
                    "bucket_name": "my-bucket",
                    "credentials": {
                        "access_key_id": "AKIA...",
                        "secret_access_key": "wJal..."
                    }
                }
            ]
        }

        ```


        Returns created resource pairs and any errors encountered.
      operationId: confirm_rclone_import_v1_teams__team_id__rclone_import_confirm_post
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RcloneImportRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RcloneImportResponse'
        '400':
          description: Invalid import data
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Failed to create resources
      security:
        - HTTPBearer: []
components:
  schemas:
    RcloneImportRequest:
      properties:
        remotes:
          items:
            $ref: '#/components/schemas/RemoteImportItem'
          type: array
          minItems: 1
          title: Remotes
          description: List of remotes to import (from the parse preview, with user edits)
      type: object
      required:
        - remotes
      title: RcloneImportRequest
      description: Request to import parsed rclone remotes (step 2 - confirm).
    RcloneImportResponse:
      properties:
        created:
          items:
            $ref: '#/components/schemas/ImportedResourcePair'
          type: array
          title: Created
          description: Successfully created secret+location pairs
        errors:
          items:
            $ref: '#/components/schemas/ImportErrorDetail'
          type: array
          title: Errors
          description: Remotes that failed to import
      type: object
      title: RcloneImportResponse
      description: Response from importing rclone remotes (step 2 - results).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RemoteImportItem:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Name for the secret and location
        location_type:
          $ref: '#/components/schemas/LocationType'
          description: Provider type
        auth_method:
          $ref: '#/components/schemas/AuthMethod'
          description: Authentication method
        region:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Region
          description: Cloud provider region
        bucket_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Bucket Name
          description: Bucket/container name
        endpoint_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Endpoint Url
          description: Custom endpoint URL
        credentials:
          additionalProperties: true
          type: object
          title: Credentials
          description: Provider-specific credential fields
      type: object
      required:
        - name
        - location_type
        - auth_method
        - bucket_name
        - credentials
      title: RemoteImportItem
      description: A single remote to import, with user-overridable fields.
    ImportedResourcePair:
      properties:
        remote_name:
          type: string
          title: Remote Name
          description: Original remote name
        secret_id:
          type: string
          format: uuid
          title: Secret Id
          description: Created secret ID
        secret_name:
          type: string
          title: Secret Name
          description: Created secret name
        location_id:
          type: string
          format: uuid
          title: Location Id
          description: Created location ID
        location_name:
          type: string
          title: Location Name
          description: Created location name
        location_type:
          $ref: '#/components/schemas/LocationType'
          description: Provider type
      type: object
      required:
        - remote_name
        - secret_id
        - secret_name
        - location_id
        - location_name
        - location_type
      title: ImportedResourcePair
      description: A created secret + location pair from import.
    ImportErrorDetail:
      properties:
        remote_name:
          type: string
          title: Remote Name
        message:
          type: string
          title: Message
      type: object
      required:
        - remote_name
        - message
      title: ImportErrorDetail
      description: Error that occurred during import of a specific remote.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    LocationType:
      type: string
      enum:
        - s3
        - azure_blob
        - gcs
        - r2
        - b2
        - wasabi
        - railway
        - oracle_object_storage_s3
        - s3_compatible
        - tigris
        - digitalocean_spaces
        - hetzner
        - rabata
      title: LocationType
      description: Cloud storage provider types.
    AuthMethod:
      type: string
      enum:
        - s3_access_key
        - r2_access_key
        - wasabi_access_key
        - railway_access_key
        - oracle_object_storage_s3_access_key
        - s3_compatible_access_key
        - tigris_access_key
        - digitalocean_spaces_access_key
        - hetzner_access_key
        - rabata_access_key
        - azure_account_key
        - azure_sas_url
        - gcs_service_account
        - b2_application_key
      title: AuthMethod
      description: |-
        Authentication mechanism identifiers for cloud storage credentials.

        Each provider may support one or more authentication methods.
        Explicit names ensure clarity and make it easy to add new methods.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````