activities
Creates, updates, deletes, gets or lists an activities resource.
Overview
| Name | activities |
| Type | Resource |
| Id | clickhouse.organizations.activities |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Unique activity ID. |
actor_id | string | Unique actor ID. (wire: actorId) |
organization_id | string | Scope of the activity: organization ID this activity is related to. (wire: organizationId) |
service_id | string | Scope of the activity: service ID this activity is related to. (wire: serviceId) |
target_key_id | string | For 'openapi_key_update' activities: the ID of the API key that was updated. (wire: targetKeyId) |
actor_details | string | Additional information about the actor. (wire: actorDetails) |
actor_ip_address | string | IP address of the actor. Defined for 'user' and 'api' actor types. (wire: actorIpAddress) |
actor_type | string | Type of the actor: 'user', 'support', 'system', 'api'. (user, support, system, api) (wire: actorType) |
created_at | string (date-time) | Timestamp of the activity. ISO-8601. (wire: createdAt) |
key_update_type | string | For 'openapi_key_update' activities: the type of update that was performed. (created, deleted, name-changed, role-changed, state-changed, date-changed, ip-access-list-changed, org-role-changed, default-service-role-changed, service-role-changed, roles-v2-changed) (wire: keyUpdateType) |
target_actor_ids | array | For 'organization_member_update_roles' and 'organization_member_remove_roles' activities: IDs of the affected actors (e.g. 'user/<id>'). (wire: targetActorIds) |
target_resource_ids | array | For 'role_resources_delete' activities: IDs of the deleted resources the roles referenced. (wire: targetResourceIds) |
target_role_ids | array | For role and actor-role activities: IDs of the affected roles. (wire: targetRoleIds) |
target_role_names | array | For role and actor-role activities: names of the affected roles, when recorded. (wire: targetRoleNames) |
type | string | Type of the activity. (create_organization, delete_organization, organization_update_name, transfer_service_in, transfer_service_out, save_payment_method, marketplace_subscription, migrate_marketplace_billing_details_in, migrate_marketplace_billing_details_out, organization_update_tier, organization_invite_create, organization_invite_delete, organization_member_join, organization_member_add, organization_member_leave, organization_member_delete, organization_member_update_role, organization_member_update_roles, organization_member_update_mfa_method, organization_saml_connection_create, organization_saml_connection_update, user_login, user_login_failed, user_logout, key_create, key_delete, openapi_key_update, service_create, service_start, service_stop, service_awaken, service_idle, service_running, service_partially_running, service_delete, service_update_name, service_update_ip_access_list, service_update_autoscaling_memory, service_update_autoscaling_idling, service_update_password, service_update_autoscaling_replicas, service_update_max_allowable_replicas, service_update_backup_configuration, service_restore_backup, service_update_release_channel, service_update_gpt_usage_consent, service_update_private_endpoints, service_import_to_organization, service_export_from_organization, service_maintenance_start, service_maintenance_end, service_update_core_dump, service_update_autoscaling_schedule, service_update_query_endpoints, service_update_direct_connection, service_update_sql_console_jwt_auth, service_update_snapshot_configuration, service_update_collector_ip_access_list, service_update_mysql_interface, service_update_upgrade_window, service_delete_upgrade_window, service_trigger_failover, service_trigger_recovery, service_mcp_enabled, service_mcp_disabled, service_upgrade, service_scaled_down_for_tier_change, service_encryption_key_check_failed, service_encryption_key_rotation_failed, service_encryption_key_rotated, service_stop_encryption_key_inaccessible, service_restart_encryption_key_rotation, backup_delete, backup_bucket_create, backup_bucket_update, backup_bucket_delete, backup_bucket_archive, warehouse_update_name, warehouse_update_release_channel, role_create, role_update, role_delete, role_resources_delete, organization_member_remove_roles, scim_user_profile_update, scim_group_create, scim_group_update, scim_group_delete, organization_saml_connection_delete, datadog_integration_create, datadog_integration_delete, organization_update_spend_alert, organization_update_core_dumps, organization_update_private_endpoints, organization_update_pci_compliance, organization_update_hipaa_status, transfer_credits_in, transfer_credits_out, promo_code_claim, schema_advisor_seed, schema_advisor_generate_plan, schema_advisor_approve_plan, schema_advisor_start_deployment, schema_advisor_start_benchmark, schema_advisor_run_benchmark, schema_advisor_start_promotion, schema_advisor_exchange_tables, schema_advisor_drop_sandbox, udf_create, udf_update, udf_delete, udf_version_create, udf_version_delete, udf_attach, udf_detach, udf_update_services, udf_redeploy, udf_rebuild) |
user_agent | string | User agent of the actor (wire: userAgent) |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique activity ID. |
actor_id | string | Unique actor ID. (wire: actorId) |
organization_id | string | Scope of the activity: organization ID this activity is related to. (wire: organizationId) |
service_id | string | Scope of the activity: service ID this activity is related to. (wire: serviceId) |
target_key_id | string | For 'openapi_key_update' activities: the ID of the API key that was updated. (wire: targetKeyId) |
actor_details | string | Additional information about the actor. (wire: actorDetails) |
actor_ip_address | string | IP address of the actor. Defined for 'user' and 'api' actor types. (wire: actorIpAddress) |
actor_type | string | Type of the actor: 'user', 'support', 'system', 'api'. (user, support, system, api) (wire: actorType) |
created_at | string (date-time) | Timestamp of the activity. ISO-8601. (wire: createdAt) |
key_update_type | string | For 'openapi_key_update' activities: the type of update that was performed. (created, deleted, name-changed, role-changed, state-changed, date-changed, ip-access-list-changed, org-role-changed, default-service-role-changed, service-role-changed, roles-v2-changed) (wire: keyUpdateType) |
target_actor_ids | array | For 'organization_member_update_roles' and 'organization_member_remove_roles' activities: IDs of the affected actors (e.g. 'user/<id>'). (wire: targetActorIds) |
target_resource_ids | array | For 'role_resources_delete' activities: IDs of the deleted resources the roles referenced. (wire: targetResourceIds) |
target_role_ids | array | For role and actor-role activities: IDs of the affected roles. (wire: targetRoleIds) |
target_role_names | array | For role and actor-role activities: names of the affected roles, when recorded. (wire: targetRoleNames) |
type | string | Type of the activity. (create_organization, delete_organization, organization_update_name, transfer_service_in, transfer_service_out, save_payment_method, marketplace_subscription, migrate_marketplace_billing_details_in, migrate_marketplace_billing_details_out, organization_update_tier, organization_invite_create, organization_invite_delete, organization_member_join, organization_member_add, organization_member_leave, organization_member_delete, organization_member_update_role, organization_member_update_roles, organization_member_update_mfa_method, organization_saml_connection_create, organization_saml_connection_update, user_login, user_login_failed, user_logout, key_create, key_delete, openapi_key_update, service_create, service_start, service_stop, service_awaken, service_idle, service_running, service_partially_running, service_delete, service_update_name, service_update_ip_access_list, service_update_autoscaling_memory, service_update_autoscaling_idling, service_update_password, service_update_autoscaling_replicas, service_update_max_allowable_replicas, service_update_backup_configuration, service_restore_backup, service_update_release_channel, service_update_gpt_usage_consent, service_update_private_endpoints, service_import_to_organization, service_export_from_organization, service_maintenance_start, service_maintenance_end, service_update_core_dump, service_update_autoscaling_schedule, service_update_query_endpoints, service_update_direct_connection, service_update_sql_console_jwt_auth, service_update_snapshot_configuration, service_update_collector_ip_access_list, service_update_mysql_interface, service_update_upgrade_window, service_delete_upgrade_window, service_trigger_failover, service_trigger_recovery, service_mcp_enabled, service_mcp_disabled, service_upgrade, service_scaled_down_for_tier_change, service_encryption_key_check_failed, service_encryption_key_rotation_failed, service_encryption_key_rotated, service_stop_encryption_key_inaccessible, service_restart_encryption_key_rotation, backup_delete, backup_bucket_create, backup_bucket_update, backup_bucket_delete, backup_bucket_archive, warehouse_update_name, warehouse_update_release_channel, role_create, role_update, role_delete, role_resources_delete, organization_member_remove_roles, scim_user_profile_update, scim_group_create, scim_group_update, scim_group_delete, organization_saml_connection_delete, datadog_integration_create, datadog_integration_delete, organization_update_spend_alert, organization_update_core_dumps, organization_update_private_endpoints, organization_update_pci_compliance, organization_update_hipaa_status, transfer_credits_in, transfer_credits_out, promo_code_claim, schema_advisor_seed, schema_advisor_generate_plan, schema_advisor_approve_plan, schema_advisor_start_deployment, schema_advisor_start_benchmark, schema_advisor_run_benchmark, schema_advisor_start_promotion, schema_advisor_exchange_tables, schema_advisor_drop_sandbox, udf_create, udf_update, udf_delete, udf_version_create, udf_version_delete, udf_attach, udf_detach, udf_update_services, udf_redeploy, udf_rebuild) |
user_agent | string | User agent of the actor (wire: userAgent) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | activity_id, organization_id | Returns a single organization activity by ID. | |
list | select | organization_id | from_date, to_date | Returns a list of all organization activities. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
activity_id | string | ID of the requested activity. (wire: activityId) |
organization_id | string | ClickHouse Cloud organization ID. Resolved from the CLICKHOUSE_ORG_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every query as WHERE organization_id = <uuid>. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: CLICKHOUSE_ORG_ID) |
from_date | string (date-time) | A starting date for a search |
to_date | string (date-time) | An ending date for a search |
SELECT examples
- get
- list
Returns a single organization activity by ID.
SELECT
id,
actor_id,
organization_id,
service_id,
target_key_id,
actor_details,
actor_ip_address,
actor_type,
created_at,
key_update_type,
target_actor_ids,
target_resource_ids,
target_role_ids,
target_role_names,
type,
user_agent
FROM clickhouse.organizations.activities
WHERE activity_id = '{{ activity_id }}' -- required
AND organization_id = '{{ organization_id }}' -- required unless CLICKHOUSE_ORG_ID is set
;
Returns a list of all organization activities.
SELECT
id,
actor_id,
organization_id,
service_id,
target_key_id,
actor_details,
actor_ip_address,
actor_type,
created_at,
key_update_type,
target_actor_ids,
target_resource_ids,
target_role_ids,
target_role_names,
type,
user_agent
FROM clickhouse.organizations.activities
WHERE organization_id = '{{ organization_id }}' -- required unless CLICKHOUSE_ORG_ID is set
AND from_date = '{{ from_date }}'
AND to_date = '{{ to_date }}'
;