Skip to content
Search! & Match! API
Exporting
latest

Exporting

Exporting🔗

Besides accessing the Reports page in Search!, it is also possible to request the raw user activity log data via the export API. This way, you can load the events into your own system and create your own reports. Each event can be exported as a collection of JSON objects with the following API endpoint:

Method - Export🔗

  • URL: /activity/api/export
  • Method: GET

Exports the raw event data in the JSON-lines format. Each individual line in the export is a valid JSON object, representing a single logged event. See Event Logging for the available information per event type. The following example shows a logged activity of a project being created:

{  
   "projectID":"25ff03b85e354f72a500408f56283053",
   "projectName":"my new project",
   "environment":"example",
   "userID":"user1",
   "roles":[ "all" ],
   "eventType":"PROJECT_CREATE",
   "timestamp":"2018-02-26T16:59:47.462Z"
}

Note that the export API will stream all data matching your query at once. There is no pagination. For this reason, exporting is limited to a date range of one month maximum.

All activities are sorted by timestamp, with the last occurred activity on top.

Parameters🔗

Parameter Name Type Description
startDate Date Required. Start date/time for the selection. Supports ISO-formatted date stamps e.g. '2018-05-30', date-time-stamps with or without time-zone offset e.g. '2011-07-31T14:30-05:00', or relative dates such as 'today-30', or 'today+1'. Input without time-zone offset will be interpreted as coming from the servers time-zone. Input without time information will be interpreted as the beginning of the respective day. Due to the syntax of time-stamps, it is important to apply proper URL-encoding.
endDate Date Required. End date/time for the selection. Format as startDate. The duration between start and end date cannot be more than a month for performance reasons. Notice that date stamps provided without time information are treated as midnight on the date supplied, meaning that end dates are treated as exclusive, ie: up to and including the day before.
roles String Optional. Comma-separated list of roles you would like to retrieve events for. Leaving this empty or having all role will include all events of roles you have access to.
users String Optional. Comma-separated list of user ID's you would like to retrieve events for. Leaving this empty will get events for all users that overlap with the roles you have access to.
eventTypes String Optional. Comma-separated list of eventTypes that you would like to retrieve. Leaving this empty will include events of all types. See Event Logging for a list of valid options.

Example🔗

curl -X GET \
  'https://home.textkernel.nl/match-SearchBox3/activity/api/export?startDate=today-5&endDate=today%2B1&roles=all&users=user1,user2&eventTypes=SEARCH_EXECUTE' \
  -H 'Authorization: Bearer 40de5f98-3204-473f-a18a-3c22af2d0fd6'

Translations🔗

The exported raw data is language-agnostic. To make sense of both the field names and values additional translations are defined in the environment configuration which is exposed via this exporting API.

There are 3 endpoints defined to get all relevant translations: fields, field values and link labels. Note that each endpoint only returns the values for which it has a translation in the requested language or a default label.

All 3 translation endpoints return a map from field/value name to translated label. The language parameter should be provided as a lower-case 2-letter ISO country code.

Method - Fields🔗

  • URL: /activity/api/export/translations/{language}/fields
  • Method: GET

Returns all field names translated in the requested language or having a default label. When providing a non-existent language, an empty set is returned.

Response example:

{
  "birthdate":"Age",
  "jobexperience.jobtitle":"Profession Title",
  "hourlywage":"Hourly wage",
  "experiencetext":"Experience",
  "language":"Language",
  "salary":"Salary",
  "experienceyears":"Years of Experience",
  "jobexperience":"Curriculum Vitae",
  "compskill":"Computer Skills",
  "jobtitle":"Jobtitle",
  "lastjobtitle":"Last jobtitle",
  "lastemployer":"Last employer",
  "sections":"Sections",
  "name":"Name",
  "documentdate":"Document date"
}

Example🔗

curl -X GET \
  'https://home.textkernel.nl/match-SearchBox3/activity/api/export/translations/en/fields' \
  -H 'Authorization: Bearer 40de5f98-3204-473f-a18a-3c22af2d0fd6'

Method - Field values🔗

  • URL: /activity/api/export/translations/{language}/fields/{fieldname}
  • Method: GET

Returns all field values for the given field translated in the requested language or having a default label. When providing a non-existent language, an empty set is returned. When providing a non-existent field name an error is returned.

This endpoint returns translations for both code table fields as well as configured ranges.

Example response:

  • request: /activity/api/export/translations/en/fields/documentdate
{
  ">today-1": "from today",
  ">today-93": "in last 3 months",
  ">today-22": "from 3 weeks ago",
  ">today-8": "from a week ago",
  ">today-31": "from 4 weeks ago",
  ">today-2": "from yesterday"
}

Example🔗

curl -X GET \
  'https://home.textkernel.nl/match-SearchBox3/activity/api/export/translations/en/fields/documentdate' \
  -H 'Authorization: Bearer 40de5f98-3204-473f-a18a-3c22af2d0fd6'

Method - Labels🔗

  • URL: /activity/api/export/translations/{language}/labels
  • Method: GET

Returns all labels translated in the requested language from the <labelTranslation> block in the environment configuration. These label translations are used for searcher tabs and actionLinks and documentIDLinks (displayed as buttons in the UI).

Example response:

{
  "compare": "Compare",
  "saveas": "Save as",
  "import": "Import CV",
  "show-search": "Show CV",
  "lastjobtitle_descending": "Last job title descending",
  "save": "Save"
}

Example🔗

curl -X GET \
  'https://home.textkernel.nl/match-SearchBox3/activity/api/export/translations/en/labels' \
  -H 'Authorization: Bearer 40de5f98-3204-473f-a18a-3c22af2d0fd6'

Authentication🔗

All requests to the endpoints mentioned here require a valid Search access token to be set in the HTTP header of the request as follows:

Authorization : Bearer <token>

Additionally, the token requires to have the reportingAccess permisson enabled in the AccessOptions. For more information refer to the section on AccessOptions.

The export endpoint is restricted to the data that a user has access to based on his roles. It is not possible to request data for certain roles that you do not have access to. The role all is a wildcard that applies to all roles.