Skip to main content

Use the feed of changes to:
  • Export a paper trail to know which changes made the biggest impact.
  • Ensure that your most important Experiences stay static. Do this by listing all changes for a specific Experience and make sure the set of changes is empty
  • Audit an issue with the delivery of an Experience.

Schema

PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
experience_idIDThe ID of the parent model that this change represents. (a Tour when model is a Step
model_idIDThe ID of the model that this change represents
model_typestringThe type of the model that this change represents
kindstringThe type of change this represents: One of: create, update, destroy, raw, partial, related, revert, or apply
pathstringThey keypath this change represents
objectobjectThe underlying value of this change. It can be an object with scalar values (for a kind=create or kind=destroy) or values as a 2-item array of the [before, after] diff
optionsobjectA hash of other information about this change. Values are a diff.

Change “Diff item” Schema

Each value is a 2-item array [BEFORE, AFTER]. If the value changed from "silver" to "gold" then:
["silver", "gold"]
In the context of a Change object:
{
  "plan": ["silver", "gold"],
  "monthly_spend": [99, 249]
}

List Changes

List all Changes.

HTTP Request

GET https://api.chameleon.io/v3/edit/changes
GET https://api.chameleon.io/v3/edit/:model_kind/:model_id/changes
param-description
limitoptionalDefaults to 50 with a maximum of 500
beforeoptionalUsed when paginating, use directly from the cursor object from the previous response
beforeoptionalRead as “created before” and can be given as a timestamp to get only limit items that were created before this time
afteroptionalRead as “created after” and can be given as a timestamp or ID to get only limit items that were created after this time
filtersoptionalAn array of properties to filter Changes with; use this to fetch “all changes for a specific set of properties”
model_kindoptionalA kind of model to fetch changes for. One of tour, survey, launcher, or tooltip.
model_idoptionalThe ID of the model to fetch changes for
Examples
Only changes for the 6f3c4232c712de665632a6d5 Tour
GET https://api.chameleon.io/v3/edit/tours/6f3c4232c712de665632a6d5/changes
Only changes to the published_at property of any Experience
GET https://api.chameleon.io/v3/edit/changes?filter=published_at

HTTP Response

{
  "changes": [
    {
      "id": "6f3c4232c712de665632a6d5",
      "created_at": "2029-04-07T12:38:00Z",
      "experience_id": "6f3c1931c712d632a6d5e665",
      "model_id": "6f3c1931c712d632a6d5e665",
      "model_type": "Campaign",
      "kind": "create",
      "path": "model",
      "object": {
        "id": "6f3c1931c712d632a6d5e665",
        "name": "New data importing options",
        ...
      },
      ...
    },
    {
      "id": "6f3c4232c712de665632a6d6",
      "created_at": "2029-04-07T12:38:00Z",
      "experience_id": "6f3c1931c712d632a6d5e665",
      "model_id": "6e3c193a6d5e51c712d63266",
      "model_type": "Step",
      "kind": "create",
      "path": "model",
      "object": {
        "id": "6f3c1931c712d632a6d5e665",
        "body": "### We've updated all of the data things!",
        ...
      },
      ...
    },
    {
      "id": "6f3c4232c712de665632a6d6",
      "created_at": "2029-04-07T12:38:00Z",
      "experience_id": "6f3c1931c712d632a6d5e665",
      "model_id": "6e3c193a6d5e51c712d63266",
      "model_type": "Step",
      "kind": "create",
      "path": "model",
      "object": {
        "body": ["### We've updated all of the data things!", "### We've upgraded the data things!"],
        "modal_width": [450, 520],
        ...
      },
      "object": {
        "capture_id": ["6d3c4232c665632a712de2f1", "6d3c423665632a2c712de2f7"]
      },
      ...
    },
    ...
  ],
  "cursor": {
    "limit": 50,
    "before": "6f3c4232c712de665632a6d6"
  }
}

Summary of Changes

Summary Schema

PropertyTypeDescription
model_idIDThe ID of the model that this change represents
pathstringThey keypath this change represents
kindstringThe type of change this represents: One of: create, update, destroy
change_idarrayA 2-item array of the [before, after] diff of Screen Capture ID of this change. Note some changes are no represented visually and will have null value for the after value
capture_idarrayA 2-item array of the [before, after] diff of Screen Capture ID of this change. Note some changes are no represented visually and will have null value for the after value
objectobject<ChangeUpdate>A ChangeUpdate of properties that have changed for this model
changesarray<ChangeUpdate>An Array of ChangeUpdate items representing changes to child associated models (Steps, Buttons etc.

Change update object Schema

PropertyTypeDescription
namestringThe name of the underlying property that changed
descriptionstringA longer description of the underlying property
valueobjectThe underlying value of this change. It can be an object with scalar values (for a kind=create or kind=destroy) or values as a 2-item array of the [before, after] diff
Examples
{
  "name": "Step created",
  "description": null,
  "value": {
    "id": "6f3c4232c712de665632a6d6",
    ...
  }
}
{
  "name": "Body",
  "description": "The content of the Step",
  "value": ["New features are here!", "New features have arrived!"],
}

Change Summary

List all Change Summaries

HTTP Request

GET https://api.chameleon.io/v3/edit/:model_kind/:model_id/changes/summary
param-description
model_kindrequiredA kind of model to fetch changes for. One of tour, survey, launcher, or tooltip.
model_idrequiredThe ID of the model to fetch changes for

HTTP Response

{
  "model_id": "6f3c1931c712d632a6d5e665",
  "kind": "create",
  "change_id": [
    "5e3c4232c712de665632a6d9",
    "5f3c42665632a6d932c712de"
  ],
  "path": "model",
  "object": {
    "id": "6f3c1931c712d632a6d5e665",
    "name": "New data importing options",
    ...
  },
  "changes": [
    {
      "model_id": "6e3c193a6d5e51c712d63266",
      "kind": "create",
      "capture_id": [ ... ],
      "object": {
        "id": "6e3c193a6d5e51c712d63266",
        "body": "Welcome!",
        ...
      },
      ...
    },
    {
      "model_id": "6e3c193a6d5e51c712d63266",
      "kind": "update",
      "capture_id": [ ... ],
      "object": {
        "body": ["Welcome!", "Hello and Welcome"],
        ...
      }
      ...
    }
  ],
  ...
}