Partially synced

Implement the activities.partially_synced webhook to know when 30 days of historical activities have been scanned.

By default, the activities.partially_synced webhook triggers when 30 days of historical activities have been successfully scanned (starting from most recent activities). The number of days scanned is a configurable parameter. This webhook can be subscribed to multiple times with different day ranges. Triggers only on the initial scan, and does not trigger during a periodic scan.

Event

activities.partially_synced

Configuration

AttributeTypeDescription
days_syncedinteger optionalThe number of days to be scanned.

The default value is 30.

Payload

AttributeTypeDescription
accountstring uuidID of the account the activities were scanned from.
userstring uuidID of the user associated with the account.
days_syncedintegerNumber of days the activities were synced for.
available_fromstring timestampRepresents the start of the time period the activities are available for. The available_from timestamp will precede the available_to timestamp.
available_tostring timestampRepresents the end of the time period the activities are available for.
available_countintegerThe total number of activities associated with the account at the moment the webhook call is made.

Examples

curl -X POST https://api.argyle.com/v1/webhooks \
  -u api_key_id:api_key_secret \
  -H "Content-Type: application/json" \
  -d '{"events": ["activities.partially_synced"],
       "secret": "<secret for signature verification>",
         "name": "activities.partially_synced",
          "url": "https://webhook.site/url"}'
curl -X POST https://api.argyle.com/v1/webhooks \
  -u api_key_id:api_key_secret \
  -H "Content-Type: application/json" \
  -d '{"events": ["activities.partially_synced"],
       "secret": "<secret for signature verification>",
         "name": "activities.partially_synced_cr",
       “config”: { “days_synced” : 7 },
          "url": "https://webhook.site/url"}'
{
    "event": "activities.partially_synced",
    "name": "7 days synced",
    "data": {
        "account": "12db5af4-fd5f-4d1f-bd98-0360df770aa8",
        "user": "abdb5af4-fd5f-4d1f-bd10-0360df77012c",
        "days_synced": 7,
        "available_from": "2019-06-07T20:12:09Z",
        "available_to": "2019-09-23T23:57:31Z",
        "available_count": 324
    }
}