Skip to content

examples: support all client endpoints#1

Open
zchee wants to merge 1 commit intomainfrom
codex/update-main.go-for-all-abm-endpoints
Open

examples: support all client endpoints#1
zchee wants to merge 1 commit intomainfrom
codex/update-main.go-for-all-abm-endpoints

Conversation

@zchee
Copy link
Owner

@zchee zchee commented Feb 18, 2026

Motivation

  • The example CLI only demonstrated GetOrgDevices, which made it hard to exercise and validate the rest of the ABM client surface.
  • Provide a single, discoverable example program that can call every exposed ABM endpoint for development and testing.

Description

  • Added an -endpoint driven CLI with constants for each supported endpoint and a runEndpoint dispatcher that covers all client methods (org devices, single device, AppleCare coverage, MDM servers, MDM-server device linkages, assigned-server linkage/details, create activity, get activity, and paginated part-number fetch).
  • Added endpoint-specific flags (-org-device-id, -mdm-server-id, -org-device-activity-id, -fields, -limit, -activity-type, -activity-device-ids) and an optional -api-base-url override, plus usage text that documents supported endpoint values.
  • Implemented request assembly for create-org-device-activity (relationships payload builder) and a shared CSV parsing helper (splitCommaList), and kept all endpoint outputs as formatted JSON.
  • Created and recorded an ExecPlan at .agent/PLANS.md describing the work performed and updated the example to use golang.org/x/oauth2 TokenSource when creating the client.

Testing

  • Ran gofmt -s -w examples/main.go successfully.
  • Ran go test ./... and all tests passed.
  • Attempted gopls version in this environment but gopls is not available here.
  • Saved the ExecPlan to .agent/PLANS.md to track the implementation steps; commit was made with --signoff because a GPG signing key was not available in the environment.

Codex Task

Signed-off-by: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant