> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Signals API

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/fusion-server/reference/api/signals-api

[mintlify link]: https://doc.lucidworks.com/docs/4/fusion-server/reference/api/signals-api

[old doc.lw link]: https://doc.lucidworks.com/fusion-server/4.2/314

The Signals API accepts a set of [signals](/docs/4/fusion-ai/concepts/signals-and-aggregations/signals/types-and-structures), encoded as JSON objects, for indexing into a signals collection.

<Note>
  This API requires a [Fusion AI license](/docs/4/fusion-ai/reference/licensing).
</Note>

Normally, signals are indexed just like ordinary documents, through a configured datasource and index pipeline. This API is provided for cases where it is more convenient to index signals directly.

To aggregate signals, use a [SQL aggregation](/docs/4/fusion-ai/concepts/signals-and-aggregations/aggregations/sql-aggregations) job, which is a kind of [Spark job](/docs/4/fusion-server/concepts/jobs/spark-jobs).

<Tip>
  You can manage aggregation jobs in the [Jobs manager](/docs/4/fusion-server/concepts/jobs/overview) and [Scheduler](/docs/4/fusion-server/concepts/jobs/overview) in the Admin UI, or with the [Spark jobs API](/docs/4/fusion-server/reference/api/spark-jobs-api). We recommend using the Admin UI.
</Tip>

See [Signal types and structure](/docs/4/fusion-ai/concepts/signals-and-aggregations/signals/overview) to learn how to send well-formed signals to this API.

<LwTemplate />

## Examples

*Send two signal events to record user clicks:*

**REQUEST**

```bash wrap  theme={"dark"}
curl \
 -u USERNAME:PASSWORD -X POST -H 'Content-type:application/json' -d @- \
https://FUSION_HOST:8764/api/signals/docs?commit=true \
<<EOF
[
 {"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"
 }
]
EOF
```

A successful request results in events being added to the signals collection.
For the above example, the events will be represented as follows:

```json wrap  expandable  theme={"dark"}
 {
  "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
      }
    ]
  }
}
```
