Manipulate a List from another List

Adds, updates, deletes or replaces Members and content in a target List based on a source List.

It's possible to manipulate Tag, Counter and Data Lists through this API, but not Subscription, SQL or Target Lists. However the source List can be of any type.

The source List can be of a different type and have different column names, but this may require mapping the columns using the mapColumns attribute.

If updating List columns, both the source and destination List columns must be of the same type.
If a source value can't fit in a destination column then the value may be truncated.


The following actions can be specified for the target List:

  • ADD_OR_UPDATE
    Copies all Members from the source List across, inserting them if they don't exist, otherwise updating them.
    When updating a Counter List, it will either increase/decrease or replace the counter based on the replaceCounters attribute.
    When updating a Data List, it's possible to restrict which columns get updated through the updateColumns attribute.
    This option is not applicable to Tag Lists.
  • ADD_ONLY
    Inserts all Members from the source List which don't already exist in the target List, but do not touch any records that already exist.
  • UPDATE_ONLY
    Updates all Members that also exist in the source List, but does not add any Members.
    When updating a Counter List, it will either increase/decrease or replace the counter based on the replaceCounters attribute.
    When updating a Data List, it's possible to restrict which columns get updated through the updateColumns attribute.
    This option is not applicable to Tag Lists.
  • REPLACE_ALL
    Replaces the entire content of the target List with the Members of the source List.
    This is a convenience method, which corresponds to truncating the target List and then doing an ADD_ONLY from the source List.
  • REMOVE_COMMON
    Removes all Members from the target List which also exist in the source List.
  • REMOVE_MISSING
    Removes all Members from the target List which don't exist in the source List.

Path Params
string
required

The name of the space (database) assigned to you.

string
required

One of:

  • The Entity's internal Entity Id
  • The Entity's name
  • The Entity's business Id, prefixed with $
string
required

The List which will be used as input to manipulate this List. It can be of any type, including Target and SQL.

Query Params
string
required

See above.

string

Can be specified for the ADD_OR_UPDATE and UPDATE_ONLY actions to restrict which target Data List columns are updated.

Contains a comma-separated list of the columns to update.

This attribute is not applicable to Tag Lists or Counter Lists.

string

Optionally used for the ADD_OR_UPDATE, ADD_ONLY, UPDATE_ONLY and REPLACE_ALL actions if the column names don't match between the two Lists.
Contains a comma-separated key-value pair where the left side represents the column to be updated and the right side represents the column name in the source List.

For example: mapColumns=dob=birthday,firstname=first_name
Four Counter Lists the column name is called 'counter' and for Subscription Lists it's called 'state'.

This attribute is not applicable to Tag Lists.

string

Optionally used for the ADD_OR_UPDATE, ADD_ONLY, UPDATE_ONLY and REPLACE_ALL actions for Data Lists and Counter Lists.

It sets a column to a fixed value rather than taking the value from a source List column.

The format is a comma-separated list of key-value pairs where the key is the column to set a value for, for example: fixedValues=status=ACTIVE,is_tagged=true
Four counter Lists the column name is called 'counter'.

This attribute is not applicable to Tag Lists.

Note, fixed value columns can't also be listed in the mapColumns or defaultValues attributes.

string

Optionally used for the ADD_OR_UPDATE, ADD_ONLY, UPDATE_ONLY and REPLACE_ALL actions for Data Lists and Counter Lists.

Allows setting a default value for nullable columns, and is required if mapping a nullable column to a mandatory column.
The format is a comma-separated list of key-value pairs where the key is the column to set a default value for, forexample: defaultValues=status=ACTIVE,greeting=Hello,age_range=12-35
Four counter Lists, the column name is called 'counter'.

This attribute is not applicable to Tag Lists.

boolean

Only applicable when updating Counter Lists. If false, then Counters will be increased or decreased with the value column in the source List.
By setting this attribute to true, the Counter List value is instead replaced by the fixed value or the source List column.

string

Optional Query fields used to limit the rows read from the source List. This is the only parameter that operates on the source List.

Multiple fields can be specified, separated by semicolon, and wildcards are supported.
This field works the same way as when querying Lists. The field applies to Data and SQL source Lists, but can be used for Counter and Subscription Lists as well.

boolean
Defaults to false

Real-time counts and returns the totals of the source and target Lists before and after the operation.

Note, this operation can be very slow for large Lists so should only be used for testing purpose or for small lists.

string

The Dimensions under which the calling application operates.
Format: {dim1}:{value1}[;{dim2}:{value2}[;...]]

boolean

If true, also exposes Installed but Unpublished entity resources. Default is false.

Response

Language
Click Try It! to start a request and see the response here! Or choose an example:
application/json