# Cluster

Operations for a node inside of a cluster

## Fully synchronize the worldmatch database of this node.

> \<b>Required Roles\</b>: \<em>ApiImport\</em>\<br />\<br />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.

```json
{"openapi":"3.0.1","info":{"title":"FactFinder REST API","version":"v5"},"tags":[{"name":"cluster","description":"Operations for a node inside of a cluster"}],"servers":[{"url":"https://vector-demo.fact-finder.de/fact-finder/","description":"Generated server url"}],"security":[{"basicAuth":[]},{"oAuth2":["import"]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"oAuth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"oauth/token","scopes":{"public_queries":"","import":"","database":"","config":"","analytics":"","jobs":"","monitor":"","manage":"","users":""}}}}},"schemas":{"ApiError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A short error description"},"errorDescription":{"type":"string","description":"A description of the error cause"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."}}},"paths":{"/rest/v5/cluster/database/sync/full":{"post":{"tags":["cluster"],"summary":"Fully synchronize the worldmatch database of this node.","description":"<b>Required Roles</b>: <em>ApiImport</em><br /><br />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.","operationId":"fullSync","responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

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

> \<b>Required Roles\</b>: \<em>ApiConfig\</em>

```json
{"openapi":"3.0.1","info":{"title":"FactFinder REST API","version":"v5"},"tags":[{"name":"cluster","description":"Operations for a node inside of a cluster"}],"servers":[{"url":"https://vector-demo.fact-finder.de/fact-finder/","description":"Generated server url"}],"security":[{"basicAuth":[]},{"oAuth2":["config"]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"oAuth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"oauth/token","scopes":{"public_queries":"","import":"","database":"","config":"","analytics":"","jobs":"","monitor":"","manage":"","users":""}}}}},"schemas":{"ApiError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A short error description"},"errorDescription":{"type":"string","description":"A description of the error cause"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."}}},"paths":{"/rest/v5/cluster/reset/config/version/counters":{"post":{"tags":["cluster"],"summary":"Reset the config version counters for all(global, channel specific and properties) configs of this node(set it to 0).","description":"<b>Required Roles</b>: <em>ApiConfig</em>","operationId":"resetConfigVersionCounters","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## Prune delta updates.

> \<b>Required Roles\</b>: \<em>ApiImport\</em>\<br />\<br />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.

```json
{"openapi":"3.0.1","info":{"title":"FactFinder REST API","version":"v5"},"tags":[{"name":"cluster","description":"Operations for a node inside of a cluster"}],"servers":[{"url":"https://vector-demo.fact-finder.de/fact-finder/","description":"Generated server url"}],"security":[{"basicAuth":[]},{"oAuth2":["import"]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"oAuth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"oauth/token","scopes":{"public_queries":"","import":"","database":"","config":"","analytics":"","jobs":"","monitor":"","manage":"","users":""}}}}},"schemas":{"ApiError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A short error description"},"errorDescription":{"type":"string","description":"A description of the error cause"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."}}},"paths":{"/rest/v5/cluster/{channel}/database/prune":{"post":{"tags":["cluster"],"summary":"Prune delta updates.","description":"<b>Required Roles</b>: <em>ApiImport</em><br /><br />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.","operationId":"prune","parameters":[{"name":"channel","in":"path","description":"The channel","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## Show the current state of the worldmatch database.

> \<b>Required Roles\</b>: \<em>ApiImport\</em>

```json
{"openapi":"3.0.1","info":{"title":"FactFinder REST API","version":"v5"},"tags":[{"name":"cluster","description":"Operations for a node inside of a cluster"}],"servers":[{"url":"https://vector-demo.fact-finder.de/fact-finder/","description":"Generated server url"}],"security":[{"basicAuth":[]},{"oAuth2":["import"]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"oAuth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"oauth/token","scopes":{"public_queries":"","import":"","database":"","config":"","analytics":"","jobs":"","monitor":"","manage":"","users":""}}}}},"schemas":{"DatabaseState":{"type":"object","properties":{"databaseVersion":{"type":"integer","description":"The version of the current worldmatch database. If the databaseVersion of a worker is less than the databaseVersion of the director, the worker needs to reload the whole worldmatch database in order to synchronize itself with the director.","format":"int64"},"deltaErrorCount":{"type":"integer","description":"The number of errors (rejected delta updates) which occurred while trying to synchronize worker and director. Reloading the worldmatch database resets this counter to zero.","format":"int64"},"deltaVersion":{"type":"integer","description":"The number of delta updates applied to the current worldmatch database. If the deltaVersion of a worker is less than the deltaVersion of the directory, but the databaseVersions are equal, applying the missing delta updates to the worker is sufficient to  synchronize worker and director.","format":"int64"}},"description":"The worldmatch database state."},"ApiError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A short error description"},"errorDescription":{"type":"string","description":"A description of the error cause"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."}}},"paths":{"/rest/v5/cluster/{channel}/database/state":{"get":{"tags":["cluster"],"summary":"Show the current state of the worldmatch database.","description":"<b>Required Roles</b>: <em>ApiImport</em>","operationId":"getDatabaseState","parameters":[{"name":"channel","in":"path","description":"The channel","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseState"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## Synchronize the worldmatch database of this node.

> \<b>Required Roles\</b>: \<em>ApiImport\</em>\<br />\<br />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.

```json
{"openapi":"3.0.1","info":{"title":"FactFinder REST API","version":"v5"},"tags":[{"name":"cluster","description":"Operations for a node inside of a cluster"}],"servers":[{"url":"https://vector-demo.fact-finder.de/fact-finder/","description":"Generated server url"}],"security":[{"basicAuth":[]},{"oAuth2":["import"]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"oAuth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"oauth/token","scopes":{"public_queries":"","import":"","database":"","config":"","analytics":"","jobs":"","monitor":"","manage":"","users":""}}}}},"schemas":{"DeltaUpdateResult":{"required":["success"],"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDescription"},"record":{"$ref":"#/components/schemas/FlatRecord"},"success":{"type":"boolean","description":"If true, the operation succeeded. Otherwise an error occurred which will be described in the error field."},"warnings":{"type":"array","description":"A list of all warnings.","items":{"$ref":"#/components/schemas/ErrorDescription"}}}},"ErrorDescription":{"required":["name"],"type":"object","properties":{"description":{"type":"string","description":"A description of the error cause"},"name":{"type":"string","description":"Name of the error"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."},"FlatRecord":{"title":"FlatRecord","type":"object","additionalProperties":{"type":"object"},"description":"Represents a FactFinder record. The original input of the operation (will only be transmitted when the query parameter verbose=true was added to the request)."},"ApiError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A short error description"},"errorDescription":{"type":"string","description":"A description of the error cause"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."}}},"paths":{"/rest/v5/cluster/{channel}/database/sync":{"post":{"tags":["cluster"],"summary":"Synchronize the worldmatch database of this node.","description":"<b>Required Roles</b>: <em>ApiImport</em><br /><br />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.","operationId":"syncDatabase","parameters":[{"name":"channel","in":"path","description":"The channel","required":true,"schema":{"type":"string"}},{"name":"verbose","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeltaUpdateResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict - The worldmatch database is outdated and an import (LOAD_ONLY) is necessary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## Show the import state of this node.

> \<b>Required Roles\</b>: \<em>ApiImport\</em>

```json
{"openapi":"3.0.1","info":{"title":"FactFinder REST API","version":"v5"},"tags":[{"name":"cluster","description":"Operations for a node inside of a cluster"}],"servers":[{"url":"https://vector-demo.fact-finder.de/fact-finder/","description":"Generated server url"}],"security":[{"basicAuth":[]},{"oAuth2":["import"]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"oAuth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"oauth/token","scopes":{"public_queries":"","import":"","database":"","config":"","analytics":"","jobs":"","monitor":"","manage":"","users":""}}}}},"schemas":{"ImportState":{"type":"object","properties":{"importCounts":{"type":"array","description":"Number of imports completed per import type.","items":{"$ref":"#/components/schemas/ImportCount"}}}},"ImportCount":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["DATA","SUGGEST","RECOMMENDATION","RANKING","CUSTOMER_SPECIFIC_PRICING","GEO","DATA_AND_PRICING","EMBEDDING"]}}},"ApiError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A short error description"},"errorDescription":{"type":"string","description":"A description of the error cause"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."}}},"paths":{"/rest/v5/cluster/{channel}/import/state":{"get":{"tags":["cluster"],"summary":"Show the import state of this node.","description":"<b>Required Roles</b>: <em>ApiImport</em>","operationId":"getImportState","parameters":[{"name":"channel","in":"path","description":"The channel","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportState"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

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

> \<b>Required Roles\</b>: \<em>ApiImport\</em>

```json
{"openapi":"3.0.1","info":{"title":"FactFinder REST API","version":"v5"},"tags":[{"name":"cluster","description":"Operations for a node inside of a cluster"}],"servers":[{"url":"https://vector-demo.fact-finder.de/fact-finder/","description":"Generated server url"}],"security":[{"basicAuth":[]},{"oAuth2":["import"]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"oAuth2":{"type":"oauth2","flows":{"password":{"tokenUrl":"oauth/token","scopes":{"public_queries":"","import":"","database":"","config":"","analytics":"","jobs":"","monitor":"","manage":"","users":""}}}}},"schemas":{"ClusterState":{"type":"object","properties":{"cacheFlush":{"type":"integer","description":"Number of completed cache flushes.","format":"int64"},"database":{"$ref":"#/components/schemas/DatabaseState"},"imports":{"type":"array","description":"Number of imports completed per import type.","items":{"$ref":"#/components/schemas/ImportCount"}}}},"DatabaseState":{"type":"object","properties":{"databaseVersion":{"type":"integer","description":"The version of the current worldmatch database. If the databaseVersion of a worker is less than the databaseVersion of the director, the worker needs to reload the whole worldmatch database in order to synchronize itself with the director.","format":"int64"},"deltaErrorCount":{"type":"integer","description":"The number of errors (rejected delta updates) which occurred while trying to synchronize worker and director. Reloading the worldmatch database resets this counter to zero.","format":"int64"},"deltaVersion":{"type":"integer","description":"The number of delta updates applied to the current worldmatch database. If the deltaVersion of a worker is less than the deltaVersion of the directory, but the databaseVersions are equal, applying the missing delta updates to the worker is sufficient to  synchronize worker and director.","format":"int64"}},"description":"The worldmatch database state."},"ImportCount":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["DATA","SUGGEST","RECOMMENDATION","RANKING","CUSTOMER_SPECIFIC_PRICING","GEO","DATA_AND_PRICING","EMBEDDING"]}}},"ApiError":{"required":["error"],"type":"object","properties":{"error":{"type":"string","description":"A short error description"},"errorDescription":{"type":"string","description":"A description of the error cause"},"stacktrace":{"type":"array","description":"The stacktrace from the error (will only be transmitted when the query parameter verbose=true was added to the request)","items":{"type":"string"}}},"description":"Contains information which will be returned when an error occurs."}}},"paths":{"/rest/v5/cluster/{channel}/state":{"get":{"tags":["cluster"],"summary":"Get the cluster state. Includes database & import & cache state.","description":"<b>Required Roles</b>: <em>ApiImport</em>","operationId":"getState","parameters":[{"name":"channel","in":"path","description":"The channel","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterState"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fact-finder.com/api-reference/cluster.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
