Cluster

Operations for a node inside of a cluster

Fully synchronize the worldmatch database of this node.

post

Required Roles: ApiImport Applies missing delta updates to the worldmatch database if this node is on the same databaseVersion as the director. Otherwise it reloads the worldmatch database from postgres.

Authorizations
Responses
200

OK

post
POST /fact-finder//rest/v5/cluster/database/sync/full HTTP/1.1
Host: ng-demo.fact-finder.de
Authorization: Basic username:password
Accept: */*

No content

Reset the config version counters for all(global, channel specific and properties) configs of this node(set it to 0).

post

Required Roles: ApiConfig

Authorizations
Responses
200

OK

application/json
Responsestring
post
POST /fact-finder//rest/v5/cluster/reset/config/version/counters HTTP/1.1
Host: ng-demo.fact-finder.de
Authorization: Basic username:password
Accept: */*
text

Prune delta updates.

post

Required Roles: ApiImport Deletes the delta updates table and increments the databaseVersion. After prune every worker has to reload the worldmatch database once to get in sync with the director. In contrast to a full re-import this does not discard any delta updates which are already applied to the intermediate database.

Authorizations
Path parameters
channelstringRequired

The channel

Responses
200

OK

application/json
Responsestring
post
POST /fact-finder//rest/v5/cluster/{channel}/database/prune HTTP/1.1
Host: ng-demo.fact-finder.de
Authorization: Basic username:password
Accept: */*
text

Show the current state of the worldmatch database.

get

Required Roles: ApiImport

Authorizations
Path parameters
channelstringRequired

The channel

Responses
200

OK

application/json
get
GET /fact-finder//rest/v5/cluster/{channel}/database/state HTTP/1.1
Host: ng-demo.fact-finder.de
Authorization: Basic username:password
Accept: */*
{
  "databaseVersion": 1,
  "deltaErrorCount": 1,
  "deltaVersion": 1
}

Synchronize the worldmatch database of this node.

post

Required Roles: ApiImport Applies missing delta updates to the worldmatch database if this node is on the same databaseVersion as the director. Otherwise a reload of the worldmatch database is necessary to synchronize this node with the director.

Authorizations
Path parameters
channelstringRequired

The channel

Query parameters
verbosebooleanOptionalDefault: false
Responses
200

OK

application/json
post
POST /fact-finder//rest/v5/cluster/{channel}/database/sync HTTP/1.1
Host: ng-demo.fact-finder.de
Authorization: Basic username:password
Accept: */*
{
  "error": {
    "description": "Unique value already exists: ArticleNumber=1234",
    "name": "FieldConstraintException",
    "stacktrace": "de.factfinder.worldmatch.index.FieldConstraintException: Unique value already exists: ArticleNumber=1234"
  },
  "record": {
    "MasterArticleNumber": "3d407d51e8ca255a429fab65961428cc",
    "ArticleNumber": "123-4567",
    "Title": "Osprey - Women's Tempest 30 - Touring backpack",
    "IsMaster": true,
    "Manufacturer": "Osprey",
    "InsertDate": "2017-03-02T01:00:00+01:00",
    "Image": "http://demoshop.fact-finder.de/demoshop-images/bergfreunde/sol_502-2806-0111_pic1_1.jpg",
    "Price": 100.95,
    "Colors": [
      "red",
      "grey"
    ],
    "RatingCount": 0,
    "Category": [
      [
        "Outdoor equipment",
        "Backpacks",
        "Mountaineering backpacks"
      ],
      [
        "Outdoor equipment",
        "Backpacks",
        "Daypacks"
      ]
    ],
    "VAT": "20",
    "MultiFilter": {
      "Volume": [
        30.5
      ],
      "Recommended use": [
        "Trail running",
        "Trekking",
        "Hillwalking"
      ],
      "Features": [
        "Ice-pick holder",
        "Front access",
        "Mesh back",
        "Hydration compatible"
      ],
      "Weight": [
        860
      ]
    },
    "GtinList": [
      "0-943396-04-1",
      "0-85131-041-1"
    ],
    "BooleanList": [
      true,
      false,
      true,
      true
    ]
  },
  "success": true,
  "warnings": [
    {
      "description": "Unique value already exists: ArticleNumber=1234",
      "name": "FieldConstraintException",
      "stacktrace": "de.factfinder.worldmatch.index.FieldConstraintException: Unique value already exists: ArticleNumber=1234"
    }
  ]
}

Show the import state of this node.

get

Required Roles: ApiImport

Authorizations
Path parameters
channelstringRequired

The channel

Responses
200

OK

application/json
get
GET /fact-finder//rest/v5/cluster/{channel}/import/state HTTP/1.1
Host: ng-demo.fact-finder.de
Authorization: Basic username:password
Accept: */*
{
  "importCounts": [
    {
      "count": 1,
      "type": "DATA"
    }
  ]
}

Get the cluster state. Includes database & import & cache state.

get

Required Roles: ApiImport

Authorizations
Path parameters
channelstringRequired

The channel

Responses
200

OK

application/json
get
GET /fact-finder//rest/v5/cluster/{channel}/state HTTP/1.1
Host: ng-demo.fact-finder.de
Authorization: Basic username:password
Accept: */*
{
  "cacheFlush": 1,
  "database": {
    "databaseVersion": 1,
    "deltaErrorCount": 1,
    "deltaVersion": 1
  },
  "imports": [
    {
      "count": 1,
      "type": "DATA"
    }
  ]
}

Was this helpful?