---
title: "Update Service Connector"
method: PUT
path: "/api/v1/service_connectors/{connector_id}"
tags: ["service_connectors"]
---

# Update Service Connector

`PUT /api/v1/service_connectors/{connector_id}`

Updates a service connector.

Args:
    connector_id: ID of the service connector.
    connector_update: Service connector to use to update.

Returns:
    Updated service connector.

## Path parameters

- `connector_id` string, uuid, required

## Request body

- ServiceConnectorUpdate — Model used for service connector updates. Most fields in the update model are optional and will not be updated if omitted. However, the following fields are "special" and leaving them out will also cause the corresponding value to be removed from the service connector in the database: * the `resource_id` field * the `expiration_seconds` field In addition to the above exceptions, the following rules apply: * the `configuration` and `secrets` fields together represent a full valid configuration update, not just a partial update. If either is set (i.e. not None) in the update, their values are merged together and will replace the existing configuration and secrets values. * the `secret_id` field value in the update is ignored, given that secrets are managed internally by the ZenML store. * the `labels` field is also a full labels update: if set (i.e. not `None`), all existing labels are removed and replaced by the new labels in the update. NOTE: the attributes here override the ones in the base class, so they have a None default value.
  - `name` string, nullable
  - `connector_type` union
    - string
    - ServiceConnectorTypeModel — Service connector type specification. Describes the types of resources to which the service connector can be used to gain access and the authentication methods that are supported by the service connector. The connector type, resource types, resource IDs and authentication methods can all be used as search criteria to lookup and filter service connector instances that are compatible with the requirements of a consumer (e.g. a stack component).
      - `name` string, required
      - `connector_type` string, required
      - `description` string
      - `resource_types` ResourceTypeModel[], required
        - `name` string, required
        - `resource_type` string, required
        - `description` string
        - `auth_methods` string[], required
        - `supports_instances` boolean
        - `logo_url` string, nullable
        - `emoji` string, nullable
      - `auth_methods` AuthenticationMethodModel[], required
        - `name` string, required
        - `auth_method` string, required
        - `description` string
        - `config_schema` object
        - `min_expiration_seconds` integer, nullable
        - `max_expiration_seconds` integer, nullable
        - `default_expiration_seconds` integer, nullable
      - `supports_auto_configuration` boolean
      - `logo_url` string, nullable
      - `emoji` string, nullable
      - `docs_url` string, nullable
      - `sdk_docs_url` string, nullable
      - `local` boolean
      - `remote` boolean
  - `description` string, nullable
  - `auth_method` string, nullable
  - `resource_types` string[], nullable
  - `resource_id` string, nullable
  - `supports_instances` boolean, nullable
  - `expires_at` string, date-time, nullable
  - `expires_skew_tolerance` integer, nullable
  - `expiration_seconds` integer, nullable
  - `configuration` object, nullable
  - `secrets` object, nullable
  - `labels` object, nullable

## Response `200`

Successful Response

- ServiceConnectorResponse — Response model for service connectors.
  - `body` ServiceConnectorResponseBody — Response body for service connectors.
    - `created` string, date-time, required
    - `updated` string, date-time, required
    - `user` UserResponse — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
      - `body` UserResponseBody — Response body for users.
        - `created` string, date-time, required
        - `updated` string, date-time, required
        - `active` boolean
        - `activation_token` string, nullable
        - `full_name` string
        - `email_opted_in` boolean, nullable — `null` if not answered, `true` if agreed, `false` if skipped.
        - `is_service_account` boolean, required
        - `is_admin` boolean, required
      - `metadata` UserResponseMetadata — Response metadata for users.
        - `email` string, nullable
        - `external_user_id` string, uuid, nullable
        - `user_metadata` object
      - `resources` UserResponseResources — Class for all resource models associated with the user entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `description` string
    - `connector_type` union, required
      - string
      - ServiceConnectorTypeModel — Service connector type specification. Describes the types of resources to which the service connector can be used to gain access and the authentication methods that are supported by the service connector. The connector type, resource types, resource IDs and authentication methods can all be used as search criteria to lookup and filter service connector instances that are compatible with the requirements of a consumer (e.g. a stack component).
        - `name` string, required
        - `connector_type` string, required
        - `description` string
        - `resource_types` ResourceTypeModel[], required
          - `name` string, required
          - `resource_type` string, required
          - `description` string
          - `auth_methods` string[], required
          - `supports_instances` boolean
          - `logo_url` string, nullable
          - `emoji` string, nullable
        - `auth_methods` AuthenticationMethodModel[], required
          - `name` string, required
          - `auth_method` string, required
          - `description` string
          - `config_schema` object
          - `min_expiration_seconds` integer, nullable
          - `max_expiration_seconds` integer, nullable
          - `default_expiration_seconds` integer, nullable
        - `supports_auto_configuration` boolean
        - `logo_url` string, nullable
        - `emoji` string, nullable
        - `docs_url` string, nullable
        - `sdk_docs_url` string, nullable
        - `local` boolean
        - `remote` boolean
    - `auth_method` string, required
    - `resource_types` string[]
    - `resource_id` string, nullable
    - `supports_instances` boolean
    - `expires_at` string, date-time, nullable
    - `expires_skew_tolerance` integer, nullable
  - `metadata` ServiceConnectorResponseMetadata — Response metadata for service connectors.
    - `workspace` WorkspaceResponse, required — Response model for workspaces.
      - `body` WorkspaceResponseBody — Response body for workspaces.
        - `created` string, date-time, required
        - `updated` string, date-time, required
      - `metadata` WorkspaceResponseMetadata — Response metadata for workspaces.
        - `description` string
      - `resources` WorkspaceResponseResources — Class for all resource models associated with the workspace entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `configuration` object
    - `secret_id` string, uuid, nullable
    - `expiration_seconds` integer, nullable
    - `secrets` object
    - `labels` object
  - `resources` ServiceConnectorResponseResources — Class for all resource models associated with the service connector entity.
  - `id` string, uuid, required
  - `permission_denied` boolean
  - `name` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/zenml-io/apis/zenml-2.md) · [All operations](https://skmtc.net/zenml-io/apis/zenml-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zenml-io/zenml-2/versions/febb01b8bce3/schema)
