v4

latestOpenAPI 3.0.22026-07-3188146256.6 KB
Activity

getActivity

Get activity by id

get/v1/entity/activity/{id}

Path parameters

idstring ulid required
Example:01F130Q52Q6MWSNS8N2AVXV4JN

Activity Id

Query parameters

anonymizeboolean

When true, anonymizes PII in the response: identifiers (names, emails, phone numbers, IBANs) are replaced with deterministic pseudonyms (stable within an org), addresses are generalized to postal code / city / country, and well-known free-text fields (e.g. note content) are redacted.

Useful for AI agents and data analysis use cases that must not access personal data.

Anonymization is forced (regardless of this parameter) when the access token was created with anonymize: true.

operations_sizeinteger

Maximum number of operations to include in response (default: 10)

operations_frominteger

Pagination offset for operations

Response

Success

timestampstring date-time
typestring required

A type for the activity. Used to categorize activities in the activity feed and for event subscriptions.

Built-in entity activity types (custom activities can be defined as well):

  • EntityCreated
  • EntityUpdated
  • EntityDeleted
  • EntitySoftDeleted
  • EntityRestored
  • RelationsAdded
  • RelationsRemoved
  • RelationsSoftDeleted
  • RelationsRestored
  • RelationsDeleted
  • ChangesetCreated
  • ChangesetAutoCleared
  • ChangesetApplied
  • ChangesetDismissed
titlestring required

Title for activity. Supports handlebars syntax.

messagestring required

Message for activity. Supports handlebars syntax.

payloadobject
pendingboolean

Indicates whether the activity is in the pending state. Pending activities are not yet visible in the activity feed and events are not yet dispatched.

operations_totalinteger

Count of total operations attached to this activity

Example response

{
  "_id": "01F130Q52Q6MWSNS8N2AVXV4JN",
  "title": "My custom activity",
  "message": "{{caller}} did something with {{entity payload.entity.id}}.",
  "payload": {
    "entity": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "schema": "contact"
    }
  },
  "caller": {
    "EpilotAuth": {
      "token": {
        "sub": "476e9b48-42f4-4234-a2b0-4668b34626ce",
        "cognito:groups": [
          "Administrator"
        ],
        "cognito:preferred_role": "arn:aws:iam::912468240823:role/base-administrator-role",
        "iss": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_6lZSgmU6D",
        "custom:ivy_org_id": "739224",
        "cognito:username": "n.ahmad@epilot.cloud",
        "custom:ivy_user_id": "10006129",
        "cognito:roles": [
          "arn:aws:iam::912468240823:role/base-administrator-role"
        ],
        "aud": "6e0jbdnger7nmoktaaflarue1l",
        "event_id": "cd5f5583-d90c-4db5-8e99-5f5dd29a4d75",
        "token_use": "id",
        "auth_time": 1614333023,
        "exp": 1614336623,
        "iat": 1614333023,
        "email": "n.ahmad@epilot.cloud"
      }
    }
  },
  "operations_total": 1,
  "operations": [
    {
      "org": "123",
      "activity_id": "01F130Q52Q6MWSNS8N2AVXV4JN",
      "params": {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "slug": "contact"
      },
      "payload": {
        "_schema": "contact",
        "_org": "123",
        "status": "Inactive"
      },
      "diff": {
        "added": {
          "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "_org": "123",
          "_owners": [
            {
              "org_id": "123",
              "user_id": "123"
            }
          ],
          "_schema": "contact",
          "_tags": [
            "example",
            "mock"
          ],
          "_created_at": "2021-02-09T12:41:43.662Z",
          "_updated_at": "2021-02-09T12:41:43.662Z",
          "_acl": {
            "view": [
              "org:456",
              "org:789"
            ],
            "edit": [
              "org:456"
            ],
            "delete": [
              "org:456"
            ]
          },
          "_manifest": [
            "123e4567-e89b-12d3-a456-426614174000"
          ]
        },
        "updated": {
          "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "_org": "123",
          "_owners": [
            {
              "org_id": "123",
              "user_id": "123"
            }
          ],
          "_schema": "contact",
          "_tags": [
            "example",
            "mock"
          ],
          "_created_at": "2021-02-09T12:41:43.662Z",
          "_updated_at": "2021-02-09T12:41:43.662Z",
          "_acl": {
            "view": [
              "org:456",
              "org:789"
            ],
            "edit": [
              "org:456"
            ],
            "delete": [
              "org:456"
            ]
          },
          "_manifest": [
            "123e4567-e89b-12d3-a456-426614174000"
          ]
        },
        "deleted": {
          "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "_org": "123",
          "_owners": [
            {
              "org_id": "123",
              "user_id": "123"
            }
          ],
          "_schema": "contact",
          "_tags": [
            "example",
            "mock"
          ],
          "_created_at": "2021-02-09T12:41:43.662Z",
          "_updated_at": "2021-02-09T12:41:43.662Z",
          "_acl": {
            "view": [
              "org:456",
              "org:789"
            ],
            "edit": [
              "org:456"
            ],
            "delete": [
              "org:456"
            ]
          },
          "_manifest": [
            "123e4567-e89b-12d3-a456-426614174000"
          ]
        }
      }
    }
  ]
}