在 Algolia 中使用 API REST 推送数据

Push Data with API REST in Algolia

我正在学习使用 angolia,但我对此有疑问。是否可以使用 API REST 将数据推送到索引?

我只看到使用 API 客户端,为 Javascript 和 npm 安装,但我不想安装它。

我想要的是这样的:

    curl -X POST 'https://places-dsn.algolia.net/1/places/query' \
  -H 'X-Algolia-Application-Id: YourApplicationId' \
  -H 'X-Algolia-API-Key: YourAPIKey' \
  --data '{"query": "Paris"}

有 RESTful API 可用,但 there is no SLA when using it directly.

这是一个例子:

curl -X POST \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --data-binary '{ "params": "query=Paris" }' \
     "https://${APPLICATION_ID}-dsn.algolia.net/1/indexes/${INDEX_NAME}/query"

View the API documentation.