Skip to main content
POST
/
signals
/
{collection}
Index an event signal
import requests

url = "https://{FUSION HOST}/api/signals/{collection}"

payload = [
    {
        "params": {
            "query": "Televisiones Panasonic  50 pulgadas",
            "filterQueries": ["cat00000", "abcat0100000", "abcat0101000", "abcat0101001"],
            "docId": "2125233"
        },
        "type": "click",
        "timestamp": "2011-09-01T23:44:52.53Z"
    },
    {
        "params": {
            "query": "Sharp",
            "filterQueries": ["cat00000", "abcat0100000", "abcat0101000", "abcat0101001"],
            "docId": "2009324"
        },
        "type": "click",
        "timestamp": "2011-09-05T12:25:37.42Z"
    }
]
headers = {
    "Authorization": "Basic <encoded-value>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "responseHeader": {
    "status": 0,
    "QTime": 1,
    "params": {
      "indent": "true",
      "q": "docId: 2125233",
      "wt": "json"
    }
  },
  "response": {
    "numFound": 1198,
    "start": 0,
    "docs": [
      {
        "id": "7aee7b1f-5cde-4957-b73c-c15881f559ec",
        "filters_s": "abcat0100000 $ abcat0101000 $ abcat0101001 $ cat00000",
        "query_orig_s": "Televisiones Panasonic  50 pulgadas",
        "params.user_s": "000000df17cd56a5df4a94074e133c9d4739fae3",
        "docId": "2125233",
        "params.query_time__s": "2011-09-01T23:43:59.75Z",
        "query_t": "televisiones panasonic 50 pulgadas",
        "query_s": "televisiones panasonic 50 pulgadas",
        "filters_orig_ss": [
          "abcat0100000",
          "abcat0101000",
          "abcat0101001",
          "cat00000"
        ],
        "flag_s": "EVENT",
        "type_s": "click",
        "attr_params.filterQueries_": [
          "cat00000",
          "abcat0100000",
          "abcat0101000",
          "abcat0101001"
        ],
        "timestamp_dt": "2011-09-01T23:44:52.53Z",
        "_version_": 1478892846857584600
      },
      {
        "id": "6789a209-f5b5-457e-9df6-8033b8f7f317",
        "filters_s": "abcat0100000 $ abcat0101000 $ abcat0101001 $ cat00000",
        "query_orig_s": "Sharp",
        "params.user_s": "000001928162247ffaf63185cd8b2a244c78e7c6",
        "docId": "2009324",
        "params.query_time__s": "2011-09-05T12:25:01.18Z",
        "query_t": "sharp",
        "query_s": "sharp",
        "filters_orig_ss": [
          "abcat0100000",
          "abcat0101000",
          "abcat0101001",
          "cat00000"
        ],
        "flag_s": "EVENT",
        "type_s": "click",
        "attr_params.filterQueries_": [
          "cat00000",
          "abcat0100000",
          "abcat0101000",
          "abcat0101001"
        ],
        "timestamp_dt": "2011-09-05T12:25:37.42Z",
        "_version_": 1478892846859681800
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

collection
string
required

The data collection to which this signal belongs.

Query Parameters

pipelineId
string

An index pipeline to use for processing signals. Note that the index pipeline must end with a Solr Indexer stage, and in this stage the enforce_schema property must be set to 'true'.

commit
boolean

Whether to commit signals to the collection immediately after indexing each one. The setting is not recommended in production and performance testing because it negatively impacts performance. Instead, consider letting the defaults of the Solr collection dictate the commit frequency.

async
boolean
default:true

Whether to execute the request asynchronously. If true, an autoCommit is issued and failures are not reported.

Body

application/json · object[]
id
string
epoch
integer
timestamp
string
type
string
params
object

Response

200 - */*

OK

The response is of type object.