Syncplicity Events

Axway AMPLIFY supports events via polling or webhooks depending on the API provider. For more information about our Events framework, see Events Overview.

Supported Events and Resources

Axway AMPLIFY supports polling events for files and folders using the Syncplicity connector. In the downstream service, we use Syncplicity's GET /sync/newsfeed.svc/{syncPointId} API to retrieve event notifications on each syncpoint in your tenant. Supported event types from Syncplicity, along with the normalized Axway AMPLIFY events, are listed in the below map:

{
  "1": {
    "vendorType": "FileCorrupted",
    "eventType": "UNKNOWN"
  },
  "2": {
    "vendorType": "FileCreated",
    "eventType": "CREATED"
  },
  "3": {
    "vendorType": "FileUpdated",
    "eventType": "UPDATED"
  },
  "4": {
    "vendorType": "FileDeleted",
    "eventType": "DELETED"
  },
  "5": {
    "vendorType": "DirCreated",
    "eventType": "CREATED"
  },
  "6": {
    "vendorType": "DirDeleted",
    "eventType": "DELETED"
  },
  "7": {
    "vendorType": "FileRestored",
    "eventType": "UPDATED"
  },
  "8": {
    "vendorType": "DirRestored",
    "eventType": "UPDATED"
  },
  "9": {
    "vendorType": "VirtualFolderRestored",
    "eventType": "UPDATED"
  },
  "10": {
    "vendorType": "VirtualFolderMapped",
    "eventType": "UPDATED"
  },
  "11": {
    "vendorType": "VirtualFolderUnmapped",
    "eventType": "UPDATED"
  },
  "12": {
    "vendorType": "FileRecreated",
    "eventType": "CREATED"
  },
  "13": {
    "vendorType": "DirRecreated",
    "eventType": "CREATED"
  },
  "14": {
    "vendorType": "NewsFeedArchived",
    "eventType": "UPDATED"
  },
  "15": {
    "vendorType": "FileDeletedPurged",
    "eventType": "DELETED"
  },
  "16": {
    "vendorType": "FilePreviousVersionPurged",
    "eventType": "UPDATED"
  },
  "17": {
    "vendorType": "VirtualFolderOwnerChanged",
    "eventType": "UPDATED"
  },
  "18": {
    "vendorType": "VirtualFolderDeleted",
    "eventType": "DELETED"
  },
  "19": {
    "vendorType": "VirtualFolderCreated",
    "eventType": "CREATED"
  },
  "20": {
    "vendorType": "DirPurged",
    "eventType": "DELETED"
  },
  "21": {
    "vendorType": "FileBranched",
    "eventType": "UPDATED"
  },
  "22": {
    "vendorType": "DirMoved",
    "eventType": "UPDATED"
  },
  "23": {
    "vendorType": "FileMoved",
    "eventType": "UPDATED"
  },
  "24": {
    "vendorType": "DirRenamed",
    "eventType": "UPDATED"
  },
  "25": {
    "vendorType": "FileRenamed",
    "eventType": "UPDATED"
  },
  "26": {
    "vendorType": "DirMovedAndRenamed",
    "eventType": "UPDATED"
  },
  "27": {
    "vendorType": "FileMovedAndRenamed",
    "eventType": "UPDATED"
  },
  "28": {
    "vendorType": "FileCreatedByMove",
    "eventType": "CREATED"
  },
  "29": {
    "vendorType": "FileCreatedByMoveAndRename",
    "eventType": "CREATED"
  },
  "30": {
    "vendorType": "FileDeletedByMove",
    "eventType": "DELETED"
  },
  "31": {
    "vendorType": "FileDeletedByMoveAndRename",
    "eventType": "DELETED"
  },
  "32": {
    "vendorType": "DirCreatedByMove",
    "eventType": "CREATED"
  },
  "33": {
    "vendorType": "DirCreatedByMoveAndRename",
    "eventType": "CREATED"
  },
  "34": {
    "vendorType": "DirDeletedByMove",
    "eventType": "DELETED"
  },
  "35": {
    "vendorType": "DirDeletedByMoveAndRename",
    "eventType": "DELETED"
  },
  "36": {
    "vendorType": "SharedLinkCreationBlockedByDlpPolicy",
    "eventType": "UNKNOWN"
  },
  "37": {
    "vendorType": "SharedLinkCreationUserWarnedByDlpPolicy",
    "eventType": "UNKNOWN"
  },
  "38": {
    "vendorType": "AccessViaSharedLinkBlockedByDlpPolicy",
    "eventType": "UNKNOWN"
  },
  "39": {
    "vendorType": "AccessViaSharedLinkUserWarnedByDlpPolicy",
    "eventType": "UNKNOWN"
  },
  "40": {
    "vendorType": "AccessViaFolderBlockedByDlpPolicy",
    "eventType": "UNKNOWN"
  },
  "41": {
    "vendorType": "AccessViaFolderUserWarnedByDlpPolicy",
    "eventType": "UNKNOWN"
  },
  "42": {
    "vendorType": "DirectoryShareBlockedByDlpPolicy",
    "eventType": "UNKNOWN"
  },
  "53": {
    "vendorType": "DeletedFileRenamed",
    "eventType": "UPDATED"
  },
  "54": {
    "vendorType": "DeletedFolderRenamed",
    "eventType": "UPDATED"
  },
  "55": {
    "vendorType": "ScanStatusSet",
    "eventType": "UNKNOWN"
  },
  "56": {
    "vendorType": "VirtualFolderRenamed",
    "eventType": "UPDATED"
  },
  "60": {
    "vendorType": "FileTagAdded",
    "eventType": "UPDATED"
  },
  "61": {
    "vendorType": "FileTagRemoved",
    "eventType": "UPDATED"
  },
  "62": {
    "vendorType": "FileMetaDataAdded",
    "eventType": "UPDATED"
  },
  "63": {
    "vendorType": "FileMetaDataRemoved",
    "eventType": "UPDATED"
  },
  "64": {
    "vendorType": "FileMetaDataUpdated",
    "eventType": "UPDATED"
  },
  "65": {
    "vendorType": "FolderTagAdded",
    "eventType": "UPDATED"
  },
  "66": {
    "vendorType": "FolderTagRemoved",
    "eventType": "UPDATED"
  },
  "67": {
    "vendorType": "FolderMetaDataAdded",
    "eventType": "UPDATED"
  },
  "68": {
    "vendorType": "FolderMetaDataRemoved",
    "eventType": "UPDATED"
  },
  "69": {
    "vendorType": "FolderMetaDataUpdated",
    "eventType": "UPDATED"
  },
  "70": {
    "vendorType": "VirtualFolderMetadataPurged",
    "eventType": "UPDATED"
  }
}
Icon

Unless configured for a specific time zone, polling occurs in UTC.

Configure Polling Through the UI

To configure polling through the UI, follow the same steps to authenticate a connector instance, turn on events, and then click Create Instance. For more information, see Authenticate a Connector Instance with Events (UI) or the connector-specific authentication topic.

Icon
Events for the Syncplicity connector cannot be configured in the Axway AMPLIFY UI. Any Syncplicity events created using the UI will receive requests for both folders and files. If you want to configure events for only files or folders, you must use the API; see Configure Polling Through API for more information.

Configure Polling Through API

Use the /instances endpoint to authenticate with Syncplicity and create a connector instance with polling enabled. 

Icon
The endpoint returns a connector instance token and id upon successful completion. Retain the token and id for all subsequent requests involving this connector instance.

To authenticate a connector instance with polling:

  1. Get an authorization grant code by completing the steps in Getting a redirect URL and Authenticating users and receiving the authorization grant code.
  2. Construct a JSON body as shown below (see Parameters):

    {
      "element": {
        "key":"syncplicity"
      },
      "providerData": {
        "code": "<Authorization_Grant_Code>"
      },
      "configuration": {
        "authentication.type": "<Authentication type>",
        "syncplicity.user.email": "<Syncplicity user email>",
        "oauth.api.key": "<Syncplicity OAuth API key>",
        "oauth.api.secret": "<Syncplicity OAuth API secret>",
        "oauth.callback.url": "<Syncplicity OAuth Callback URL name>",
        "event.notification.enabled": true,
        "event.notification.callback.url": "<Event notification callback URL>",
        "event.poller.refresh_interval": "<minutes>",
        "event.poller.configuration": {
          "messages": {
            "url": "/hubs/documents/events/poll/documents",
            "idField": "id",
            "datesConfiguration": {
              "updatedDateField": "modification_date",
              "updatedDateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
              "updatedDateTimezone": "GMT",
              "createdDateField": "creation_date",
              "createdDateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
              "createdDateTimezone": "GMT"
            }
          }
        }
      },
      "tags":[
        "<Add_Your_Tag>"
      ],
      "name":"<Instance_Name>"
    }

    The above example presumes OAuth2 authentication; if you want to configure polling through API using custom authentication, you can append the above event-related parameters to the custom authentication examples shown in Syncplicity Authenticate a Connector.

  3. Call the following, including the JSON body you constructed in the previous step:

    POST /instances
    Icon
    Make sure that you include the User and Organization keys in the header. For more information, see Authorization Headers, Organization Secret, and User Secret.
  4. Locate the token and id in the response and save them for all future requests using the connector instance.

Example cURL with Polling

curl -X POST \
https://api.cloud-elements.com/elements/api-v2/instances \
-H 'authorization: User , Organization ' \
-H 'content-type: application/json' \
-d '{
  "element": {
    "key": "syncplicity"
  },
  "providerData": {
    "code": "<AUTHORIZATION_GRANT_CODE>"
  },
  "configuration": {
    "authentication.type": "oauth2",
    "syncplicity.user.email": "<Syncplicity user email>",
    "oauth.api.key": "<Syncplicity OAuth API key>",
    "oauth.api.secret": "<Syncplicity OAuth API secret>",
    "oauth.callback.url": "https://auth.cloudelements.io/oauth",
    "event.notification.enabled": true,
    "event.notification.callback.url": "https://mycoolapp.com",
    "event.poller.refresh_interval": "10",
    "event.poller.configuration": {
      "documents": {
        "url": "/hubs/documents/events/poll/documents",
        "idField": "id",
        "datesConfiguration": {
          "updatedDateField": "modification_date",
          "updatedDateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
          "updatedDateTimezone": "GMT",
          "createdDateField": "creation_date",
          "createdDateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
          "createdDateTimezone": "GMT"
        }
      }
    }
  },
  "tags": [
    "Docs"
  ],
  "name": "API Instance with Polling"
}

Parameters

API parameters not shown in Axway AMPLIFY are in code formatting.

Parameter Description Data Type
key The element key.
syncplicity
string
Name
name
The name of the element instance created during authentication. Body
Authentication type
authentication.type

The type of authentication you want to use to authenticate. Options are oauth2 or custom. The cURL examples in this article presume oauth2; see Syncplicity Authenticate a Connector for more information about authenticating.

Icon
If you are using custom authentication.
string
Syncplicity User Email
syncplicity.user.email
The provisioning user's email used to sign in to Syncplicity. This is used to send requests to determine the proper API gateway. string
API Key
oauth.api.key
The Syncplicity API Key that you noted in the Syncplicity API Provider Setup. string
API Secret
oauth.api.secret
The Syncplicity API Secret that you noted in the Syncplicity API Provider Setup. string
OAuth Callback URL
oauth.callback.url
The API key or client ID obtained from registering your app with the provider. This is https://auth.cloudelements.io/oauth string
Events Enabled
event.notification.enabled
Optional. Identifies that events are enabled for the element instance.
Default: false
boolean
Event Notification Callback URL
event.notification.callback.url
The URL where you want Cloud Elements to send the events. string
Event poller refresh interval (mins)
event.poller.refresh_interval
A number in minutes to identify how often the poller should check for changes. number
Configure Polling
event.poller.configuration
Optional. Configuration parameters for polling. JSON object
Resource to Poll The polling event configuration of the resource that you will monitor. JSON object
URL
url
The url to query for updates to the resource. String
ID Field
idField
The field in the resource that is used to uniquely identify it. String
Advanced Filtering
datesConfiguration
Configuration parameters for dates in polling JSON Object
Updated Date Field
updatedDateField
The field that identifies an updated object. String
Updated Date Format
updatedDateFormat
The date format of the field that identifies an updated object. String
Created Date Field
createdDateField
The field that identifies a created object. String
Created Date Format
createdDateFormat
The date format of the field that identifies a created object. String
tags Optional. User-defined tags to further identify the instance. string

Related Links