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

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

const response = await client.campaignBandits.listCampaignBandits({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  campaignId: process.env.OCTOSPARK_CAMPAIGN_ID ?? "campaignId",
})
{
  "data": [
    {
      "id": "<string>",
      "campaignId": "<string>",
      "isPrimary": true,
      "policyVersion": "<string>",
      "warmupPicks": 123,
      "explorationShare": 123,
      "featureSchema": {
        "version": 123,
        "base": "base.v1",
        "payloadFields": [
          {
            "key": "<string>",
            "kind": "categorical",
            "values": [
              "<string>"
            ]
          }
        ]
      },
      "revision": 123,
      "warmingUp": true,
      "warmupRemaining": 123,
      "chosenDecisionsTotal": 123,
      "matureObservations": 123,
      "winnerSuggestedArmId": "<string>",
      "winnerSuggestedAt": "<string>",
      "createdAt": "<string>",
      "arms": [
        {
          "id": "<string>",
          "agentId": "<string>",
          "agentVersionId": "<string>",
          "parentArmId": "<string>",
          "dailyCap": 123,
          "excluded": true,
          "picksTotal": 123,
          "observationsTotal": 123,
          "posteriorMean": 123,
          "intervalLower": 123,
          "intervalUpper": 123,
          "winProbability": 123,
          "createdAt": "<string>",
          "frozenAt": "<string>",
          "retiredAt": "<string>",
          "historical": true,
          "choiceIdentity": {
            "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "promptRevision": 123,
            "prompt": "<string>",
            "targetSocialAccountIds": [
              "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            ]
          }
        }
      ],
      "agentsWithoutArms": [
        {
          "agentId": "<string>",
          "agentName": "<string>",
          "currentVersionId": "<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.

Response

Success

data
object[]
required