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

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

const response = await client.campaignBandits.listBanditDecisions({
  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>",
      "banditId": "<string>",
      "workflowScheduleId": "<string>",
      "firingId": "<string>",
      "runId": "<string>",
      "chosenArmId": "<string>",
      "chosenAgentVersionId": "<string>",
      "greedyArmId": "<string>",
      "selectionProbability": 123,
      "wasExploration": true,
      "explorationCapped": true,
      "candidateArmIds": [
        "<string>"
      ],
      "ineligible": [
        {
          "armId": "<string>"
        }
      ],
      "armProbabilities": {},
      "sampledScores": {},
      "features": {
        "featureSchemaVersion": 123,
        "raw": {
          "recentMedianImpressions": 123,
          "timezone": "<string>",
          "payload": {}
        },
        "drift": [
          {
            "key": "<string>",
            "value": "<string>"
          }
        ]
      },
      "policyVersion": "<string>",
      "voidReason": "<string>",
      "createdAt": "<string>",
      "choiceSnapshot": {
        "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "promptRevision": 123,
        "prompt": "<string>",
        "targetSocialAccountIds": [
          "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        ],
        "armId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    }
  ]
}

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).

workflowScheduleId
string

Only decisions of this workflow schedule (UUID).

Response

Success

data
object[]
required