> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.icepanel.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.icepanel.io/_mcp/server.

# Update

PATCH https://api.icepanel.io/v1/landscapes/{landscapeId}/versions/{versionId}/model/connections/{modelConnectionId}
Content-Type: application/json

Reference: https://developer.icepanel.io/api-reference/model/connections/update

## Authentication

- `X-API-Key` header (required) — API key authentication
- `Authorization` header (bearer token, required) — Bearer token authentication

## Request

### Path parameters

- `landscapeId` (string, required)
- `versionId` (string, required)
- `modelConnectionId` (string, required)

### Query parameters

- `updateDiagrams` (boolean, optional)

### Body (application/json)

This endpoint expects a ModelConnectionPartial.

- `commit` (double, optional)
- `description` (string, optional)
- `direction` (enum, optional, nullable)
  - Allowed values: `outgoing`, `bidirectional`
- `labels` (map from string to string, optional)
- `links` (ModelConnectionPartialLinks, optional)
- `name` (string, optional)
- `originId` (string, optional) — Model object that initiates the connection
- `status` (enum, optional)
  - Allowed values: `deprecated`, `future`, `live`, `removed`
- `tagIds` (ModelConnectionPartialTagIds, optional)
- `targetId` (string, optional) — Model object that receives the message
- `technologyIds` (ModelConnectionPartialTechnologyIds, optional)
- `viaId` (string, optional, nullable) — Model object that facilitates the connection, such as a Kafka topic, or RabbitMQ queue

## Response

### 200

OK

- `modelConnection` (ModelConnection, required)

## Errors

### 400 Bad Request Error

Bad Request

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 401 Unauthorized Error

Unauthorized

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 403 Forbidden Error

Forbidden

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 404 Not Found Error

Not Found

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 409 Conflict Error

Conflict

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 422 Unprocessable Entity Error

Unprocessable Entity

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 429 Too Many Requests Error

Resource Exhausted

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 500 Internal Server Error

Internal Server

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

### 503 Service Unavailable Error

Service Unavailable

- `message` (string, required)
- `code` (string, optional)
- `errors` (list of string, optional)

## Types

### ModelConnectionPartialLinks

- `$add` (map from string to RealityLinkRequired, optional)
- `$remove` (list of string, optional)
- `$replace` (map from string to RealityLinkRequired, optional)
- `$update` (map from string to RealityLinkPartial, optional)

### ModelConnectionPartialTagIds

### ModelConnectionPartialTechnologyIds

### ModelConnection

- `commit` (double, required)
- `direction` (enum, required, nullable)
  - Allowed values: `outgoing`, `bidirectional`
- `labels` (map from string to string, required)
- `links` (map from string to RealityLink, required)
- `name` (string, required)
- `originId` (string, required) — Model object that initiates the connection
- `status` (enum, required)
  - Allowed values: `deprecated`, `future`, `live`, `removed`
- `tagIds` (list of string, required) — Tag IDs assigned to this model
- `targetId` (string, required) — Model object that receives the message
- `technologyIds` (list of string, required) — Technology IDs assigned to this model
- `viaId` (string, required, nullable) — Model object that facilitates the connection, such as a Kafka topic, or RabbitMQ queue
- `handleId` (string, required)
- `createdAt` (datetime, required)
- `createdBy` (enum, required)
  - Allowed values: `user`, `api-key`, `notification-key`, `service`
- `createdById` (string, required)
- `diagrams` (map from string to ModelConnectionDiagram, required)
- `flows` (map from string to ModelConnectionFlow, required)
- `id` (string, required)
- `landscapeId` (string, required)
- `linked` (boolean, required)
- `updatedAt` (datetime, required)
- `updatedBy` (enum, required)
  - Allowed values: `user`, `api-key`, `notification-key`, `service`
- `updatedById` (string, required)
- `version` (double, required)
- `versionId` (string, required)
- `description` (string, optional)
- `deletedAt` (datetime, optional)
- `deletedBy` (enum, optional)
  - Allowed values: `user`, `api-key`, `notification-key`, `service`
- `deletedById` (string, optional)
- `latestEntityId` (string, optional)

### RealityLinkRequired

- `connectionResolveUrl` (string, optional) — Resolve the connector from a publicly accessible URL
- `connector` (RealityConnector, optional) — Links this to a resource in reality, if set periodic checks are performed and the status is updated
- `customName` (string, optional, nullable) — Friendly name for the link set by the user
- `index` (double, optional)
- `url` (string, optional) — Accessible link URL when not using a connector

### RealityLinkPartial

- `connectionResolveUrl` (string, optional) — Resolve the connector from a publicly accessible URL
- `connector` (RealityConnector, optional) — Links this to a resource in reality, if set periodic checks are performed and the status is updated
- `customName` (string, optional, nullable) — Friendly name for the link set by the user
- `index` (double, optional)
- `url` (string, optional) — Accessible link URL when not using a connector

### ModelConnectionPartialTagIds1

Update individual tag IDs

- `$add` (list of string, optional) — Append tag IDs to the list
- `$remove` (list of string, optional) — Remove tag IDs from the list

### ModelConnectionPartialTechnologyIds1

Update individual technology IDs

- `$add` (list of string, optional) — Append technology IDs to the list
- `$remove` (list of string, optional) — Remove technology IDs from the list

### RealityLink

- `index` (double, required)
- `id` (string, required) — Random 20 character identifier
- `connectionResolveUrl` (string, optional) — Resolve the connector from a publicly accessible URL
- `connector` (RealityConnector, optional) — Links this to a resource in reality, if set periodic checks are performed and the status is updated
- `customName` (string, optional, nullable) — Friendly name for the link set by the user
- `url` (string, optional) — URL pointing to the resource in reality, resolved from the last sync
- `errorMessage` (string, optional) — Error message that was received during the last sync
- `name` (string, optional) — Friendly name describing the resource in reality, resolved from the last sync
- `status` (enum, optional) — Response that was received from the last sync with reality
  - Allowed values: `valid`, `invalid`

### ModelConnectionDiagram

- `connectionId` (string, required)
- `id` (string, required)
- `originModelId` (string, required)
- `targetModelId` (string, required)

### ModelConnectionFlow

- `id` (string, required)
- `stepId` (string, required)

### RealityConnector

### RealityConnectorUrl

- `type` (enum, required)
  - Allowed values: `url`
- `url` (string, required)

### RealityConnectorAzureDevopsRepo

- `accountName` (string, required)
- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `azure-devops-repo`

### RealityConnectorAzureDevopsBranch

- `accountName` (string, required)
- `branchName` (string, required)
- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `azure-devops-branch`

### RealityConnectorAzureDevopsFolder

- `accountName` (string, required)
- `branchName` (string, required)
- `path` (string, required)
- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `azure-devops-folder`

### RealityConnectorAzureDevopsFile

- `accountName` (string, required)
- `branchName` (string, required)
- `path` (string, required)
- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `azure-devops-file`

### RealityConnectorBitbucketRepo

- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-repo`
- `workspaceId` (string, required)

### RealityConnectorBitbucketBranch

- `branchName` (string, required)
- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-branch`
- `workspaceId` (string, required)

### RealityConnectorBitbucketFolder

- `branchName` (string, required)
- `path` (string, required)
- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-folder`
- `workspaceId` (string, required)

### RealityConnectorBitbucketFile

- `branchName` (string, required)
- `path` (string, required)
- `projectId` (string, required)
- `repositoryId` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-file`
- `workspaceId` (string, required)

### RealityConnectorBitbucketServerRepo

- `projectId` (double, required)
- `repositoryId` (double, required)
- `serverUrl` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-server-repo`

### RealityConnectorBitbucketServerBranch

- `branchName` (string, required)
- `projectId` (double, required)
- `repositoryId` (double, required)
- `serverUrl` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-server-branch`

### RealityConnectorBitbucketServerFolder

- `branchName` (string, required)
- `path` (string, required)
- `projectId` (double, required)
- `repositoryId` (double, required)
- `serverUrl` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-server-folder`

### RealityConnectorBitbucketServerFile

- `branchName` (string, required)
- `path` (string, required)
- `projectId` (double, required)
- `repositoryId` (double, required)
- `serverUrl` (string, required)
- `type` (enum, required)
  - Allowed values: `bitbucket-server-file`

### RealityConnectorGithubRepo

- `ownerId` (double, required)
- `repositoryId` (double, required)
- `type` (enum, required)
  - Allowed values: `github-repo`

### RealityConnectorGithubBranch

- `branchName` (string, required)
- `ownerId` (double, required)
- `repositoryId` (double, required)
- `type` (enum, required)
  - Allowed values: `github-branch`

### RealityConnectorGithubFolder

- `branchName` (string, required)
- `ownerId` (double, required)
- `path` (string, required)
- `repositoryId` (double, required)
- `type` (enum, required)
  - Allowed values: `github-folder`

### RealityConnectorGithubFile

- `branchName` (string, required)
- `ownerId` (double, required)
- `path` (string, required)
- `repositoryId` (double, required)
- `type` (enum, required)
  - Allowed values: `github-file`

### RealityConnectorGitlabRepo

- `projectId` (double, required)
- `type` (enum, required)
  - Allowed values: `gitlab-repo`

### RealityConnectorGitlabBranch

- `branchName` (string, required)
- `projectId` (double, required)
- `type` (enum, required)
  - Allowed values: `gitlab-branch`

### RealityConnectorGitlabFolder

- `branchName` (string, required)
- `path` (string, required)
- `projectId` (double, required)
- `type` (enum, required)
  - Allowed values: `gitlab-folder`

### RealityConnectorGitlabFile

- `branchName` (string, required)
- `path` (string, required)
- `projectId` (double, required)
- `type` (enum, required)
  - Allowed values: `gitlab-file`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "modelConnection": {
    "commit": 1.1,
    "direction": "outgoing",
    "labels": {},
    "links": {},
    "name": "string",
    "originId": "string",
    "status": "deprecated",
    "tagIds": [
      "string"
    ],
    "targetId": "string",
    "technologyIds": [
      "string"
    ],
    "viaId": "string",
    "handleId": "string",
    "createdAt": "2024-01-15T09:30:00Z",
    "createdBy": "user",
    "createdById": "string",
    "diagrams": {},
    "flows": {},
    "id": "string",
    "landscapeId": "string",
    "linked": true,
    "updatedAt": "2024-01-15T09:30:00Z",
    "updatedBy": "user",
    "updatedById": "string",
    "version": 1.1,
    "versionId": "string",
    "description": "string",
    "deletedAt": "2024-01-15T09:30:00Z",
    "deletedBy": "user",
    "deletedById": "string",
    "latestEntityId": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/connections/modelConnectionId"

payload = {}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/connections/modelConnectionId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```csharp
using RestSharp;

var client = new RestClient("https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/connections/modelConnectionId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```