Skip to content
Book a demo

Connect documentation

All documentation
Documentation

Listing the change history of a datastream

On this page

This guide explains how to list the configuration changes of a datastream using the Connect API, and how to find out whether a setting was changed.

Introduction

The history endpoint returns the configuration changes of one datastream, newest first, as the History tab of the datastream shows them: changes to its settings, schedules, destination bindings and data mapping. For each change, the response tells you when it was made, who made it, where it came from, and which fields changed. Fetch activity is not part of the history.

Use the endpoint, for example, to check whether and when the Local data retention of a datastream was changed, or when a datastream was disabled.

Limitations

The history endpoint is only available when using an API key generated in the Adverity user interface. These keys use the Bearer scheme in the Authorization header. For more information, see Creating a Connect API key in Adverity.

The endpoint returns the values before and after a change only for the following fields: retention_type, retention_number, prune_instantly, manage_extract_names, extract_name_keys and enabled. All other changes are listed by field name only.

Prerequisites

Scroll horizontally to see the full table.

Operation

Required scope

List the history of a datastream (GET)

datastream:read

You also need the UUID of the datastream. This is the id that GET /api/v1/datastreams/ returns. For more information, see Listing datastreams.

Listing the history of a datastream

To list the change history of a datastream, follow these steps:

  1. Create a GET request to the following endpoint:

    https://{{INSTANCE}}/api/v1/datastreams/{{DATASTREAM_UUID}}/history/
    
  2. In the HTTP request header, include the parameter Authorization with value Bearer {{KEY}}.

  3. Send the request.

As a result, you obtain the changes of the datastream in the response, newest first.

Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:

curl --location --request GET 'https://{{INSTANCE}}/api/v1/datastreams/{{DATASTREAM_UUID}}/history/' \
--header 'Authorization: Bearer {{KEY}}'

Pagination

The endpoint supports pagination using the following parameters:

Scroll horizontally to see the full table.

Parameter

Default value

Maximum value

page

1

N/A

page_size

20

20

The endpoint with the default parameters looks the following way:

https://{{INSTANCE}}/api/v1/datastreams/{{DATASTREAM_UUID}}/history/?page=1&page_size=20

A page_size larger than 20 is reduced to 20. The response returns the page size it used in page_size and the total number of changes in count. Another page follows as long as page * page_size is less than count.

Example with custom pagination:

curl --location --request GET 'https://{{INSTANCE}}/api/v1/datastreams/{{DATASTREAM_UUID}}/history/?page=2&page_size=10' \
--header 'Authorization: Bearer {{KEY}}'

Response format

The response includes an items array containing the changes, and a count field with the total number of changes of the datastream:

{
    "items": [
        {
            "date_created": "2026-11-18T07:45:10Z",
            "user": null,
            "source": "api",
            "has_details": true,
            "kind": "fields",
            "changes": [
                {"field": "enabled", "before": true, "after": false}
            ]
        },
        {
            "date_created": "2026-11-04T09:12:44Z",
            "user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "source": "ui",
            "has_details": true,
            "kind": "fields",
            "changes": [
                {"field": "retention_type", "before": "Retain all", "after": "Retain N fetches"},
                {"field": "retention_number", "before": null, "after": 10}
            ]
        },
        {
            "date_created": "2026-10-20T14:03:27Z",
            "user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "source": "ui",
            "has_details": true,
            "kind": "fields",
            "changes": [
                {"field": "name"}
            ]
        },
        {
            "date_created": "2026-09-02T11:30:00Z",
            "user": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
            "source": "api",
            "has_details": true,
            "kind": "unrecorded",
            "changes": []
        },
        {
            "date_created": "2026-08-15T08:20:05Z",
            "user": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
            "source": "ui",
            "has_details": true,
            "kind": null,
            "changes": null
        }
    ],
    "count": 5,
    "page_size": 20,
    "fields": ["Data Mapping", "Key Columns", "active_pulling_mode", "enabled", "name", "retention_number", "retention_type", ...],
    "fields_complete": true,
    "field_prefixes": ["data_mapping", "settings", "smart_fetch"]
}

Each change in items contains the following fields:

Scroll horizontally to see the full table.

Field

Description

date_created

When the change was made.

user

The UUID of the user who made the change, or null if no user made it. It may be a user your API key cannot list.

source

Where the change came from: ui, api, agent or system.

has_details

Whether the History tab shows a comparison for this change.

kind

What changes covers. See the list below.

changes

The changed fields, or null. Each has a field name and, for the fields named in Limitations, before and after.

The kind of a change is one of the following:

  • fields - changes lists the fields recorded as changed.

  • created - the datastream was created. changes is empty.

  • binding - a destination binding was created, enabled, disabled or removed. changes is empty.

  • unrecorded - it is not known which fields of the datastream changed.

  • null - the details of the change are not available to your API key. changes is null too.

The response also describes the field names the history of this datastream can contain:

Scroll horizontally to see the full table.

Field

Description

fields

The names changes[].field can take. The list may grow, and the names are not stable identifiers.

fields_complete

false for connector types that can also record changes under names not in fields.

field_prefixes

The names in fields that also cover names below them, after a dot. For example, smart_fetch covers smart_fetch.deadline_time.

Finding out whether a setting was changed

To find out whether a setting was ever changed, read every page of the history and look for the field names of the setting in changes[].field.

The following example checks whether the Local data retention of a datastream was ever changed. Its field names are retention_type, retention_number and prune_instantly.

  1. Request the first page of the history:

    curl --location --request GET 'https://{{INSTANCE}}/api/v1/datastreams/{{DATASTREAM_UUID}}/history/?page=1' \
    --header 'Authorization: Bearer {{KEY}}'
    
  2. Read count and page_size in the response. With the following values, the history has three pages:

    {
        "items": [...],
        "count": 47,
        "page_size": 20
    }
    
  3. Request the remaining pages by increasing page until page * page_size is no longer less than count:

    curl --location --request GET 'https://{{INSTANCE}}/api/v1/datastreams/{{DATASTREAM_UUID}}/history/?page=2' \
    --header 'Authorization: Bearer {{KEY}}'
    
  4. In all pages, collect the changes that name one of the three fields. Each match is a change of the Local data retention, with its date, user and values:

    {
        "date_created": "2026-11-04T09:12:44Z",
        "user": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "source": "ui",
        "has_details": true,
        "kind": "fields",
        "changes": [
            {"field": "retention_type", "before": "Retain all", "after": "Retain N fetches"},
            {"field": "retention_number", "before": null, "after": 10}
        ]
    }
    
  5. In all pages, also collect the changes that do not say which fields changed. These are the changes with kind unrecorded, and the changes where kind and changes are null:

    {
        "date_created": "2026-08-15T08:20:05Z",
        "user": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "source": "ui",
        "has_details": true,
        "kind": null,
        "changes": null
    }
    

As a result, you can read the answer from the two collections:

  • If you found matches, the Local data retention was changed at these times.

  • If you found no match and no change from the last step, the history records no change of the Local data retention.

  • If you found a change from the last step, you cannot rule out that the Local data retention was changed at that time. Such a change may have changed any setting of the datastream: the history either did not record which fields it changed, or your API key cannot see its details. An unrecorded change can still list entries in changes, but they do not tell you what changed in the datastream. Report the date of the change as unknown instead of concluding that the setting never changed.

Error reference

The following table describes the error responses returned by the GET /api/v1/datastreams/{{DATASTREAM_UUID}}/history/ endpoint:

Scroll horizontally to see the full table.

Status code

Cause

401

No Authorization header provided, or the key is invalid.

403

The API key does not have the datastream:read scope.

404

The datastream does not exist, is in a workspace not accessible to the API key, or is scheduled for deletion.

422

The datastream ID is not a UUID, or page or page_size is not an integer of 1 or more.