Skip to content

Expose all new API functions as CLI commands#4

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/add-usage-client-commands
Draft

Expose all new API functions as CLI commands#4
Copilot wants to merge 3 commits into
masterfrom
copilot/add-usage-client-commands

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 8, 2025

46 functions in client.ss were implemented but not exposed through the CLI interface in dda.ss.

Changes

Added CLI commands for:

  • Usage/Metrics (5): get-timeseries-usage, get-top-avg-metrics, edit-metric-metadata, tags-for-metric, tags-for-source
  • Comments (3): create-comment, edit-comment, delete-comment
  • Events (3): get-event, delete-event, submit-event
  • Boards (8): tboard, delete-tboard, delete-sboard, share-sboard, revoke-sboard-share, screen-create, screen-update
  • Embeds (5): get-all-embeds, create-embed, get-embed, enable-embed, revoke-embed
  • Monitors (5): mute-monitor, unmute-monitor, mute-all-monitors, unmute-all-monitors, bulk-resolve-monitors
  • Hosts (3): mute-host, unmute-host, update-host-tags
  • Users (2): get-user, update-user
  • Other (2): downtimes, post-check-run

Each command includes:

  1. Command definition with help text and typed arguments
  2. Registration in call-with-getopt list
  3. Case handler in process-args with parameter mapping

Example

;; Command definition
(def get-timeseries-usage
  (command 'get-timeseries-usage help: "Get hourly usage for custom metrics"
    (argument 'start help: "Start date in YYYY-MM-DD format")
    (argument 'end help: "End date in YYYY-MM-DD format")))

;; Case handler with parameter forwarding
((get-timeseries-usage)
 (get-timeseries-usage .start .end))

Additional Fixes

  • Corrected billing help text for to-date parameter
  • Added type conversions: string->number for status codes, string-split for comma-separated lists
Original prompt

This section details on the original issue you should resolve

<issue_title>Add usage and client commands for all new functions</issue_title>
<issue_description>Please expose all new functions and commands to usage and update the jira.ss</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 8, 2025 23:05
Co-authored-by: ober <169890+ober@users.noreply.github.com>
Co-authored-by: ober <169890+ober@users.noreply.github.com>
Copilot AI changed the title [WIP] Add usage and client commands for new functions Expose all new API functions as CLI commands Dec 8, 2025
Copilot AI requested a review from ober December 8, 2025 23:15
@ober ober force-pushed the copilot/add-usage-client-commands branch from 40e162e to e61fc4f Compare December 20, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add usage and client commands for all new functions

2 participants