Notifly
API ReferenceEnvironments

Compare resources between environments

Compares workflows and other resources between the source and target environments, returning detailed diff information including additions, modifications, and deletions.

POST
/v2/environments/{targetEnvironmentId}/diff

Compares workflows and other resources between the source and target environments, returning detailed diff information including additions, modifications, and deletions.

Authorization

secretKey
Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".

In: header

Path Parameters

targetEnvironmentId*string

Target environment ID (MongoDB ObjectId) to compare against

Request Body

application/json

Diff request configuration

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v2/environments/6615943e7ace93b0540ae377/diff" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "sourceEnvironmentId": "string",    "targetEnvironmentId": "string",    "resources": [      {        "resourceType": "REGULAR",        "sourceResource": {          "id": "string",          "name": "string",          "updatedBy": {            "_id": "string",            "firstName": "string",            "lastName": "string",            "externalId": "string"          },          "updatedAt": "2024-01-15T10:30:00.000Z"        },        "targetResource": {          "id": "string",          "name": "string",          "updatedBy": {            "_id": "string",            "firstName": "string",            "lastName": "string",            "externalId": "string"          },          "updatedAt": "2024-01-15T10:30:00.000Z"        },        "changes": [          {            "sourceResource": {              "id": "string",              "name": "string",              "updatedBy": {                "_id": "string",                "firstName": "string",                "lastName": "string",                "externalId": "string"              },              "updatedAt": "2024-01-15T10:30:00.000Z"            },            "targetResource": {              "id": "string",              "name": "string",              "updatedBy": {                "_id": "string",                "firstName": "string",                "lastName": "string",                "externalId": "string"              },              "updatedAt": "2024-01-15T10:30:00.000Z"            },            "resourceType": "REGULAR",            "action": "added",            "diffs": {              "previous": {},              "new": {}            },            "stepType": "string",            "previousIndex": 0,            "newIndex": 0          }        ],        "summary": {          "added": 0,          "modified": 0,          "deleted": 0,          "unchanged": 0        },        "dependencies": [          {            "resourceType": "REGULAR",            "resourceId": "string",            "resourceName": "string",            "isBlocking": true,            "reason": "LAYOUT_REQUIRED_FOR_WORKFLOW"          }        ]      }    ],    "summary": {      "totalEntities": 0,      "totalChanges": 0,      "hasChanges": true    }  }}