Skip to content

Workflows

Compare workflow versions

Compare two deployment versions of the same workflow with workspace read access. The comparison excludes layout changes and withholds credential-bearing values while reporting their changes. Connections include stable block and port IDs. The combined snapshots and the comparison result must each fit within 16 MiB. OAuth scope: `api:read`.

GET/api/v2/workflows/{workflowId}/versions/compare

Compare two deployment versions of the same workflow with workspace read access. The comparison excludes layout changes and withholds credential-bearing values while reporting their changes. Connections include stable block and port IDs. The combined snapshots and the comparison result must each fit within 16 MiB.

OAuth scope: api:read.

Authentication

Send a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.

Send X-API-Key in the request header.

Alternatively

Send a Sim OAuth access token in Authorization: Bearer. See OAuth authentication and scopes.

Authorization: Bearer YOUR_ACCESS_TOKEN

Required scopes: api:read

OAuth flows
json
{
  "authorizationCode": {
    "authorizationUrl": "https://www.sim.ai/api/auth/oauth2/authorize",
    "tokenUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "refreshUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "scopes": {
      "api:read": "Read your workspaces, workflows, files, tables, and logs",
      "api:write": "Read, create, change, run, and delete resources in your workspaces",
      "offline_access": "Stay signed in without asking again"
    }
  }
}

OAuth scope: api:read.

Path parameters

workflowIdstringRequired

Unique workflow identifier.

minLength
1

Query parameters

baseintegerRequired

Deployment version to compare from.

maximum
2147483647
exclusiveMinimum
0
targetintegerRequired

Deployment version to compare to, in the same workflow.

maximum
2147483647
exclusiveMinimum
0

Responses

200

Changes from the base deployment to the target deployment.

object

Changes from base to target, with credential values withheld.

1 field
dataobjectRequired

Response data.

4 fields
workflowIdstringRequired

Workflow compared.

baseintegerRequired

Base deployment version.

minimum
1
maximum
2147483647
targetintegerRequired

Target deployment version.

minimum
1
maximum
2147483647
diffobjectRequired

Changes from base to target.

9 fields
addedBlocksarrayRequired

Blocks present only in the target.

Schema details
Array itemobject
3 fields
idstringRequired

Stable block identifier.

typestringRequired

Block type.

namestring

Block name.

Additional properties are not allowed.

removedBlocksarrayRequired

Blocks present only in the base.

Schema details
Array itemobject
3 fields
idstringRequired

Stable block identifier.

typestringRequired

Block type.

namestring

Block name.

Additional properties are not allowed.

modifiedBlocksarrayRequired

Blocks with changed fields.

Schema details
Array itemobject
4 fields
idstringRequired

Stable block identifier.

typestringRequired

Block type.

namestring

Block name.

changesarrayRequired

Changed field values.

Schema details
Array itemobject
4 fields
fieldstringRequired

Changed field identifier.

oldValuevalueRequired

Base version value.

Schema details

Exactly one of

Option 1object
1 field
kindstringRequired

The field has no configured value.

const
unset

Additional properties are not allowed.

Option 2object
1 field
kindstringRequired

The value is withheld by the credential policy.

const
redacted

Additional properties are not allowed.

Option 3object
2 fields
kindstringRequired

The field value is included.

const
value
valuevalueRequired

The complete user-authored field value.

Additional properties are not allowed.

newValuevalueRequired

Target version value.

Schema details

Exactly one of

Option 1object
1 field
kindstringRequired

The field has no configured value.

const
unset

Additional properties are not allowed.

Option 2object
1 field
kindstringRequired

The value is withheld by the credential policy.

const
redacted

Additional properties are not allowed.

Option 3object
2 fields
kindstringRequired

The field value is included.

const
value
valuevalueRequired

The complete user-authored field value.

Additional properties are not allowed.

scopestringRequired

Whether the field is a block setting or a subblock input.

enum
["block","subblock"]

Additional properties are not allowed.

Additional properties are not allowed.

edgeChangesobjectRequired

Connection changes.

4 fields
addedintegerRequired

Number added.

minimum
-9007199254740991
maximum
9007199254740991
removedintegerRequired

Number removed.

minimum
-9007199254740991
maximum
9007199254740991
addedDetailsarrayRequired

Added connections.

Schema details
Array itemobject
6 fields
sourcestringRequired

Stable source block identifier.

targetstringRequired

Stable target block identifier.

sourceHandlestring

Source port identifier; omitted for the default port.

targetHandlestring

Target port identifier; omitted for the default port.

sourceNamestringRequired

Source block name.

targetNamestringRequired

Target block name.

Additional properties are not allowed.

removedDetailsarrayRequired

Removed connections.

Schema details
Array itemobject
6 fields
sourcestringRequired

Stable source block identifier.

targetstringRequired

Stable target block identifier.

sourceHandlestring

Source port identifier; omitted for the default port.

targetHandlestring

Target port identifier; omitted for the default port.

sourceNamestringRequired

Source block name.

targetNamestringRequired

Target block name.

Additional properties are not allowed.

Additional properties are not allowed.

loopChangesobjectRequired

Loop change counts.

3 fields
addedintegerRequired

Number added.

minimum
-9007199254740991
maximum
9007199254740991
removedintegerRequired

Number removed.

minimum
-9007199254740991
maximum
9007199254740991
modifiedintegerRequired

Number modified.

minimum
-9007199254740991
maximum
9007199254740991

Additional properties are not allowed.

parallelChangesobjectRequired

Parallel change counts.

3 fields
addedintegerRequired

Number added.

minimum
-9007199254740991
maximum
9007199254740991
removedintegerRequired

Number removed.

minimum
-9007199254740991
maximum
9007199254740991
modifiedintegerRequired

Number modified.

minimum
-9007199254740991
maximum
9007199254740991

Additional properties are not allowed.

containerChangesarrayRequired

Container configuration and membership changes.

Schema details
Array itemobject
6 fields
idstringRequired

Container block ID.

kindstringRequired

Container type.

enum
["loop","parallel"]
namestring

Container name.

changesarrayRequired

Changed field values.

Schema details
Array itemobject
3 fields
fieldstringRequired

Changed field identifier.

oldValuevalueRequired

Base version value.

Schema details

Exactly one of

Option 1object
1 field
kindstringRequired

The field has no configured value.

const
unset

Additional properties are not allowed.

Option 2object
1 field
kindstringRequired

The value is withheld by the credential policy.

const
redacted

Additional properties are not allowed.

Option 3object
2 fields
kindstringRequired

The field value is included.

const
value
valuevalueRequired

The complete user-authored field value.

Additional properties are not allowed.

newValuevalueRequired

Target version value.

Schema details

Exactly one of

Option 1object
1 field
kindstringRequired

The field has no configured value.

const
unset

Additional properties are not allowed.

Option 2object
1 field
kindstringRequired

The value is withheld by the credential policy.

const
redacted

Additional properties are not allowed.

Option 3object
2 fields
kindstringRequired

The field value is included.

const
value
valuevalueRequired

The complete user-authored field value.

Additional properties are not allowed.

Additional properties are not allowed.

nodesAddedarrayRequired

Added member block IDs.

Schema details
Array itemstring
nodesRemovedarrayRequired

Removed member block IDs.

Schema details
Array itemstring

Additional properties are not allowed.

variableChangesobjectRequired

Variable change counts and names.

6 fields
addedintegerRequired

Number added.

minimum
-9007199254740991
maximum
9007199254740991
removedintegerRequired

Number removed.

minimum
-9007199254740991
maximum
9007199254740991
modifiedintegerRequired

Number modified.

minimum
-9007199254740991
maximum
9007199254740991
addedNamesarrayRequired

Names of added variables.

Schema details
Array itemstring
removedNamesarrayRequired

Names of removed variables.

Schema details
Array itemstring
modifiedNamesarrayRequired

Names of modified variables.

Schema details
Array itemstring

Additional properties are not allowed.

hasChangesbooleanRequired

Whether any semantic change was found.

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
    "base": 1,
    "target": 2,
    "diff": {
      "addedBlocks": [],
      "removedBlocks": [],
      "modifiedBlocks": [],
      "edgeChanges": {
        "added": 0,
        "removed": 0,
        "addedDetails": [],
        "removedDetails": []
      },
      "loopChanges": {
        "added": 0,
        "removed": 0,
        "modified": 0
      },
      "parallelChanges": {
        "added": 0,
        "removed": 0,
        "modified": 0
      },
      "containerChanges": [],
      "variableChanges": {
        "added": 0,
        "removed": 0,
        "modified": 0,
        "addedNames": [],
        "removedNames": [],
        "modifiedNames": []
      },
      "hasChanges": false
    }
  }
}

Response headers

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Remaininginteger

Requests remaining in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Resetstring

ISO 8601 timestamp when the current rate-limit window resets.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Was this helpful?
Suggest an edit