---
title: "Partially update a Swift upstream config for this repository."
method: PATCH
path: "/repos/{owner}/{identifier}/upstream/swift/{slug_perm}/"
tags: ["repos"]
---

# Partially update a Swift upstream config for this repository.

`PATCH /repos/{owner}/{identifier}/upstream/swift/{slug_perm}/`

Partially update a Swift upstream config for this repository.

## Request body

- SwiftUpstreamRequestPatch
  - `auth_mode` 'None' | 'Username and Password' — The authentication mode to use when accessing this upstream.
  - `auth_secret` string, nullable — Secret to provide with requests to upstream.
  - `auth_username` string, nullable — Username to provide with requests to upstream.
  - `extra_header_1` string, nullable — The key for extra header #1 to send to upstream.
  - `extra_header_2` string, nullable — The key for extra header #2 to send to upstream.
  - `extra_value_1` string, nullable — The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted.
  - `extra_value_2` string, nullable — The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted.
  - `is_active` boolean — Whether or not this upstream is active and ready for requests.
  - `mode` 'Proxy Only' | 'Cache and Proxy' — The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode.
  - `name` string — A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream.
  - `priority` integer — Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date.
  - `upstream_url` string, uri — The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository.
  - `verify_ssl` boolean — If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams.

## Response `200`

OK

- SwiftUpstream
  - `auth_mode` 'None' | 'Username and Password' — The authentication mode to use when accessing this upstream.
  - `auth_secret` string, nullable — Secret to provide with requests to upstream.
  - `auth_username` string, nullable — Username to provide with requests to upstream.
  - `available` boolean — Whether the upstream is available for use.
  - `can_reindex` boolean — Whether the upstream can be reindexed.
  - `created_at` string, date-time — The datetime the upstream source was created.
  - `disable_reason` 'N/A' | 'Upstream points to its own repository' | 'Missing upstream source' | 'RSA key did not verify the upstream's APKINDEX signature' | 'Upstream was disabled by request of user'
  - `disable_reason_text` string — Human-readable explanation of why this upstream is disabled
  - `extra_header_1` string, nullable — The key for extra header #1 to send to upstream.
  - `extra_header_2` string, nullable — The key for extra header #2 to send to upstream.
  - `extra_value_1` string, nullable — The value for extra header #1 to send to upstream. This is stored as plaintext, and is NOT encrypted.
  - `extra_value_2` string, nullable — The value for extra header #2 to send to upstream. This is stored as plaintext, and is NOT encrypted.
  - `has_failed_signature_verification` boolean — Whether the upstream has failed signature verification.
  - `index_package_count` integer, nullable — The number of packages available in this upstream source
  - `index_status` string, nullable — The current indexing status of this upstream source
  - `is_active` boolean — Whether or not this upstream is active and ready for requests.
  - `last_indexed` string, nullable — The last time this upstream source was indexed
  - `mode` 'Proxy Only' | 'Cache and Proxy' — The mode that this upstream should operate in. Upstream sources can be used to proxy resolved packages, as well as operate in a proxy/cache or cache only mode.
  - `name` string, required — A descriptive name for this upstream source. A shortened version of this name will be used for tagging cached packages retrieved from this upstream.
  - `pending_validation` boolean — When true, this upstream source is pending validation.
  - `priority` integer — Upstream sources are selected for resolving requests by sequential order (1..n), followed by creation date.
  - `slug_perm` string, slug
  - `updated_at` string, date-time
  - `upstream_url` string, uri, required — The URL for this upstream source. This must be a fully qualified URL including any path elements required to reach the root of the repository.
  - `verify_ssl` boolean — If enabled, SSL certificates are verified when requests are made to this upstream. It's recommended to leave this enabled for all public sources to help mitigate Man-In-The-Middle (MITM) attacks. Please note this only applies to HTTPS upstreams.

## Other responses

- `400` — Request could not be processed (see detail).
- `422` — Missing or invalid parameters (see detail).

---

[API](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1.md) · [All operations](https://skmtc.dev/cloudsmith/apis/cloudsmith-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cloudsmith/cloudsmith-api-v1/revisions/4d7879df9b2f/schema)
