Skip to content

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

Open
Arthur-10-coder wants to merge 5 commits 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 5 commits into
mainfrom
FDSE-3324-directory-inputs-and-usage

Conversation

@Arthur-10-coder

@Arthur-10-coder Arthur-10-coder commented Aug 7, 2026

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

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

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
@Arthur-10-coder
Arthur-10-coder force-pushed the FDSE-3324-directory-inputs-and-usage branch 2 times, most recently from d3b7680 to 8974d2b Compare August 11, 2026 21:22
Remove directory inputs (users, queues) per Erica's feedback — those
become CSCs in the App repo.  Keep only the 3 usage/operational inputs
with her naming convention, add mock routes, CI config, integration and
functional tests, docs, and bump version to 0.5.0.

@edro15 edro15 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arthur-10-coder Please have a look at these changes and comments.

Comment thread docs/ConfigureOperationalInputs/index.md Outdated
- [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`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**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

Comment thread docs/ConfigureOperationalInputs/index.md Outdated
Comment on lines +105 to +111
## 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` |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 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.

Comment thread docs/Sourcetypes/index.md
Comment on lines +18 to +20
| `genesyscloud:operational:events` | API usage event records (per-request detail) |
| `genesyscloud:operational:usage:api` | Organization-level API usage aggregates |
| `genesyscloud:operational:usage:clients_api` | Per-OAuth-client API usage aggregates |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `genesyscloud:operational:events` | API usage event records (per-request detail) |
| `genesyscloud:operational:usage:api` | Organization-level API usage aggregates |
| `genesyscloud:operational:usage:clients_api` | Per-OAuth-client API usage aggregates |
| `genesyscloud:operational:events` | All API usage event records |
| `genesyscloud:operational:usage:api` | All organization-level API usage aggregates |
| `genesyscloud:operational:usage:clients_api` | All OAuth client API usage aggregates |

Comment thread globalConfig.json
"field": "account",
"required": true
}
],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing max_poll_attempts and poll_interval_seconds to avoid hard-coded values.

Comment thread globalConfig.json
}
],
"inputHelperModule": "clients_api_usage_helper",
"title": "OAuth Client Usage",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"title": "OAuth Client Usage",
"title": "OAuth Client API Usage",

Comment thread globalConfig.json
],
"inputHelperModule": "clients_api_usage_helper",
"title": "OAuth Client Usage",
"description": "Ingest per-OAuth-client usage aggregates (POST /api/v2/usage/client/{clientId}/aggregates/query/jobs). Requires OAuth scope: usage:readonly."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Ingest per-OAuth-client usage aggregates (POST /api/v2/usage/client/{clientId}/aggregates/query/jobs). Requires OAuth scope: usage:readonly."
"description": "Ingest OAuth clients API usage aggregates."

Comment thread globalConfig.json
"field": "oauth_client_id",
"help": "The OAuth client ID to query usage for. If empty, queries usage for all clients.",
"required": false
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread globalConfig.json Outdated
Arthur-10-coder and others added 3 commits August 14, 2026 10:55
Co-authored-by: Erica Pescio <epescio@splunk.com>
Co-authored-by: Erica Pescio <epescio@splunk.com>
Co-authored-by: Erica Pescio <epescio@splunk.com>
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.

2 participants