Menu
Public documentation

Cloud Upload API

Cloud Upload API

The CLI uploads findings to workbench through the Cloud upload API.

Most users should use:

roleplay upload latest
roleplay upload all

This reference is for users integrating custom upload flows.

Authentication

Uploads require a workbench project and project-scoped API key created in onboarding or Monitor.

Pass the key through:

ROLEPLAY_API_KEY=<key>

Or:

roleplay upload latest --api-key <key>

Upload Modes

Supported modes:

  • sanitized_findings
  • full_transcript_opt_in

Sanitized mode is the default.

Payload Shape

Top-level fields:

FieldRequiredDescription
projectIdyesworkbench project ID.
modenoUpload mode. Defaults to sanitized_findings.
sourcenoci or local. Defaults to local.
branchnoBranch name.
commitnoCommit SHA.
buildUrlnoCI build URL. Must be HTTP or HTTPS.
environmentnoEnvironment label.
targetAgentnoTarget agent name.
attackPackIdnoAttack-pack ID.
attackPackScenarionoAttack-pack scenario name.
run.reportyesReport object.
run.transcriptfull transcript mode onlyTranscript object.
run.scenarioYamlfull transcript mode onlyRaw scenario YAML.
run.metadatafull transcript mode onlyRun metadata.

Report Requirements

run.report must include:

  • runId
  • scenario
  • status: passed, failed, or warning
  • score: 0 to 100
  • summary
  • criteria
  • failures
  • recommendations
  • startedAt
  • endedAt

startedAt and endedAt must be valid dates. endedAt must be after or equal to startedAt.

If status is passed, failures must be empty.

If status is failed or warning, failures must include at least one finding.

Duplicate failures are rejected.

Full Transcript Restrictions

When mode is sanitized_findings, the payload must not include:

  • run.transcript
  • run.scenarioYaml
  • run.metadata

When mode is full_transcript_opt_in, run.transcript is required and must match the report run ID and scenario name.

Credential Verification

The CLI verifies full transcript policy before reading or sending full evidence.

Use:

roleplay doctor --cloud --project <project-id> --api-key <key>