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

# Update Location

> Update location properties.

**Required Role:** ADMIN or OWNER

**Updatable fields:**
- name
- description
- bucket_name
- region
- endpoint_url
- secret_id (must have same type as location_type)

**Immutable field:**
- location_type (cannot be changed after creation)

**Warning:** Changing bucket_name, region, endpoint_url, or secret_id will affect
all tasks using this location. Verify your changes before updating locations
used by active tasks.



## OpenAPI

````yaml PATCH /v1/teams/{team_id}/locations/{location_id}
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}:
    patch:
      tags:
        - Locations
      summary: Update Location
      description: >-
        Update location properties.


        **Required Role:** ADMIN or OWNER


        **Updatable fields:**

        - name

        - description

        - bucket_name

        - region

        - endpoint_url

        - secret_id (must have same type as location_type)


        **Immutable field:**

        - location_type (cannot be changed after creation)


        **Warning:** Changing bucket_name, region, endpoint_url, or secret_id
        will affect

        all tasks using this location. Verify your changes before updating
        locations

        used by active tasks.
      operationId: update_location_v1_teams__team_id__locations__location_id__patch
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LocationUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationDetailResponse'
        '400':
          description: Invalid update data
        '404':
          description: Location not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Failed to update location
      security:
        - HTTPBearer: []
components:
  schemas:
    LocationUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Description
        bucket_name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Bucket Name
        region:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Region
        endpoint_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Endpoint Url
        secret_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Secret Id
      type: object
      title: LocationUpdate
      description: >-
        Schema for updating a location.


        Most fields can be updated except location_type (would require creating
        a new location).

        If updating secret_id, the new secret must have the same type as the
        location's location_type.


        Warning: Changing bucket_name, region, endpoint_url, or secret_id will
        affect all tasks

        using this location.
    LocationDetailResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        location_type:
          $ref: '#/components/schemas/LocationType'
        bucket_name:
          type: string
          title: Bucket Name
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
        endpoint_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Url
        last_verified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Verified At
        last_verification:
          anyOf:
            - $ref: '#/components/schemas/LocationVerificationSummary'
            - type: 'null'
          description: >-
            Most recent verification attempt (success or failure) for health
            badge. last_verified_at only updates on success — this field
            reflects the actual most recent run regardless of outcome.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by:
          type: string
          format: uuid
          title: Created By
        created_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Email
          description: Email of user who created this location
        updated_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Updated By
          description: User who last updated this location
        updated_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated By Email
          description: Email of user who last updated this location
        secret_id:
          type: string
          format: uuid
          title: Secret Id
        secret_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret Name
          description: Name of the linked secret
        usage_stats:
          $ref: '#/components/schemas/LocationUsageStats'
        tasks_as_source:
          items:
            $ref: '#/components/schemas/LinkedTask'
          type: array
          title: Tasks As Source
          description: Tasks using this location as source
        tasks_as_destination:
          items:
            $ref: '#/components/schemas/LinkedTask'
          type: array
          title: Tasks As Destination
          description: Tasks using this location as destination
      type: object
      required:
        - id
        - name
        - description
        - location_type
        - bucket_name
        - region
        - endpoint_url
        - last_verified_at
        - created_at
        - updated_at
        - created_by
        - secret_id
        - usage_stats
      title: LocationDetailResponse
      description: Schema for detailed location information.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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.
    LocationVerificationSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        verified:
          type: boolean
          title: Verified
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        created_at:
          type: string
          format: date-time
          title: Created At
        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
      type: object
      required:
        - id
        - verified
        - created_at
      title: LocationVerificationSummary
      description: >-
        Compact verification record for embedding in list responses.


        Drives the health badge on LocationList — we need verified + timestamp

        plus the three-state permission flags so the list can distinguish fully

        verified from "verified but with permission gaps" (e.g. read-only
        users).
    LocationUsageStats:
      properties:
        tasks_as_source:
          type: integer
          title: Tasks As Source
          description: Number of tasks using this as source
        tasks_as_destination:
          type: integer
          title: Tasks As Destination
          description: Number of tasks using this as destination
      type: object
      required:
        - tasks_as_source
        - tasks_as_destination
      title: LocationUsageStats
      description: Statistics about location usage in tasks.
    LinkedTask:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: LinkedTask
      description: Minimal task info for navigation links.
    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

````