Product Selector

Fusion 5.9
    Fusion 5.9

    Query Rewrite API

    This API manages documents used for query rewriting.

    This API requires a Fusion AI license.

    Examples

    Create a blocklist rule

    curl -u USERNAME:PASSWORD -XPOST -H "Content-type:application/json" https://FUSION_HOST:8764/api/apps/APP_NAME/query-rewrite/instances -d
    '{
      "id": "block_list_rule_1",
      "name": "block_list_rule_1",
      "type": "block_list",
      "field_name": "id",
      "field_values": ["6","17"],
      "enabled": true,
      "priority":11,
      "search_terms":["life"],
      "matching": "keywords"
    }'

    Update specific fields in an existing rule

    curl -u USERNAME:PASSWORD -XPUT -H "Content-type:application/json" https://FUSION_HOST:8764/api/apps/APP_NAME/query-rewrite/instances -d
    '{
      "id": "block_list_rule_1",
      "name": "block_list_rule_1",
      "type": "block_list",
      "field_name": "id",
      "field_values": ["6","17"],
      "enabled": false,
      "priority":9,
      "search_terms":["life"],
      "matching": "keywords"
    }'

    Publish rules in the staging area

    curl -u USERNAME:PASSWORD -XPUT -H 'Content-Type: application/json' https://FUSION_HOST:8764/api/apollo/apps/APP_NAME/query-rewrite/publish

    Delete a published rule

    curl -u USERNAME:PASSWORD -XPUT -H "Content-type:application/json" https://FUSION_HOST:8764/api/apollo/apps/APP_NAME/query-rewrite/instances -d
    '{
      "delete": [ “block_list_rule_1" ]
    }'

    Publish an operation

    curl -u USERNAME:PASSWORD -XPUT -H "Content-type:application/json" https://FUSION_HOST:8764/api/apollo/apps/APP_NAME/query-rewrite/publish