Skip to content

sp app ​

When agents use this: Resolve appId, check agent connectivity, register a service, or list recent replay plans for an app.

Synopsis ​

List, create, and inspect Softprobe applications. An application is a registered service; recording, replay, and policies are scoped by appId. See Concepts — Application.

Use --json on all subcommands. See Output contract.

Subcommands ​

SubcommandArgsDescription
list—Applications visible to the caller, with agent status
create<appName>Register a new application (server assigns appId)
status<appId>Agent connectivity for one application
replays<appId>Recent replay plans (--limit)

list ​

bash
sp app list --json

REST: GET /api/applications/list

Requires a token when --json is set (CLI exits with an auth error if SP_TOKEN is unset). Results are filtered by user group, ownership, and cross-group grants; see Authentication.

JSON output ​

data.items is an array of list rows. Each row merges app config with live agent status (heartbeat threshold defaults to 60s → offline).

FieldDescription
appIdStable id for agent config and other sp commands
appName, nameDisplay name
agentStatusonline, degraded, offline or never — see status
lastSeenAtUnix ms, freshest instance heartbeat
agentVersionAgent build string
envPrimary env tag, or production
tagsFlattened tag values
worktreeDirectoryOptional workspace path
json
{
  "ok": true,
  "command": "app list",
  "data": {
    "items": [
      {
        "appId": "a1b2c3d4e5f67890",
        "appName": "order-service",
        "agentStatus": "online",
        "lastSeenAt": 1747564800000
      }
    ]
  }
}

create ​

bash
sp app create order-service-staging --json

REST: POST /api/applications/create

appName must be unique. The CLI sends { "appName": "<arg>" }; the server may set owners from the JWT when omitted.

Request body (REST) ​

FieldRequiredDescription
appNameYesUnique name (CLI positional)
ownersNoOwner user names; defaults to current user
visibilityLevelNo0 public, 1 private
groupId, groupNameNoUser group assignment

JSON output ​

FieldDescription
successWhether creation succeeded
appIdGenerated id — use in agent and sp replay run --app
msgDetail when success is false
json
{
  "ok": true,
  "command": "app create",
  "data": {
    "success": true,
    "appId": "f3e2d1c0b9a87654"
  }
}

status ​

bash
sp app status f3e2d1c0b9a87654 --json

REST: GET /api/applications/{appId}/agent-status

Aggregates JVM instance heartbeats for the app. status reflects the freshest instance:

ValueMeaning
neverNo instance record right now (records expire about 3 minutes after the last heartbeat)
onlineLatest heartbeat within the threshold (60 seconds by default)
degradedOnline, but at least one instance with a fresh heartbeat is rate-limited or degraded
offlineInstance records exist, but no heartbeat within the threshold
FieldDescription
appIdApplication id
statusnever, online, degraded or offline
instanceCountInstances with a heartbeat within the threshold
lastSeenAtUnix ms
agentVersionFrom freshest instance
json
{
  "ok": true,
  "command": "app status",
  "data": {
    "appId": "f3e2d1c0b9a87654",
    "status": "online",
    "instanceCount": 2,
    "lastSeenAt": 1747564800000
  }
}

replays ​

bash
sp app replays f3e2d1c0b9a87654 --limit 10 --json

REST: GET /api/applications/{appId}/replays/recent?limit=N

FlagDefaultDescription
--limit5Max plans (CLI rejects < 1; values above 100 are clamped to 100; server also clamps 1–100)

data is an array of plan summaries (planId, planName, status, case counts, createTime, triggeredBy, …). Use planId with sp replay and replay case.

JSON output ​

json
{
  "ok": true,
  "command": "app replays",
  "data": {
    "items": [
      {
        "planId": "plan-6644220011",
        "planName": "nightly-regression-20260904",
        "status": 3,
        "totalCaseCount": 42,
        "replayCaseCount": 42,
        "successCaseCount": 40,
        "failCaseCount": 2,
        "createTime": 1747564800000,
        "triggeredBy": "ci-pipeline"
      }
    ]
  }
}

REST mapping ​

SubcommandMethodPath
listGET/api/applications/list
createPOST/api/applications/create
statusGET/api/applications/{appId}/agent-status
replaysGET/api/applications/{appId}/replays/recent

Header: access-token: <JWT>.

Replaces sp_api ​

sp_api endpointsp command
list_applicationssp app list
agent_statussp app status
recent_replayssp app replays

Capture Sessions · Review Steps · Improve what matters