GET
/
v1
/
teams
/
{teamId}
/
campaigns
/
{campaignId}
/
bandits
/
{banditId}
/
observations
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.campaignBandits.listBanditObservations({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  campaignId: process.env.OCTOSPARK_CAMPAIGN_ID ?? "campaignId",
  banditId: process.env.OCTOSPARK_BANDIT_ID ?? "banditId",
  query: {},
})
{
  "data": [
    {
      "id": "<string>",
      "decisionId": "<string>",
      "armId": "<string>",
      "postId": "<string>",
      "impressions": 123,
      "reward": 123,
      "matureAt": "<string>",
      "components": {
        "formulaVersion": "<string>",
        "exposure": 123,
        "exposureBasis": "<string>",
        "likes": 123,
        "comments": 123,
        "shares": 123,
        "saves": 123,
        "clicks": 123,
        "completionRate": 123,
        "weightedEngagement": 123,
        "normalisedScore": 123,
        "scheduledPostIds": [
          "<string>"
        ],
        "checkpointHours": 123,
        "accountMeasurements": [
          {
            "accountId": "<string>",
            "scheduledPostId": "<string>",
            "checkpointHours": 123,
            "impressions": 123,
            "views": 123,
            "likes": 123,
            "comments": 123,
            "shares": 123
          }
        ]
      },
      "createdAt": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

campaignId
string
required

Campaign id (UUID): a named group of managed agents and their workflow schedules.

banditId
string
required

Campaign bandit id (UUID), as returned by the list campaign bandits endpoint.

Query Parameters

limit
string

a string to be decoded into a number

before
string

ISO instant: only rows created before it (cursor for the next page).

Response

Success

data
object[]
required