Guides
/
Sending and managing data
/
Send and update your data
/
Connectors
Dec 11, 2024
Push to Algolia
On this page
The Push Connector allows your API implementations to benefit from transformations defined in the Algolia UI by using our API clients.
Get started
- Go to the Algolia dashboard and select your Algolia application.
- On the left sidebar, select Data sources.
- On the Connectors page, select the Push to Algolia connector, and click Connect.
- Configure your transformation: create a new transformation or reuse an existing one.
- Configure your destination: create a new destination or select an existing one.
- Create the task. This will generate a dedicated endpoint for you to push data to Algolia.
You can now use the PushTask API to push data to Algolia.
Test your endpoint
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using Algolia.Search.Clients;
using Algolia.Search.Http;
using Algolia.Search.Models.Ingestion;
var client = new IngestionClient(
new IngestionConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
);
var response = await client.PushTaskAsync(
"6c02aeb1-775e-418e-870b-1faccd4b2c0f",
new PushTaskPayload
{
Action = Enum.Parse<Action>("AddObject"),
Records = new List<PushTaskRecords>
{
new PushTaskRecords
{
ObjectID = "o",
AdditionalProperties = new Dictionary<string, object>
{
{ "key", "bar" },
{ "foo", "1" },
},
},
new PushTaskRecords
{
ObjectID = "k",
AdditionalProperties = new Dictionary<string, object>
{
{ "key", "baz" },
{ "foo", "2" },
},
},
},
}
);
Performance considerations
If you don’t need an Algolia-managed transformation step in your pipeline, prefer using the traditional way of sending records to Algolia instead, as using the Push Connector adds overhead to your ingestion process.
Debugging
You can debug and track the progress of your push
operations by:
- Observing the incoming events in the Connector Debugger page of the Algolia dashboard.
- Enabling synchronous operations by providing a
watch
parameter to your API call. Errors and successes will be reported in the response body.
Did you find this page helpful?