Skip to content

feat(FDSE-3324): add directory and usage modular inputs - #48

Open
Arthur-10-coder wants to merge 1 commit into
mainfrom
FDSE-3324-directory-inputs-and-usage
Open

feat(FDSE-3324): add directory and usage modular inputs#48
Arthur-10-coder wants to merge 1 commit into
mainfrom
FDSE-3324-directory-inputs-and-usage

Conversation

@Arthur-10-coder

Copy link
Copy Markdown
Contributor

Summary

  • Adds 5 new modular inputs to the Genesys Cloud TA: users_directory, queues_directory, usage_events, org_usage, and oauth_client_usage
  • Directory inputs provide daily full-snapshot ingestion for lookup-table correlation (user/queue ID → human-readable name)
  • Usage inputs replace the deprecated POST /api/v2/usage/query and POST /api/v2/oauth/clients/{clientId}/usage/query endpoints (removal deadline: Oct 16, 2026)

Context

Jira: https://splunk.atlassian.net/browse/FDSE-3324
Customer: Hydro One — needs user/queue ID correlation in Splunk dashboards
Approach approved by: @epescio (Erica Pescio), @ahoang (Ashley Hoang)

Changes

File Description
globalConfig.json +5 input definitions (UCC framework) with 86400s default interval
package/bin/users_directory_helper.py GET /api/v2/users → sourcetype genesyscloud:directory:users
package/bin/queues_directory_helper.py GET /api/v2/routing/queues → sourcetype genesyscloud:directory:queues
package/bin/usage_events_helper.py POST /api/v2/usage/events/query → sourcetype genesyscloud:usage:events
package/bin/org_usage_helper.py POST /api/v2/usage/aggregates/query/jobs → sourcetype genesyscloud:usage:organization
package/bin/oauth_client_usage_helper.py POST /api/v2/usage/client/{id}/aggregates/query/jobs → sourcetype genesyscloud:usage:oauth_clients

Technical Notes

  • All inputs follow existing helper pattern (UCC modular input + genesyscloud_client.py)
  • Directory inputs: no checkpointing needed (full snapshot each run)
  • Usage inputs: KVStore checkpointing for incremental ingestion; async job polling pattern for aggregate endpoints
  • OAuth scopes required: users:readonly, routing:readonly, usage:readonly
  • SDK v238 required for new endpoint support

Follow-up (separate PR)

  • Custom Search Commands (| genesysusers, | genesysqueues) will be added to genesys_cloud_app_for_splunk — these live in the App, not the TA, per architectural decision with Erica

Test plan

  • python3 -c "import py_compile; py_compile.compile('file.py', doraise=True)" — all new files pass syntax check
  • ucc-gen build — verify globalConfig.json produces valid output
  • Functional test with mock Genesys API (json-server or similar)
  • Deploy to dev Splunk instance and configure new inputs
  • Verify sourcetypes and events indexed correctly
  • Verify pagination works for orgs with 500+ users/queues

Implements the official solution approved by Ashley Hoang and Erica Pescio:
- users_directory: GET /api/v2/users snapshot (genesyscloud:directory:users)
- queues_directory: GET /api/v2/routing/queues snapshot (genesyscloud:directory:queues)
- usage_events: POST /api/v2/usage/events/query (genesyscloud:usage:events)
- org_usage: POST /api/v2/usage/aggregates/query/jobs (genesyscloud:usage:organization)
- oauth_client_usage: POST /api/v2/usage/client/{id}/aggregates/query/jobs (genesyscloud:usage:oauth_clients)

The usage inputs replace the deprecated POST /api/v2/usage/query endpoints
scheduled for removal on Oct 16, 2026. Directory inputs use daily snapshots
(86400s interval) to provide lookup-compatible ID-to-name correlation data.

Ref: https://splunk.atlassian.net/browse/FDSE-3324
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.

1 participant