grove.connectors.workday package

Workday connectors for Grove.

Submodules

grove.connectors.workday.activity_logging module

Workday Audit connector for Grove.

class grove.connectors.workday.activity_logging.Connector(config: ConnectorConfig, context: Dict[str, str])[source]

Bases: BaseConnector

LOG_ORDER = 'CHRONOLOGICAL'
NAME = 'workday_activity_logging'
POINTER_PATH = 'requestTime'
property base_url

Fetches the Workday unique base url from the configuration.

This is required as this is the url required by WD for authentication and API usage.

Returns:

The “base_url” portion of the connector’s configuration.

property client_id

Fetches the Workday Client ID from the configuration.

This is required as this is an additional authentication element required by WD.

Returns:

The “client_id” portion of the connector’s configuration.

property client_secret

Fetches the Workday Client Secret from the configuration.

This is required as this is an additional authentication element required by WD.

Returns:

The “client_secret” portion of the connector’s configuration.

collect()[source]

Collects all logs from the Workday Audit API.

This will first check whether there are any pointers cached to indicate previous collections. If not, the last week of data will be collected.

grove.connectors.workday.api module

Workday API client.

As the Python Workday client is no longer maintained this client has been created to allow collection of log data.

class grove.connectors.workday.api.Client(base_url: str | None = None, identity: str | None = None, client_id: str | None = None, client_secret: str | None = None, refresh_token: str | None = None, retry: bool | None = True)[source]

Bases: object

get_access_token()[source]

Exchange a refresh token for an access token.

This is required by Workday to auth the integration and then grant the bearer token to access the API.

Returns:

If the request is successful, the bearer token is returned to the Client class header.

get_activity_logging(cursor: int = 0, to_date: str | None = None, from_date: str | None = None) AuditLogEntries[source]

Fetches a list of audit logs which match the provided filters.

Parameters:
  • from_date – The required date and time of the earliest log entry.

  • to_date – The required date and time in UTC of the latest log entry.

  • limit – The maximum number of items to include in a single response.

  • cursor – The index position of the first object in a response collection. Cursor to use when fetching events (pagination).

Returns:

AuditLogEntries object containing a pagination cursor, and log entries.