---
title: "Change target"
method: PATCH
path: "/cdn/logs_uploader/targets/{id}"
tags: ["Logs uploader"]
---

# Change target

`PATCH /cdn/logs_uploader/targets/{id}`

Change logs uploader target partially.

## Path parameters

- `id` integer, required

## Request body

- PatchLogsUploaderTarget
  - `storage_type` 's3_gcore' | 's3_amazon' | 's3_oss' | 's3_other' | 's3_v1' | 'ftp' | 'sftp' | 'http' | 'azure_blob' — Type of storage for logs.
  - `name` string — Name of the target.
  - `description` string — Description of the target.
  - `config` union — Config for specific storage type.
    - S3GcoreConfig
      - `access_key_id` string, required
      - `secret_access_key` string, required
      - `region` string, required
      - `bucket_name` string, required
      - `directory` string, nullable
      - `endpoint` string, required
      - `use_path_style` boolean
    - S3AmazonConfig
      - `access_key_id` string, required
      - `secret_access_key` string, required
      - `region` string, required
      - `bucket_name` string, required
      - `directory` string, nullable
    - S3OSSConfig
      - `access_key_id` string, required
      - `secret_access_key` string, required
      - `region` string, nullable
      - `bucket_name` string, required
      - `directory` string, nullable
      - `endpoint` string, nullable
    - S3OtherConfig
      - `access_key_id` string, required
      - `secret_access_key` string, required
      - `region` string, required
      - `bucket_name` string, required
      - `directory` string, nullable
      - `endpoint` string, required
      - `use_path_style` boolean
    - S3V1Config
      - `access_key_id` string, required
      - `secret_access_key` string, required
      - `region` string, required
      - `bucket_name` string, required
      - `directory` string, nullable
      - `endpoint` string, required
      - `use_path_style` boolean
    - FTPConfig
      - `user` string, required
      - `hostname` string, required
      - `timeout_seconds` integer
      - `directory` string, nullable
      - `password` string, required
    - SFTPConfig
      - `user` string, required
      - `hostname` string, required
      - `timeout_seconds` integer
      - `directory` string, nullable
      - `password` string, nullable
      - `private_key` string, nullable
      - `key_passphrase` string, nullable
    - HTTPConfig
      - `upload` HTTPAction, required
        - `method` 'POST' | 'PUT'
        - `url` string, required
        - `headers` object
        - `timeout_seconds` integer
        - `use_compression` boolean
        - `response_actions` object[]
          - `match_status_code` integer
          - `match_payload` string
          - `description` string
          - `action` 'drop' | 'retry' | 'append', required
      - `append` object, nullable
        - `method` 'POST' | 'PUT'
        - `url` string, required
        - `headers` object
        - `timeout_seconds` integer
        - `use_compression` boolean
        - `response_actions` object[]
          - `match_status_code` integer
          - `match_payload` string
          - `description` string
          - `action` 'drop' | 'retry' | 'append', required
      - `retry` object, nullable
        - `method` 'POST' | 'PUT'
        - `url` string, required
        - `headers` object
        - `timeout_seconds` integer
        - `use_compression` boolean
        - `response_actions` object[]
          - `match_status_code` integer
          - `match_payload` string
          - `description` string
          - `action` 'drop' | 'retry' | 'append', required
      - `auth` object, nullable
        - `type` 'token', required
        - `config` object, required
          - `header_name` string, required
          - `token` string, required
      - `content_type` 'json' | 'text'
    - AzureBlobConfig
      - `container_name` string, required — Azure Blob Storage container name.
      - `account_name` string, required — Azure Blob Storage account name.
      - `endpoint` string, nullable — Custom Azure Blob Storage endpoint URL.
      - `directory` string, nullable — Directory path within the container.
      - `auth` AzureBlobAuthConfig, required
        - `type` 'shared_key' | 'sas_token', required — Authentication type.
        - `config` union, required — Authentication credentials.
          - object
            - `account_key` string, required — Azure Blob Storage account key.
          - object
            - `token` string, required — Azure Blob Storage SAS token.

## Response `200`

Successful.

- LogsUploaderTargetResponse
  - `id` integer
  - `client_id` integer — Client that owns the target.
  - `created` string, date-time — Time when logs uploader target was created.
  - `updated` string, date-time — Time when logs uploader target was updated.
  - `storage_type` 's3_gcore' | 's3_amazon' | 's3_oss' | 's3_other' | 's3_v1' | 'ftp' | 'sftp' | 'http' | 'azure_blob' — Type of storage for logs.
  - `name` string — Name of the target.
  - `description` string — Description of the target.
  - `related_uploader_configs` integer[] — List of logs uploader configs that use this target.
  - `status` object — Validation status of the logs uploader target. Informs if the specified target is reachable.
    - `status` 'in_progress' | 'successful' | 'failed' — Status of the validation.
    - `code` integer — Error code indicating the type of validation error.
    - `updated` string, date-time — Time when the validation status was updated.
    - `details` string — Error message if the validation failed.
  - `config` union — Config for specific storage type.
    - S3GcoreConfigResponse
      - `access_key_id` string
      - `region` string
      - `bucket_name` string
      - `directory` string, nullable
      - `endpoint` string
      - `use_path_style` boolean
    - S3AmazonConfigResponse
      - `access_key_id` string
      - `region` string
      - `bucket_name` string
      - `directory` string, nullable
    - S3OSSConfigResponse
      - `access_key_id` string
      - `region` string, nullable
      - `bucket_name` string
      - `directory` string, nullable
      - `endpoint` string, nullable
    - S3OtherConfigResponse
      - `access_key_id` string
      - `region` string
      - `bucket_name` string
      - `directory` string, nullable
      - `endpoint` string
      - `use_path_style` boolean
    - S3V1ConfigResponse
      - `access_key_id` string
      - `region` string
      - `bucket_name` string
      - `directory` string, nullable
      - `endpoint` string
      - `use_path_style` boolean
    - FTPConfigResponse
      - `user` string
      - `hostname` string
      - `timeout_seconds` integer
      - `directory` string, nullable
    - SFTPConfigResponse
      - `user` string, required
      - `hostname` string, required
      - `timeout_seconds` integer
      - `directory` string, nullable
      - `password` string, nullable
      - `private_key` string, nullable
      - `key_passphrase` string, nullable
    - HTTPConfigResponse
      - `upload` BaseHTTPAction
        - `method` 'POST' | 'PUT'
        - `url` string
        - `headers` object
        - `timeout_seconds` integer
        - `use_compression` boolean
        - `response_actions` object[]
          - `match_status_code` integer
          - `match_payload` string
          - `description` string
          - `action` 'drop' | 'retry' | 'append'
      - `append` BaseHTTPAction
        - `method` 'POST' | 'PUT'
        - `url` string
        - `headers` object
        - `timeout_seconds` integer
        - `use_compression` boolean
        - `response_actions` object[]
          - `match_status_code` integer
          - `match_payload` string
          - `description` string
          - `action` 'drop' | 'retry' | 'append'
      - `retry` BaseHTTPAction
        - `method` 'POST' | 'PUT'
        - `url` string
        - `headers` object
        - `timeout_seconds` integer
        - `use_compression` boolean
        - `response_actions` object[]
          - `match_status_code` integer
          - `match_payload` string
          - `description` string
          - `action` 'drop' | 'retry' | 'append'
      - `auth` BaseHTTPAuth
        - `type` 'token'
        - `config` object
          - `header_name` string
          - `token` string
      - `content_type` 'json' | 'text'
    - AzureBlobConfigResponse
      - `container_name` string — Azure Blob Storage container name.
      - `account_name` string — Azure Blob Storage account name.
      - `endpoint` string, nullable — Custom Azure Blob Storage endpoint URL.
      - `directory` string, nullable — Directory path within the container.
      - `auth` AzureBlobAuthConfigResponse
        - `type` 'shared_key' | 'sas_token', required — Authentication type.
        - `config` union, required — Authentication credentials. Secret fields are masked with '*****'.
          - object
            - `account_key` string — Masked secret value.
          - object
            - `token` string — Masked secret value.

## Other responses

- `400` — You will receive an error with the invalid parameter mentioned.
- `403` — Feature is disabled for your account.
- `404` — Logs uploader target do not exist or has been deleted.

---

[API](https://skmtc.dev/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.dev/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
