> ## 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.

# Verify Location

> Test connection to cloud storage location.

**Required Role:** OPERATOR or higher (useful for troubleshooting)

This endpoint:
1. Retrieves credentials from Vault
2. Creates appropriate connector for the provider
3. Tests connection to the bucket/container
4. Verifies permissions (read, write, list)
5. Checks region configuration

**Success response (200 OK):**
```json
{
    "verified": true,
    "verified_at": "2025-10-22T12:00:00Z",
    "details": {
        "bucket_exists": true,
        "permissions": {
            "list": true,
            "read": true,
            "write": true,
            "delete": false
        },
        "region_match": true
    }
}
```

**Client error (400 Bad Request):**
Returned for user/configuration errors (invalid credentials, bucket not found, access denied)
```json
{
    "verified": false,
    "error": "Access denied: invalid credentials",
    "details": {
        "error_code": "AUTHENTICATION_FAILED"
    }
}
```

**External vault resolution error (400 Bad Request):**
Returned when external vault (1Password, Doppler, Infisical) secret resolution fails
```json
{
    "verified": false,
    "error": "Failed to resolve secrets: service_account_json: FIELD_NOT_FOUND",
    "details": {
        "error_code": "VAULT_FIELD_NOT_FOUND",
        "message": "Failed to resolve secrets: ...",
        "field_name": "service_account_json",
        "reference": "op://vault/item/field",
        "vault_type": "onepassword"
    }
}
```
Error codes: VAULT_FIELD_NOT_FOUND, VAULT_ITEM_NOT_FOUND, VAULT_ACCESS_DENIED,
VAULT_INVALID_REFERENCE, VAULT_CONNECTION_ERROR, VAULT_SDK_NOT_INSTALLED, VAULT_UNKNOWN

**Server error (500 Internal Server Error):**
Returned for unexpected errors (bugs, internal issues)
```json
{
    "verified": false,
    "error": "Unknown error: ...",
    "details": {
        "error_code": "UNKNOWN_ERROR"
    }
}
```

**Service unavailable (503 Service Unavailable):**
Returned when external storage service is unreachable
```json
{
    "verified": false,
    "error": "Service request failed",
    "details": {
        "error_code": "SERVICE_REQUEST_ERROR"
    }
}
```



## OpenAPI

````yaml POST /v1/teams/{team_id}/locations/{location_id}/verify
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}/locations/{location_id}/verify:
    post:
      tags:
        - Locations
      summary: Verify Location
      description: >-
        Test connection to cloud storage location.


        **Required Role:** OPERATOR or higher (useful for troubleshooting)


        This endpoint runs a live rclone probe against the bucket, persists the

        result to the verification history, and returns that newly-written row.

        The response body is identical in shape to the records returned from

        ``GET /verifications``, so clients can use a single render path.


        **Success response (200 OK):**

        ```json

        {
            "id": "...",
            "location_id": "...",
            "verified": true,
            "bucket_exists": true,
            "can_list": true,
            "can_read": true,
            "can_write": true,
            "can_delete": false,
            "region": "us-east-1",
            "error_code": null,
            "error_message": null,
            "vault_field_name": null,
            "vault_reference": null,
            "vault_type": null,
            "created_at": "2026-04-11T02:00:00Z"
        }

        ```


        Three-state permissions: ``true`` = probe succeeded, ``false`` = probe

        failed, ``null`` = probe not run (e.g. empty bucket, delete skipped

        because write failed).


        **Client error (400 Bad Request):** Returned for user/configuration

        errors (invalid credentials, bucket not found, access denied). The body

        shape is the same as the success response, with ``verified=false`` and

        ``error_code`` / ``error_message`` populated.


        **External vault resolution error (400 Bad Request):** When 1Password /

        Doppler / Infisical secret resolution fails, ``error_code`` is one of

        ``VAULT_FIELD_NOT_FOUND``, ``VAULT_ITEM_NOT_FOUND``,
        ``VAULT_ACCESS_DENIED``,

        ``VAULT_INVALID_REFERENCE``, ``VAULT_CONNECTION_ERROR``,

        ``VAULT_SDK_NOT_INSTALLED``, or ``VAULT_UNKNOWN``. The
        ``vault_field_name``,

        ``vault_reference``, and ``vault_type`` fields identify exactly which

        secret failed to resolve.


        **Server error (500 Internal Server Error):** Returned only for truly

        unexpected bugs. Expected failure modes (vault errors, connector build

        errors, rclone errors) are caught inside the service layer, persisted to

        the verification history, and returned as 400 responses with a normal

        body shape.
      operationId: verify_location_v1_teams__team_id__locations__location_id__verify_post
      parameters:
        - name: location_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Location Id
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationVerificationResponse'
        '400':
          description: Verification failed - invalid credentials or configuration
        '404':
          description: Location not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error during verification
      security:
        - HTTPBearer: []
components:
  schemas:
    LocationVerificationResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        location_id:
          type: string
          format: uuid
          title: Location Id
        verified:
          type: boolean
          title: Verified
        bucket_exists:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Bucket Exists
        can_list:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Can List
        can_read:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Can Read
        can_write:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Can Write
        can_delete:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Can Delete
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        vault_field_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Field Name
        vault_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Reference
        vault_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Vault Type
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - location_id
        - verified
        - created_at
      title: LocationVerificationResponse
      description: >-
        A single verification record.


        Used as the response body for both ``POST /verify`` (the record that was

        just created) and ``GET /verifications`` (paginated history). Clients
        get

        one consistent shape for "what happened during a verification."
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````