Skip to main content

signaloid-cli drives list

List all virtual drives.

Synopsis

signaloid-cli drives list [options]

Description

Lists all virtual drives in your Signaloid account. Supports both table and JSON output formats with optional pagination and column customization.

Options

OptionDescription
--start-key <key>Pagination cursor token from previous response
--count <n>Number of items to fetch using pagination
--format <type>Output format: json or table (default: table)
--columns <cols>Comma-separated list of columns or help to see available columns

Output

Table Format

DriveID              Name                DataSources    Created
drive-abc123 Production Drive 2 sources 2025-01-15
drive-def456 Test Drive 1 source 2025-01-20

JSON Format

{
"Drives": [
{
"DriveID": "drive-abc123",
"Name": "Production Drive",
"DataSources": [
{
"ResourceID": "bucket-xyz",
"ResourceType": "Bucket",
"Location": "/"
}
],
"CreatedAt": "2025-01-15T10:30:00Z"
}
],
"ContinuationKey": "next_page_token"
}

Examples

List All Drives

# Table format
signaloid-cli drives list

# JSON format
signaloid-cli drives list --format json

Pagination

# Get first 10 drives
RESPONSE=$(signaloid-cli drives list --count 10 --format json)

# Get continuation key for next page
NEXT_KEY=$(echo $RESPONSE | jq -r '.ContinuationKey')

# Get next page
signaloid-cli drives list --start-key $NEXT_KEY --count 10

Column Customization

# See available columns
signaloid-cli drives list --columns help

# Select specific columns
signaloid-cli drives list --format table --columns DriveID,Name,CreatedAt

Complete Pagination Loop

#!/bin/bash
START_KEY=""
ALL_DRIVES=()

while true; do
if [ -z "$START_KEY" ]; then
RESPONSE=$(signaloid-cli drives list --count 50 --format json)
else
RESPONSE=$(signaloid-cli drives list --start-key "$START_KEY" --count 50 --format json)
fi

# Extract drives
DRIVES=$(echo $RESPONSE | jq -c '.Drives[]')
ALL_DRIVES+=($DRIVES)

# Check for more pages
START_KEY=$(echo $RESPONSE | jq -r '.ContinuationKey // empty')
[ -z "$START_KEY" ] && break
done

echo "Total drives: ${#ALL_DRIVES[@]}"

Exit Codes

CodeDescription
0Success
1Failed to list drives (authentication error, API error)

See Also