Restore filter

postv1/operations/filters/{filterId}/restore
Page View

Filter endpoints allow you to review and manage filters for async messages. A filter can contain multiple rules, but you can only create one filter per subscription. Learn about filters.

You can retrieve, create, update, or delete filters, as well as review and manage filter links.

Restore filter

Restore a filter to a previously used version. You can select which version to restore, whether going backward or forward.

To preview changes, set the dryRun query parameter to true. Otherwise, set the dryRun query parameter to false or omit altogether to immediately apply the restored version to the linked subscription.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platformv1/operations/filters/{filterId}/restore' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'content-type: application/json' \
6
--data '{
7
"version": 0
8
}'

Path Parameters

  • filterId
    required, string

    Displays the unique identifier of the filter.

Query Parameters

  • dryRun
    boolean

    Specifies whether the restore will be previewed or executed. Set to true to run a preview of restoring the asset; this keeps the asset at its current version. Set to false (or omit) to restore the version.

Request Body Schema

  • version
    number

Response fields and example

Example payload generated from schema
1
{
2
"previous": {
3
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
4
"name": "string",
5
"rules": [
6
{
7
"path": "$.Patient.Demographics.FirstName",
8
"values": [
9
"string"
10
],
11
"allowList": true
12
}
13
],
14
"action": "send",
15
"pathType": "jsonpath",
16
"version": "1.0.0",
17
"filterVersion": 2,
18
"createdAt": "2024-04-25T18:17:16.719Z",
19
"createdBy": {
20
"id": 0,
21
"name": "string"
22
},
23
"updatedAt": "2024-04-25T18:17:16.719Z",
24
"updatedBy": {
25
"id": 0,
26
"name": "string"
27
},
28
"deletedAt": "2024-04-25T18:17:16.719Z",
29
"deletedBy": {
30
"id": 0,
31
"name": "string"
32
}
33
},
34
"current": {
35
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
36
"name": "string",
37
"rules": [
38
{
39
"path": "$.Patient.Demographics.FirstName",
40
"values": [
41
"string"
42
],
43
"allowList": true
44
}
45
],
46
"action": "send",
47
"pathType": "jsonpath",
48
"version": "1.0.0",
49
"filterVersion": 2,
50
"createdAt": "2024-04-25T18:17:16.719Z",
51
"createdBy": {
52
"id": 0,
53
"name": "string"
54
},
55
"updatedAt": "2024-04-25T18:17:16.719Z",
56
"updatedBy": {
57
"id": 0,
58
"name": "string"
59
},
60
"deletedAt": "2024-04-25T18:17:16.719Z",
61
"deletedBy": {
62
"id": 0,
63
"name": "string"
64
}
65
},
66
"dryRun": true
67
}
  • previous
    object

    Contains a filter and its related details.

    • id
      string

      Contains the unique identifier of the asset.

      Format: uuid
    • name
      string

      Contains the human-readable name of the asset.

    • rules
      Array of object

      Contains a list of rules that determine when the filter is applied to a message. A filter is only applied if ALL rules are met.

      • path
        string

        Specifies the path to the field(s) that should be evaluated when the filter is applied. This should be a jsonpath value.

      • values
        Array of string

        Contains an array of string values that are matched against the path value when the rule is evaluated.

      • allowList
        boolean

        Indicates whether the rule is an allow-list (matches when the value at the specified path is in the values array) or a deny-list (matches when the value at the specified path is NOT in the values array). Defaults to true (allow-list).

    • action
      string

      Defines what action should be performed when the filter is applied to a message.

      Possible Values: block-all, send
    • pathType
      string

      Specifies the format of the field paths defined for this filter's rules. Both FHIR and data model filters use the jsonpath path type.

      Value: jsonpath
    • version
      string

      Contains the API schema version used for this asset.

    • filterVersion
      number

      Contains the numeric version of the asset. Version numbers start at 1 and increment in whole numbers whenever the asset is updated.

    • createdAt
      string

      Displays the date and time that the asset was originally created in ISO 8601 format.

    • createdBy
      object

      Contains the metadata about the user who created the asset.

      • id
        number

        Contains the unique identifier of the user.

      • name
        nullable, string

        Displays the user's full name.

    • updatedAt
      string

      Displays the date and time that the asset was last updated in ISO 8601 format.

    • updatedBy
      object

      Contains the metadata about the user who last updated the asset.

      • id
        number

        Contains the unique identifier of the user.

      • name
        nullable, string

        Displays the user's full name.

    • deletedAt
      nullable, string

      Displays the date and time that the asset was deleted. Returns a null value if the asset hasn't been deleted.

    • deletedBy
      nullable, object

      Contains the metadata about the user who deleted the asset.

      • id
        number

        Contains the unique identifier of the user.

      • name
        nullable, string

        Displays the user's full name.

  • current
    object

    Contains a filter and its related details.

    • id
      string

      Contains the unique identifier of the asset.

      Format: uuid
    • name
      string

      Contains the human-readable name of the asset.

    • rules
      Array of object

      Contains a list of rules that determine when the filter is applied to a message. A filter is only applied if ALL rules are met.

      • path
        string

        Specifies the path to the field(s) that should be evaluated when the filter is applied. This should be a jsonpath value.

      • values
        Array of string

        Contains an array of string values that are matched against the path value when the rule is evaluated.

      • allowList
        boolean

        Indicates whether the rule is an allow-list (matches when the value at the specified path is in the values array) or a deny-list (matches when the value at the specified path is NOT in the values array). Defaults to true (allow-list).

    • action
      string

      Defines what action should be performed when the filter is applied to a message.

      Possible Values: block-all, send
    • pathType
      string

      Specifies the format of the field paths defined for this filter's rules. Both FHIR and data model filters use the jsonpath path type.

      Value: jsonpath
    • version
      string

      Contains the API schema version used for this asset.

    • filterVersion
      number

      Contains the numeric version of the asset. Version numbers start at 1 and increment in whole numbers whenever the asset is updated.

    • createdAt
      string

      Displays the date and time that the asset was originally created in ISO 8601 format.

    • createdBy
      object

      Contains the metadata about the user who created the asset.

      • id
        number

        Contains the unique identifier of the user.

      • name
        nullable, string

        Displays the user's full name.

    • updatedAt
      string

      Displays the date and time that the asset was last updated in ISO 8601 format.

    • updatedBy
      object

      Contains the metadata about the user who last updated the asset.

      • id
        number

        Contains the unique identifier of the user.

      • name
        nullable, string

        Displays the user's full name.

    • deletedAt
      nullable, string

      Displays the date and time that the asset was deleted. Returns a null value if the asset hasn't been deleted.

    • deletedBy
      nullable, object

      Contains the metadata about the user who deleted the asset.

      • id
        number

        Contains the unique identifier of the user.

      • name
        nullable, string

        Displays the user's full name.

  • dryRun
    boolean