Feeds API reference

Complete reference for the Feeds API

Get feeds overview

Overview showing number of batches, aggregates and events per aggregate type.

Example

curl -i \
  --header "Serialized-Access-Key: <YOUR_ACCESS_KEY>" \
  --header "Serialized-Secret-Access-Key: <YOUR_SECRET_ACCESS_KEY>" \
  https://api.serialized.io/feeds
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Response;

Client client = ClientBuilder.newClient();
  URI apiRoot = URI.create("https://api.serialized.io");

  Map response = client.target(apiRoot)
  .path("feeds")
  .request()
  .header("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
  .header("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>")
  .get(Map.class);
using RestSharp;
using System;

var client = new RestClient("https://api.serialized.io");

var request = new RestRequest("feeds", Method.GET)
   .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>",
    "Serialized-Secret-Access-Key": "<YOUR_SECRET_ACCESS_KEY>"
  }
});

client.get("feeds")
  .then(function (response) {
    // Handle response
  })
  .catch(function (error) {
    // Handle error
  });

Get feed of events

Get all events for all aggregates given a type (feed name). The payload is returned with the event batches in insertion order, each with a unique sequence number.

Example

curl -i \
  --header "Serialized-Access-Key: <YOUR_ACCESS_KEY>" \
  --header "Serialized-Secret-Access-Key: <YOUR_SECRET_ACCESS_KEY>" \
  https://api.serialized.io/feeds/order
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Response;

Client client = ClientBuilder.newClient();
  URI apiRoot = URI.create("https://api.serialized.io");

  Map response = client.target(apiRoot)
  .path("feeds")
  .path("order")
  .request()
  .header("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
  .header("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>")
  .get(Map.class);
using RestSharp;
using System;

var client = new RestClient("https://api.serialized.io");

var request = new RestRequest("feeds/{feedName}", Method.GET)
   .AddUrlSegment("feedName", "order")
   .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>",
    "Serialized-Secret-Access-Key": "<YOUR_SECRET_ACCESS_KEY>"
  }
});

client.get("feeds/order")
  .then(function (response) {
    // Handle response
  })
  .catch(function (error) {
    // Handle error
  });

Get current sequence number

Get current sequence number for a feed.

Example

curl -I \
  --header "Serialized-Access-Key: <YOUR_ACCESS_KEY>" \
  --header "Serialized-Secret-Access-Key: <YOUR_SECRET_ACCESS_KEY>" \
  https://api.serialized.io/feeds/order
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Response;

Client client = ClientBuilder.newClient();
  URI apiRoot = URI.create("https://api.serialized.io");

  Response response = client.target(apiRoot)
  .path("feeds")
  .path("order")
  .request()
  .header("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
  .header("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>")
  .head();

  String globalSequenceNumber = (String) response.getHeaders()
  .getFirst("Serialized-SequenceNumber-Current");
using RestSharp;
using System;

var client = new RestClient("https://api.serialized.io");

var request = new RestRequest("feeds/order")
   .AddHeader("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
   .AddHeader("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>");

var aggregateResponse = client.Head(request);
const axios = require("axios");

const client = axios.create({
  baseURL: "https://api.serialized.io",
  headers: {
    "Serialized-Access-Key": "<YOUR_ACCESS_KEY>",
    "Serialized-Secret-Access-Key": "<YOUR_SECRET_ACCESS_KEY>"
  }
});

client.head("feeds/order")
  .then(function (response) {
    // Handle response
  })
  .catch(function (error) {
    // Handle error
  });

Get events from all feeds

Get all events for all aggregates for all types (feed names). The payload is returned with the event batches in insertion order, each with a unique sequence number.

Example

curl -i \
  --header "Serialized-Access-Key: <YOUR_ACCESS_KEY>" \
  --header "Serialized-Secret-Access-Key: <YOUR_SECRET_ACCESS_KEY>" \
  https://api.serialized.io/feeds/_all
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Response;

Client client = ClientBuilder.newClient();
  URI apiRoot = URI.create("https://api.serialized.io");

  Map response = client.target(apiRoot)
  .path("feeds")
  .path("_all")
  .request()
  .header("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
  .header("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>")
  .get(Map.class);
using RestSharp;
using System;

var client = new RestClient("https://api.serialized.io");

var request = new RestRequest("feeds/_all", Method.GET)
   .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>",
    "Serialized-Secret-Access-Key": "<YOUR_SECRET_ACCESS_KEY>"
  }
});

client.get("feeds/_all")
  .then(function (response) {
    // Handle response
  })
  .catch(function (error) {
    // Handle error
  });

Get current global sequence number

Get current global sequence number at head for all feeds. Note that since this is a HEAD request the value is returned as an HTTP header (Serialized-SequenceNumber-Current).

Example

curl -i \
  --header "Serialized-Access-Key: <YOUR_ACCESS_KEY>" \
  --header "Serialized-Secret-Access-Key: <YOUR_SECRET_ACCESS_KEY>" \
  https://api.serialized.io/feeds/_all
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Response;

Client client = ClientBuilder.newClient();
  URI apiRoot = URI.create("https://api.serialized.io");

  Map response = client.target(apiRoot)
  .path("feeds")
  .path("_all")
  .request()
  .header("Serialized-Access-Key", "<YOUR_ACCESS_KEY>")
  .header("Serialized-Secret-Access-Key", "<YOUR_SECRET_ACCESS_KEY>")
  .get(Map.class);
using RestSharp;
using System;

var client = new RestClient("https://api.serialized.io");

var request = new RestRequest("feeds/_all", Method.GET)
   .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>",
    "Serialized-Secret-Access-Key": "<YOUR_SECRET_ACCESS_KEY>"
  }
});

client.get("feeds/_all")
  .then(function (response) {
    // Handle response
  })
  .catch(function (error) {
    // Handle error
  });