Sample Payload for Events in Catalyst Signals

Sample Payload for Events in Catalyst Publishers

For events sourced by Catalyst Publishers in the Catalyst Signal service, you can use the following CLI command to generate sample payloads.

copy
$
catalyst signals:generate <publisher_service> <event_name>

The sample payload generated by this CLI command, can be used to test the functionality of the event function as per your requirement.

Sample payloads can only be generated for the following Catalyst CloudScale components:

The following table details the events for which sample payloads can be generated using the catalyst signals: generate command.

Publisher Service Event Name Event Action
DataStore row_inserted When a row is inserted to the table
row_updated When a row is updated in a table
row_deleted When a row is deleted from the table
Stratus stratus_object_uploaded When an object is uploaded to a bucket in Stratus
stratus_object_downloaded When an object is downloaded from a bucket in Stratus
stratus_object_updated When an object is updated in Stratus
stratus_object_deleted When an object is deleted from Stratus
Cache cache_item_created When a cache item is created
cache_item_updates When the cache is updated
Authentication user_signedup When a user signs up for an application
user_confirmed When a user completes the verification process
user_deleted When a user is removed from the application.

Consider this example, if you are required to generate a sample payload to test the functionality of an event function that is triggered when an object is uploaded to a bucket in Stratus, then the CLI command will be:

copy
$
catalyst signals: generate stratus stratus_object_upload

Example Output:

The following JSON snippet details an example of the output that can be expected.

Example Output.json
copy
{
  "rule_id": "534143331281450898",
  "target_id": "33038437",
  "version": 1,
  "attempt": 1,
  "account": {
    "org_id": "96858155",
    "project": {
      "environment": "Development",
      "name": "Project-Rainfall",
      "id": "11365000000016052"
    }
  },
  "events": [
    {
      "data": {
        "action_time": "7437648374832",
        "bucket_details": {
          "bucket_name": "sample-bucket",
          "project_details": {
            "id": "11365000000016052",
            "project_name": "Project-Rainfall",
            "project_type": "Live"
          },
          "created_by": {
            "email_id": "emmy@zylker.com",
            "user_type": "Admin",
            "user_id": "193334093726081",
            "is_confirmed": true,
            "last_name": "66028",
            "first_name": "97b6bc29b3",
            "zuid": "2369563417"
          },
          "created_time": "May 23, 2025 06:21 PM",
          "modified_by": {
            "email_id": "emmy@zylker.com",
            "user_type": "Admin",
            "user_id": "193334093726081",
            "is_confirmed": true,
            "last_name": "66028",
            "first_name": "97b6bc29b3",
            "zuid": "2369563417"
          },
          "modified_time": "May 23, 2025 06:21 PM",
          "bucket_meta": {
            "versioning": false,
            "caching": {
              "status": "Disabled"
            },
            "encryption": false,
            "audit_consent": false
          }
        },
        "object_key": "path1/path2/myfile.png"
      },
      "id": "7a66cb17-967b-5ccd-dad0-34c34e63e5a",
      "time_in_ms": "1748004702399",
      "source": "publisher_id:51607702502369250/service:cloudscalestratus/account:41005674",
      "event_config": {
        "api_name": "stratus_object_uploaded",
        "id": "57515236254614294"
      }
    }
  ]
}

Sample Payload for Custom Events

To generate sample payloads for events that are sourced by custom applications or components, we can use the catalyst signals:generate CLI command in the following manner:

copy
$
catalyst signals:generate custom <custom_event>

To generate payloads for custom events, you need to define the custom events. That is, you need to have defined and configured the REST API key for the required event within your custom publisher.

Consider the following example, you have another application that tracks end-users’ diet and provides them with nutrition recommendation. You have a requirement where, in the event an end-user registers their diet plan, you have an appropriate logic that needs to be triggered. In this case, provided you have defined and configured the event schema and the required REST API key, then you can generate a sample payload for this event using the Catalyst CLI in the following manner:

copy
$
catalyst signals:generate custom diet_profile_registered

Example Output:

The following JSON snippet details an example of the output that can be expected.

Example Output.json
copy
{
  "rule_id": "382913648739323890",
  "target_id": "70141764",
  "version": 1,
  "attempt": 1,
  "account": {
    "org_id": "60047207190",
    "project": {
      "environment": "Development",
      "name": "Project-Rainfall",
      "id": "21256000000010040"
    }
  },
  "events": [
    {
      "data": {},
      "id": "53aea689-77ac-fd4b-560d-82fd532bd1a",
      "time_in_ms": "1760089550627",
      "source": "publisher_id:90216327659515060/service:custom",
      "event_config": {
        "api_name": "diet_profile_registered",
        "id": "97690672393764451"
      }
    }
  ]
}

Last Updated 2025-10-13 16:27:02 +0530 IST