listDataChangeStreams

Return a list of data change streams that match all specified filters

The "listDataChangeStreams" action takes specified filter criteria and returns a filtered list of data change streams. Each stream includes its ID and description. Omit all filters to return a list of all streams.

This action ANDs together all the filter properties to create the filter. Omit a filter property or set it to null to prevent it from filtering the results. Omit all filters to return all data change streams.

When a filter property value is a string, the server treats it as a partial match of each character in the property's value to the corresponding character in the definitions. The server does not process characters as wildcards. 

The "dataChangeStreamStatusFilter" property contains a list of status values that the server ORs together.

 

Request examples

Minimal

This example returns all data change streams.

{
  "action": "listDataChangeStreams",
  "params": {},
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

Maximal

This example returns all data change streams that match the filter criteria.

{
  "api": "admin",
  "action": "listDataChangeStreams",
  "params": {

    "descriptionFilter": "existing & new",
    "streamingConnectionNameFilter": "fmq",
    "topicFilter": "cust",

    "localDatabaseNameFilter": "ctr",
    "localOwnerNameFilter": "admin",
    "localTableNameFilter": "cust",
    "localDataFilePathFilter": null,

    "sourceDatabaseNameFilter": "ctr",
    "sourceOwnerNameFilter": "admin",
    "sourceTableNameFilter": "cust",
    "sourceDataFilePathFilter": null,

    "dataChangeStreamStatusFilter": [
      "scheduled",
      "jumpstarting",
      "running",
      "failed",
      "initializing",
      "pausing",
      "paused",
    ],

    "includeExistingRecordsFilter": true
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

 

Response examples

Maximal

{
  "authToken": "authToken",
  "result": {
    "dataChangeStreams": [
      {
        "id": 2,
        "description": "existing & new CA records from db1 ctreesql_admin_custmast",
        "dataChangeStreamStatus": "paused"
      }
    ]
  },
  "errorCode": 0,
  "errorMessage": ""
}
 
 

 

Properties

Request properties ("params")

Property Description Default Type Limits (inclusive)

dataChangeStreamStatusFilter

The "dataChangeStreamStatusFilter" filters the results based on the change stream status. The response to this action will include streams that match one of the included status values or all streams if no values are included. Optional with default of null array

"scheduled"

"jumpstarting"

"running"

"failed"

"initializing"

"pausing"

"paused"

descriptionFilter

The 

"descriptionFilter" property filters the response by the value of the "description" property. If the value is not null or omitted, the results only include code packages with descriptions that match the full-text search specified in the "descriptionFilter" property. For example, to constrain results to include the exact phrase 'FairCom Edge rocks' and the phrase 'around the clock' in the description, use "descriptionFilter": "'FairCom Edge rocks' 'around the clock'". Notice that a phrase is enclosed in single quotation marks. To constrain results to include the word FairCom as the first word plus the word rocks anywhere else in the description, use the search string, "descriptionFilter": "^FairCom rocks". The ^ operator followed by a word or phrase can only be included once in a full-text expression.

 

Optional with default of null string 1 to 65,500 bytes

includeExistingRecordsFilter

The "includeExistingRecordsFilter" property returns streams that synchronize existing records if true.

Optional with default of null Boolean

true

false

localDatabaseNameFilter

The "localDatabaseNameFilter" specifies a partial match for the database name of the table on the FairCom MQ server that stores the stream's data change events.

Optional with default of null string 1 to 64 bytes

localDataFilePathFilter

The "localDataFilePathFilter" property specifies a partial match for the file name of the table on the FairCom MQ server that stores the stream's data change events.

Optional with default of null string 1 to 64 bytes

localOwnerNameFilter

The "localOwnerNameFilter" property specifies a partial match for the owner name of the table on the FairCom MQ server that stores the stream's data change events.

Optional with default of null string 1 to 64 bytes

localTableNameFilter

The "localTableNameFilter" property specifies a partial match for the table name of the table on the FairCom MQ server that stores the stream's data change events.

Optional with default of null string 1 to 64 bytes

sourceDatabaseNameFilter

The "sourceDatabaseNameFilter" property specifies a partial match for the database name of the table on the FairCom DB or RTG server that generates the stream's data change events.

Optional with default of null string 1 to 64 bytes

sourceDataFilePathFilter

The "sourceDataFilePath" property specifies the data file path of the table on the FairCom DB or RTG server that generates the stream's data change events. It can be a full path or a relative path from the server's data directory.

Required - if "sourceTableName" is not specified string No limits

sourceOwnerNameFilter

The "sourceOwnerNameFilter" property specifies a partial match for the owner name of the table on the FairCom DB or RTG server that generates the stream's data change events.

Optional with default of null string 1 to 64 bytes

sourceTableNameFilter

The "sourceTableNameFilter" property specifies a partial match for the table name of the table on the FairCom DB or RTG server that generates the stream's data change events.

Optional with default of null string 1 to 64 bytes

streamingConnectionNameFilter

The "streamingConnectionNameFilter" property specifies a partial match for a connection name.

Optional with default of null string 1 to 64 bytes

topicFilter

The "topicFilter" property contains a topic filter, which may contain MQTT wildcard characters, #, and +. Without wildcard characters, it matches one topic. When containing wildcard characters, it may match one or more topics.

Optional with default of "" UTF-8 string topic names

 

Response properties ("result")

Property Description Type Limits (inclusive)

dataChangeStreams

The "dataChangeStreams" property lists the data change streams that match the request filters as separate objects. array of objects

0 or more objects including 1 or more of the following properties: 
"dataChangeStreamStatus"

"description"

"id"

dataChangeStreams

.dataChangeStreamStatus

The "dataChangeStreamStatus" property specifies the status of the data change stream. It may specify any of the following states: string enum

"failed"

"initializing"

"jumpstarting"

"paused"

"pausing"

"running"

"scheduled"

dataChangeStreams

.description

The "description" property provides additional information about an object, such as a label or thing. You can use it as internal or external documentation of a label's meaning, purpose, and usage.

Markdown is a good language for formatting description text. You must ensure the text is compatible with a JSON string. For example, you must escape a double quote character using the backslash character:  \".

 

In the Thing API, It defaults to "unknown" and is a string from 1 to 512 bytes. You cannot use it for lookups and filtering.

 

string 1 to 65,500 bytes

dataChangeStreams

.id

The "id" property is the unique identifier of an object such as a label or thing. In JSON, you may use an integer number or a string containing an integer number. The server automatically generates the "id" when you create a label and stores it in the label table as an integer. You cannot alter the "id" value. If your application needs to specify a specific numeric identifier for a label, use the "enum" property.

integer

0 to 2147483647

0 to 9223372036854770000 in the Thing API