feat(FDSE-3324): add directory and usage modular inputs - #48
Arthur-10-coder wants to merge 3 commits into
Conversation
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
d3b7680 to
8974d2b
Compare
edro15
left a comment
There was a problem hiding this comment.
@Arthur-10-coder Please have a look at these changes and comments.
| - [Configure an integration application in Genesys Cloud for the Genesys Cloud Add-on for Splunk](../ConfigureGenesysCloud/index.md) | ||
| - [Configure an account in the Genesys Cloud Add-on for Splunk](../ConfigureAccount/index.md) | ||
|
|
||
| **OAuth scopes required (for usage inputs):** `usage:readonly` |
There was a problem hiding this comment.
| **OAuth scopes required (for usage inputs):** `usage:readonly` |
Please move this information to the table at docs/ConfigureGenesysCloud/index.md. ALL necessary permissions for ALL inputs MUST be added to that table following given format
| ## Usage Inputs Reference | ||
|
|
||
| | Input | API Endpoint | Sourcetype | | ||
| |-------|-------------|------------| | ||
| | `operational_events` | `POST /api/v2/usage/events/query` | `genesyscloud:operational:events` | | ||
| | `org_api_usage` | `POST /api/v2/usage/aggregates/query/jobs` | `genesyscloud:operational:usage:api` | | ||
| | `clients_api_usage` | `POST /api/v2/usage/client/{id}/aggregates/query/jobs` | `genesyscloud:operational:usage:clients_api` | |
There was a problem hiding this comment.
| ## Usage Inputs Reference | |
| | Input | API Endpoint | Sourcetype | | |
| |-------|-------------|------------| | |
| | `operational_events` | `POST /api/v2/usage/events/query` | `genesyscloud:operational:events` | | |
| | `org_api_usage` | `POST /api/v2/usage/aggregates/query/jobs` | `genesyscloud:operational:usage:api` | | |
| | `clients_api_usage` | `POST /api/v2/usage/client/{id}/aggregates/query/jobs` | `genesyscloud:operational:usage:clients_api` | |
This is not aligned with other inputs documentation. To be removed.
- Fix usage helpers to use valid SDK v238 UsageApi methods/models (post_usage_query, post_usage_aggregates_query_jobs, post_usage_client_client_id_aggregates_query_jobs and their results) - Pass request body as 'body' kwarg so path params (client_id) work - Make max_poll_attempts/poll_interval_seconds configurable per input - Rename sourcetypes/titles to operational:* convention - Clean input titles/descriptions, add poll fields, group in operational menu - Consolidate OAuth scopes and document new inputs - Add integration/functional tests and mock routes for the new inputs
7ae144b to
c9f4372
Compare
Update: review feedback applied + CI root cause fixedPushed CI failure root cause (the 3 failing
Verified locally against Mockoon + SDK 238: integration suite 26/26 passing (previously 3 failed / 20 passed). Review comments addressed.
Note on scope: this revision keeps the |
Summary
users_directory,queues_directory,usage_events,org_usage, andoauth_client_usagePOST /api/v2/usage/queryandPOST /api/v2/oauth/clients/{clientId}/usage/queryendpoints (removal deadline: Oct 16, 2026)Context
Jira: https://splunk.atlassian.net/browse/FDSE-3324
Changes
globalConfig.jsonpackage/bin/users_directory_helper.pyGET /api/v2/users→ sourcetypegenesyscloud:directory:userspackage/bin/queues_directory_helper.pyGET /api/v2/routing/queues→ sourcetypegenesyscloud:directory:queuespackage/bin/usage_events_helper.pyPOST /api/v2/usage/events/query→ sourcetypegenesyscloud:usage:eventspackage/bin/org_usage_helper.pyPOST /api/v2/usage/aggregates/query/jobs→ sourcetypegenesyscloud:usage:organizationpackage/bin/oauth_client_usage_helper.pyPOST /api/v2/usage/client/{id}/aggregates/query/jobs→ sourcetypegenesyscloud:usage:oauth_clientsTechnical Notes
genesyscloud_client.py)users:readonly,routing:readonly,usage:readonlyFollow-up (separate PR)
| genesysusers,| genesysqueues) will be added togenesys_cloud_app_for_splunk— these live in the App, not the TA, per architectural decision