The search endpoints allow you to query the audit log and activity feed data programmatically.
Returns a list of data source activity
GET /api/v2/search/activity
Arguments:
Response object:
id - string : The unique identifier of the activity eventcreatedAt - timestamp : When the activity event was createdcompletedAt - timestamp : When the activity event was completedsuccess - boolean : Whether the activity event was successfuleditorId - string : The unique identifier of the editor associated with the eventtype - string : The activity event typeactorIp - string : The IP address of the person that performed the actionperson - object : The Person object that performed the action
id - string : The unique identifier of the personusername - string : The username of the personemail - string : The email address of the persondataSource - object : The Data Source object onto which this permission is granted
id - string : The unique identifier of the data sourcename - string : The name of the data sourceconfigUri - string : The config URI of the data sourcedetail - object : Additional event type-specific detailresults - array: An array of activity result objects generated by this eventFor any given request, the first 500 records matching the filter criteria, if any, are retrieved, sorted by creation timestamp.
Specify a createdAtStart filter to retrieve additional records beyond the first 500 for any given request.
Example requests:
Get all activity records:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity"
Get activity records created after a given timestamp:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity?createdAtStart=2022-06-10T21:45:59.925Z"
Get activity records created within a timestamp range:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity?createdAtStart=2022-06-10T21:45:59.925Z&createdAtEnd=2022-07-10T12:30:09.925Z"
Get activity records filtered by a specific IP address:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity?actorIp=127.1.2.3"
Get activity records filtered by a specific person (by identifier):
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity?person=P39xndjht2hydh489"
Get activity records filtered by a specific person (by username):
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity?person=username:alice"
Get activity records filtered by a specific data source (by identifier):
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity?dataSource=D38snndklsnf323yn"
Get activity records filtered by text within the record detail:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/activity?text=SELECT"
Returns a list of audit log records
GET /api/v2/search/audit
Arguments:
Response object:
id - string : The unique identifier of the audit eventcreatedAt - timestamp : When the audit event was generatedtype - string : The audit event typeactorIp - string : The IP address of the person that generated the audit eventperson - object : The Person object associated with the audit event
id - string : The unique identifier of the personusername - string : The username of the personemail - string : The email address of the personaccountApiKeyId - string : The API key that generated the audit eventdetail - object : Additional event type-specific detailFor any given request, the first 500 records matching the filter criteria, if any, are retrieved, sorted by creation timestamp.
Specify a createdAtStart filter to retrieve additional records beyond the first 500 for any given request.
Example requests:
Get all audit records:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/audit"
Get audit records created after a given timestamp:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/audit?createdAtStart=2022-06-10T21:45:59.925Z"
Get audit records created within a timestamp range:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/audit?createdAtStart=2022-06-10T21:45:59.925Z&createdAtEnd=2022-07-10T12:30:09.925Z"
Get audit records filtered by a specific IP address:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/audit?actorIp=127.1.2.3"
Get audit records filtered by a specific person (by identifier):
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/audit?person=P39xndjht2hydh489"
Get audit records filtered by a specific person (by username):
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/audit?person=username:alice"
Get audit records filtered by text within the record detail:
$ curl \
-H "Accept: application/vnd.jackdb.v2+json" \
-u "${JACKDB_API_KEY_ID}@api:${JACKDB_API_KEY_SECRET}" \
"${JACKDB_API_URL}/search/audit?text=host"