Delete/recreate Aggregated Projections

delete
Delete/recreate Aggregated Projections

https://api.serialized.io/projections/aggregated/{projectionName}
Delete/recreate aggregated projections. This call deletes all existing projections and starts a rebuild from the beginning of the event history.
Request
Response
Path Parameters
projectionName
required
string
The projection name
200: OK
Projections successfully deleted.
404: Not Found
Projection not found

Keep in mind that the rebuilding of projections can take some time if you have a large amount of events.

Example

cURL
Java
C#
Node
curl -i \
--header "Serialized-Access-Key: <YOUR_ACCESS_KEY>" \
--header "Serialized-Secret-Access-Key: <YOUR_SECRET_ACCESS_KEY>" \
-X DELETE https://api.serialized.io/projections/aggregated/order-totals
import com.google.common.collect.ImmutableMap;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
Client client = ClientBuilder.newClient();
URI apiRoot = URI.create("https://api.serialized.io");
Response response = client.target(apiRoot)
.path("projections")
.path("aggregated")
.path("order-totals")
.request()
.header("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
.header("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>")
.delete();
using RestSharp;
using System;
var client = new RestClient("https://api.serialized.io");
var request = new RestRequest("projections/aggregated/{projectionName}", Method.DELETE)
.AddUrlSegment("projectionName", "order-totals")
.AddHeader("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
.AddHeader("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>");
var response = client.Execute<Dictionary<string, Object>>(request);
const axios = require("axios");
const client = axios.create({
baseURL: "https://api.serialized.io",
headers: {"Serialized-Access-Key": "<YOUR_ACCESS_KEY>"},
headers: {"Serialized-Secret-Access-Key": "<YOUR_SECRET_ACCESS_KEY>"}
});
client.delete("projections/aggregated/order-totals")
.then(function (response) {
// Handle response
})
.catch(function (error) {
// Handle error
});