Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Replace branch topology

PUT/v1/projects/{projectId}/branches/{branchId}/application-topologyReplace branch topology

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Atomically replaces the entire topology for a branch. Composer calls this after Load, before the apply. On error, Composer warns and continues — the previous topology is preserved.

Parameters

projectIdstringpathrequired

pattern ^(proj_)?([cC][^\s-]{8,}|[a-z0-9]+)$

branchIdstringpathrequired

pattern ^(br_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Request body

application/json
object
contentHashstring
edgesarray of objectrequired
Show child attributes
Show array items
familystringrequired

one of "communication", "data"

fromobjectrequired
Show child attributes
directionstringrequired

one of "in", "out"

logicalIdstringrequired

minLength 1

namestringrequired

minLength 1

stylestring
toobjectrequired
Show child attributes
directionstringrequired

one of "in", "out"

logicalIdstringrequired

minLength 1

namestringrequired

minLength 1

nodesarray of objectrequired
Show child attributes
Show array items
kindstringrequired

one of "module", "service", "resource"

logicalIdstringrequired

minLength 1

parentLogicalIdnull | stringrequired

minLength 1

typestring
portsarray of objectrequired
Show child attributes
Show array items
contractHashstring
contractKindstring
directionstringrequired

one of "in", "out"

logicalIdstringrequired

minLength 1

namestringrequired

minLength 1

Example request
{
  "contentHash": "string",
  "edges": [
    {
      "family": "communication",
      "from": {
        "direction": "in",
        "logicalId": "string",
        "name": "string"
      },
      "style": "string",
      "to": {
        "direction": "in",
        "logicalId": "string",
        "name": "string"
      }
    }
  ],
  "nodes": [
    {
      "kind": "module",
      "logicalId": "string",
      "parentLogicalId": "string",
      "type": "string"
    }
  ],
  "ports": [
    {
      "contractHash": "string",
      "contractKind": "string",
      "direction": "in",
      "logicalId": "string",
      "name": "string"
    }
  ]
}

Responses

200ApplicationTopology replaced.application/json
object
dataobjectrequired
Show child attributes
contentHashstring
edgesarray of objectrequired
Show child attributes
Show array items
familystringrequired

one of "communication", "data"

fromobjectrequired
Show child attributes
directionstringrequired

one of "in", "out"

logicalIdstringrequired

minLength 1

namestringrequired

minLength 1

stylestring
toobjectrequired
Show child attributes
directionstringrequired

one of "in", "out"

logicalIdstringrequired

minLength 1

namestringrequired

minLength 1

nodesarray of objectrequired
Show child attributes
Show array items
kindstringrequired

one of "module", "service", "resource"

logicalIdstringrequired

minLength 1

parentLogicalIdnull | stringrequired

minLength 1

typestring
portsarray of objectrequired
Show child attributes
Show array items
contractHashstring
contractKindstring
directionstringrequired

one of "in", "out"

logicalIdstringrequired

minLength 1

namestringrequired

minLength 1

writtenAtstring · date-time
Example response
{
  "data": {
    "contentHash": "string",
    "edges": [
      {
        "family": "communication",
        "from": {
          "direction": "in",
          "logicalId": "string",
          "name": "string"
        },
        "style": "string",
        "to": {
          "direction": "in",
          "logicalId": "string",
          "name": "string"
        }
      }
    ],
    "nodes": [
      {
        "kind": "module",
        "logicalId": "string",
        "parentLogicalId": "string",
        "type": "string"
      }
    ],
    "ports": [
      {
        "contractHash": "string",
        "contractKind": "string",
        "direction": "in",
        "logicalId": "string",
        "name": "string"
      }
    ],
    "writtenAt": "2026-06-09T00:00:00Z"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Project or branch not found.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
422Invalid topology shape.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu