Get Activity Stream

Returns a Collection of ActivityResponse objects.

require 'uri'
require 'net/http'

url = URI("https://api.opentransact.com/v1/activities?filter[application-id]=#{APPLICATION_ID}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = "Bearer #{API_KEY}"

response = http.request(request)
puts response.read_body
curl --request GET \
  --url https://api.opentransact.com/v1/activities?filter[application-id]=$APPLICATION_ID \
  --header 'authorization: Bearer $API_KEY'

Filter Activity Stream for Specific Subject Types

Returns a Collection of ActivityResponse objects

The following will return activity stream events only related to transactions:

require 'uri'
require 'net/http'

url = URI("https://api.opentransact.com/v1/activities?filter[application-id]=#{APPLICATION_ID}&filter[subject-type]=transactions")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["authorization"] = "Bearer #{API_KEY}"

response = http.request(request)
puts response.read_body
curl --request GET \
  --url https://api.opentransact.com/v1/activities?filter[application-id]=$APPLICATION_ID&filter[subject-type]=transactions \
  --header 'authorization: Bearer $API_KEY'