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

# Model Connections

Model connections are the edges of the

model objects

in your architecture. They represent relationships, dependencies, API calls, data flows, or any meaningful interaction between two model objects.

---

## Creating connections

### Request

POST [https://api.icepanel.io/v1/landscapes/\{landscapeId}/versions/\{versionId}/model/connections](https://api.icepanel.io/v1/landscapes/\{landscapeId}/versions/\{versionId}/model/connections)

```curl
curl -X POST https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/connections \
     -H "X-API-Key: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "direction": "outgoing",
  "name": "string",
  "originId": "string",
  "targetId": "string"
}'
```

```typescript
import { IcePanelClient } from "@icepanel/sdk";

async function main() {
    const client = new IcePanelClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.model.connections.create({
        landscapeId: "landscapeId",
        versionId: "versionId",
        body: {
            direction: "outgoing",
            name: "string",
            originId: "string",
            targetId: "string",
        },
    });
}
main();

```

```java
package com.example.usage;

import com.icepanel.IcePanelClient;
import com.icepanel.core.OptionalNullable;
import com.icepanel.model.types.ModelConnectionCreateRequest;
import com.icepanel.types.ModelConnectionDirection;
import com.icepanel.types.ModelConnectionRequired;

public class Example {
    public static void main(String[] args) {
        IcePanelClient client = IcePanelClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.model().connections().create(
            ModelConnectionCreateRequest
                .builder()
                .landscapeId("landscapeId")
                .versionId("versionId")
                .body(
                    ModelConnectionRequired
                        .builder()
                        .name("string")
                        .originId("string")
                        .targetId("string")
                        .direction(
                            OptionalNullable.of(
                                OptionalNullable.of(ModelConnectionDirection.OUTGOING)
                            )
                        )
                        .build()
                )
                .build()
        );
    }
}
```

```python
import requests

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

payload = {
    "direction": "outgoing",
    "name": "string",
    "originId": "string",
    "targetId": "string"
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(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"

	payload := strings.NewReader("{\n  \"direction\": \"outgoing\",\n  \"name\": \"string\",\n  \"originId\": \"string\",\n  \"targetId\": \"string\"\n}")

	req, _ := http.NewRequest("POST", 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");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"direction\": \"outgoing\",\n  \"name\": \"string\",\n  \"originId\": \"string\",\n  \"targetId\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

---

## Filtering connections

The `GET /model/connections` endpoint supports filtering:

| Query parameter           | Description                                              |
| ------------------------- | -------------------------------------------------------- |
| `filter[originId]`        | Connections starting from a specific object              |
| `filter[targetId]`        | Connections ending at a specific object                  |
| `filter[viaId]`           | Connections passing through a specific object            |
| `filter[direction]`       | `outgoing` or `bidirectional`                            |
| `filter[status]`          | Status lifecycle value                                   |
| `filter[tagIds][]`        | One or more tag IDs                                      |
| `filter[technologyIds][]` | One or more technology IDs                               |
| `filter[labels][key]`     | Label key-value pair                                     |
| `filter[name]`            | Partial name match                                       |
| `filter[linked]`          | `true` to return only connections with at least one link |

---

## Status lifecycle

Connections share the same four-state lifecycle as [model objects](/core-concepts/model-objects):

| Status       | Description                            |
| ------------ | -------------------------------------- |
| `live`       | Active dependency or relationship      |
| `future`     | Planned but not yet implemented        |
| `deprecated` | In use but being phased out            |
| `removed`    | Retired, kept for historical reference |

---

## Related concepts

* [Model Objects](/core-concepts/model-objects)