Cased

Cased developer and API documentation

Add a comprehensive, high-signal, and tamper-proof audit trail to any application in minutes. Give your compliance, security, and customer support teams the information they need.

Publish your first audit trail event

Learn how to use cURL or your preferred SDK to publish your first audit trail events.

We were able to publish our first audit trail event in three minutes.
Cased Customer

1. Create your account

If you haven't already done so, create your Cased account here.

2. Find your API keys

Navigate to Settings > API Keys and copy the publish API key for the audit trail that was created for you when you created your account.

📘

Test and live mode

Cased provides a test and a live mode. You'll want to confirm that you are in test mode using the toggle in the main navigation when retrieving your API keys for this tutorial.

3. Publish your first event

Replace the example API key below with your test API key and run the snippet. Opening a terminal and running the following cURL command can be the easiest way to publish your first event.

curl -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer publish_test_YOUR_API_KEY' \
     -d '{"action": "test.event"}' \
     -X POST https://publish.cased.com
import { config, Event } from "cased";

config.publishKey = "publish_test_YOUR_API_KEY";

await Event.publish({
  action: "user.login",
  actor: "[email protected]",
  actor_id: "user_1dsGU7u7FlTNOucMceGV6wq1CXK",
  http_user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36",
  http_url: "https://app.cased.com",
  http_method: "GET",
  language: "en-US"
})
require 'cased'

Cased.configure do |config|
  config.publish_key = "publish_test_YOUR_API_KEY"
end

Cased.publish(
  action: "user.login",
  actor: "[email protected]",
  actor_id: "user_1dsGU7u7FlTNOucMceGV6wq1CXK",
  http_user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36",
  http_url: "https://app.cased.com",
  http_method: "GET",
  language: "en-US"
)
require 'cased-rails'

Cased.configure do |config|
  config.publish_key = "publish_test_YOUR_API_KEY"
end

class User < ApplicationRecord
  after_create_commit :publish_cased_create

  def publish_cased_create
    cased(:create)
  end
end
import cased

cased.publish_key = "publish_test_YOUR_API_KEY"

cased.Event.publish({
  "action": "user.login",
  "actor": "[email protected]",
  "actor_id": "user_1dsGU7u7FlTNOucMceGV6wq1CXK",
  "http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36",
  "http_url": "https://app.cased.com",
  "http_method": "GET",
  "language": "en-US"
})
import cased

cased.publish_key = "publish_test_YOUR_API_KEY"

class User(models.Model, CasedModelEvent):
    @property
    def cased_payload(self):
        return {"user": self.email}
children = [
  {
    Cased.Publisher.HTTP,
    key: "publish_test_YOUR_API_KEY",
  }
]

Supervisor.start_link(children, strategy: :one_for_one)

%{
  action: "user.login",
  actor: "[email protected]",
  actor_id: "user_1dsGU7u7FlTNOucMceGV6wq1CXK",
  http_user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36",
  http_url: "https://app.cased.com",
  http_method: "GET",
  language: "en-US"
}
|> Cased.publish()

📘

https://publish.cased.com is the sub-domain used to publish events to Cased.

4. View your event in Cased

Cased provides a user friendly interface, where you can search, filter, or export audit trail data. After successfully publishing your first event navigate to your Cased Dashboard. Select the audit trail you published your test event to, keeping an eye out to make sure you're Viewing test data in the main navigation.

Questions? Contact us.
FAQ

Updated 15 days ago



Publish your first audit trail event


Learn how to use cURL or your preferred SDK to publish your first audit trail events.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.