/changedEntityExportJobs

Changed on

Create a new Changed Entity Export Job

Use this endpoint to request a new Changed Entity Export Job for a specified resourceType with properties provided in the request body. The generated dataset will be one or multiple files that include all records which have changed between dateChangedFrom (specified by the user) and dateChangedTo (generated by the server at execution). Optionally, the user may also specify that inactive records be included in the export file with the includeInactive property. ChangeTypes began being stored in September 2020. Records for which the last change occurred before this date may be missing inaccurate ChangeTypes until they are updated. The user may also specify additional IDs with the requestedIds property to add to the dataset. The exported data will include all core fields for the resource type as well as any specified by the user with the requestedFields or requestedCustomFieldIds properties. If all generated content is less than the fileSizeKbLimit, then one file will be created. Otherwise, multiple files will be created such that none exceeds the specified limit.

If the dateChangedTo parameter is in the past, the resulting records will be any which changed in the dateChangedFrom and dateChangedTo window. However, the records that will be returned by the job will always be the current version of the records. They will not be records at the snapshot moment in time of dateChangedTo.

File download links expire after 20 days.

post/changedEntityExportJobs

Request

  • Base URL
    https://api.securevan.com/v4
  • URL
    https://api.securevan.com/v4/changedEntityExportJobs
  • Auth
    HTTP basic

Request body

dateChangedFromstring date

Required; timestamp in the format YYYY-MM-DDThh:mm:ss.00Z or YYYY-MM-DDThh:mm:ss.00 -hh:mm. Must be in the last 90 days.

dateChangedTostring date

Optional; timestamp in the format YYYY-MM-DDThh:mm:ss.00Z or YYYY-MM-DDThh:mm:ss.00 -hh:mm. If provided, must be a date that is more recent than dateChangedFrom, and must be no later than the present. If not provided, will be set automatically to the time at which the API request is made.

resourceTypestring

Required; available resource type specified at the /resources endpoint

requestedIdsinteger[]

IDs to be included in the exported set if available. Overrides the time window specified as well as the includeInactive property.

requestedFieldsstring[]

Names of non-core fields to be included in the export

requestedCustomFieldIdsinteger[]

IDs of custom fields to be included in the export

fileSizeKbLimitinteger

The maximum size in Kb (between 1000 and 100000) of any exported .csv file; defaults to 40000

includeInactiveboolean

If set to true, includes inactive records such as archived activist codes or deleted contacts. Defaults to false.

contactModeinteger

Optional; Determines the type of contact records returned in the export. When this parameter is set to 1, only people contact records will be exported. When set to 2 only organization contact records will be exported. When it is omitted or set to 3 both people and organization contact records will be exported.

requestedActivistCodeIdsinteger[]

Optional; A list of ActivistCodeID values to filter results returning only changed ContactsActivistCodes that match. This Param is available when resourceType is "ContactsActivistCodes". For all other resourceType values it will be ignored when processing the job.

Response

201

exportJobIdinteger
jobStatusstring
dateChangedFromstring
dateChangedTostring
messagestring
codeunknown
exportedRecordCountinteger
excludeChangesFromSelfstring

Example response

{
  "exportJobId": 12345,
  "jobStatus": "Complete",
  "dateChangedFrom": "2019-01-01T01:02:03+04:00",
  "dateChangedTo": "2019-01-01T07:03:09+04:00",
  "files": [
    {
      "downloadUrl": "https://www.example.com/some-unique-file-name.csv",
      "dateExpired": "2019-01-31T15:05:54.2106809-04:00"
    }
  ],
  "message": "Finished processing export job",
  "exportedRecordCount": 10500,
  "excludeChangesFromSelf": "true"
}

Changes