Skip to main content
Version: 2.0

Reports

Reports for holders, credentials, and events can be used to fulfill business auditing requirements.

Holder Reports

Holder reports provide details about credential holders in the access control system.

tip

Holder reports are generated asynchronously and may not be available immediately. For real-time monitoring and data synchronization, use webhooks instead.

The holder report object

{
"id": "8b37106e-fb08-4700-b14d-70a3967b5086",
"firstName": "John",
"lastName": "Wiegand",
"cards": "1234567,1234568",
"groups": "Test Group 1,Test Group 2",
"email": "john@example.com",
"enabled": true,
"pin": "1234567",
"duressPin": "91234567",
"partition": "Default",
"activeDate": "2023-07-01 00:00:00",
"expireDate": "2024-07-01 00:00:00",
"bluetooth": 1,
"pendingBluetooth": 0,
"mobileApp": 1,
"pendingMobileApp": 0,
"customFields": "{\"Employee ID\":1234567}"
}
PropertyTypeDescription
idStringThe holder's ID.
firstNameStringThe holder's first name.
lastNameStringThe holder's last name.
cardsStringA comma-delimited list of the holder's physical credentials.
groupsStringA comma-delimited list of the holder's groups.
emailStringThe holder's email address.
enabledBooleanWhether the holder is enabled.
pinStringThe holder's PIN.
duressPinStringThe holder's duress PIN.
partitionStringThe name of the holder's partition.
activeDateStringThe start date of the holder's active period formatted as YYYY-MM-DD HH:mm:ss.
expireDateStringThe end date of the holder's active period formatted as YYYY-MM-DD HH:mm:ss.
bluetoothIntegerThe number of active Bluetooth credentials issued to the holder.
pendingBluetoothIntegerThe number of pending Bluetooth credentials issued to the holder.
mobileAppIntegerThe number of active mobile credentials issued to the holder.
pendingMobileAppIntegerThe number of pending mobile credentials issued to the holder.
customFieldsStringA JSON string of the holder's custom field values.

Preview a holder report

This endpoint allows you to preview up to 50 results without generating and storing a new holder report.

Request

POST https://systems.pdk.io/{{system_id}}/reports/holders/preview HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"filters": [
{
"value": true,
"type": "enabled"
}
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
reportIdBodyStringNoThe holder report template ID. If this is specified, all other body parameters will be inherited from the referenced template and must not be specified in this request.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoA list of report filters.
filters.typeBodyStringNoThe filter type. Possible values include firstName, lastName, email, groups, enabled, credentials, and partition.
filters.operatorBodyStringSometimesThe filter operator. This is required when filters.type is set to firstName, lastName, or email. Possible values include equals, does not equal, contains, and does not contain.
filters.operandBodyStringSometimesThe filter operand. This is required when filters.operator is specified.
filters.caseSensitiveBodyBooleanNoWhether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false.
filters.valueBodyBooleanSometimesThe value used for boolean filters. This is required when filters.type is set to enabled.
filters.memberOfBodyInteger[]NoA list of IDs representing entities that holders should belong to when filters.type is set to groups or partition.
filters.notMemberOfBodyInteger[]NoA list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition.
filters.cardNumberBodyObjectNoThe physical credentials filter. This only applies if filters.type is set to credentials.
filters.cardNumber.operatorBodyStringYesThe physical credentials filter operator. Possible values include equals and does not equal.
filters.cardNumber.operandBodyIntegerYesThe physical credentials filter operand.
filters.mobileBodyObjectNoThe digital credentials filter. This only applies if filters.type is set to credentials.
filters.mobile.typeBodyStringNoThe digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials.
filters.mobile.statusBodyStringNoThe digital credentials filter status. Possible values include accepted and pending.
outputBodyString[]NoThe holder report object properties that should be included in the report output.

Response

The response contains an array of holder report objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "8b37106e-fb08-4700-b14d-70a3967b5086",
"firstName": "John",
"lastName": "Wiegand",
"cards": "1234567,1234568",
"groups": "Test Group 1,Test Group 2",
"email": "john@example.com",
"enabled": true,
"pin": "1234567",
"duressPin": "91234567",
"partition": "Default",
"activeDate": "2023-07-01 00:00:00",
"expireDate": "2024-07-01 00:00:00",
"bluetooth": 1,
"pendingBluetooth": 0,
"mobileApp": 1,
"pendingMobileApp": 0,
"customFields": "{\"Employee ID\":1234567}"
}
]

Create a holder report

Request

POST https://systems.pdk.io/{{system_id}}/reports/holders/generate HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"filters": [
{
"value": true,
"type": "enabled"
}
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
reportIdBodyStringNoThe holder report template ID. If this is specified, all other body parameters will be inherited from the referenced template and must not be specified in this request.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoA list of report filters.
filters.typeBodyStringNoThe filter type. Possible values include firstName, lastName, email, groups, enabled, credentials, and partition.
filters.operatorBodyStringSometimesThe filter operator. This is required when filters.type is set to firstName, lastName, or email. Possible values include equals, does not equal, contains, and does not contain.
filters.operandBodyStringSometimesThe filter operand. This is required when filters.operator is specified.
filters.caseSensitiveBodyBooleanNoWhether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false.
filters.valueBodyBooleanSometimesThe value used for boolean filters. This is required when filters.type is set to enabled.
filters.memberOfBodyInteger[]NoA list of IDs representing entities that holders should belong to when filters.type is set to groups or partition.
filters.notMemberOfBodyInteger[]NoA list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition.
filters.cardNumberBodyObjectNoThe physical credentials filter. This only applies if filters.type is set to credentials.
filters.cardNumber.operatorBodyStringYesThe physical credentials filter operator. Possible values include equals and does not equal.
filters.cardNumber.operandBodyIntegerYesThe physical credentials filter operand.
filters.mobileBodyObjectNoThe digital credentials filter. This only applies if filters.type is set to credentials.
filters.mobile.typeBodyStringNoThe digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials.
filters.mobile.statusBodyStringNoThe digital credentials filter status. Possible values include accepted and pending.
outputBodyString[]NoThe holder report object properties that should be included in the report output.

Response

Since reports are generated asynchronously, the response does not include any information about the pending report. However, the ID of the pending report is available immediately when you list metadata for all holder reports.

HTTP/1.1 204 No Content

Retrieve a holder report

Request

GET https://systems.pdk.io/{{system_id}}/reports/holders/requests/{{report_id}}/view HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_idPathStringYesThe holder report ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of holder report objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "8b37106e-fb08-4700-b14d-70a3967b5086",
"firstName": "John",
"lastName": "Wiegand",
"cards": "1234567,1234568",
"groups": "Test Group 1,Test Group 2",
"email": "john@example.com",
"enabled": true,
"pin": "1234567",
"duressPin": "91234567",
"partition": "Default",
"activeDate": "2023-07-01 00:00:00",
"expireDate": "2024-07-01 00:00:00",
"bluetooth": 1,
"pendingBluetooth": 0,
"mobileApp": 1,
"pendingMobileApp": 0,
"customFields": "{\"Employee ID\":1234567}"
}
]

Delete a holder report

Request

DELETE https://systems.pdk.io/{{system_id}}/reports/holders/requests/{{report_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_idPathStringYesThe report ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

Retrieve metadata for a holder report

Request

GET https://systems.pdk.io/{{system_id}}/reports/holders/requests/{{report_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_idPathStringYesThe report ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "2006dde8-a6a6-43f2-9910-c83616c957af",
"status": "finished",
"startTime": "2023-10-06T12:41:34-07:00",
"finishedTime": "2023-10-06T12:41:35-07:00",
"truncatedAt": null,
"timezone": "US/Pacific",
"size": {
"csv": 3561,
"html": 22082,
"json": 3683
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "enabled",
"value": true
}
],
"links": "people-report-2006dde8-a6a6-43f2-9910-c83616c957af-1-1",
"output": [
"id",
"firstName",
"lastName",
"cards",
"groups",
"email",
"bluetooth",
"pendingBluetooth",
"mobileApp",
"pendingMobileApp",
"enabled",
"pin",
"duressPin",
"partition",
"activeDate",
"expireDate",
"customFields"
],
"report": {
"id": "b0131897-1a5f-439e-8fc5-7f9c472c1f99",
"name": "Test Holder Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba"
}
}
PropertyTypeDescription
idStringThe report ID.
statusStringThe report status. Possible values include pending, finished, and finishedTruncated (if an error occurred during processing).
startTimeStringThe time the report started processing.
finishedTimeStringThe time the report finished processing.
truncatedAtStringThe time the report aborted processing. This is set to null if the report finished processing successfully.
timezoneStringThe report timezone.
sizeObjectAn object containing the size of each available report file type.
size.csvIntegerThe size (in bytes) of the CSV file output.
size.htmlIntegerThe size (in bytes) of the HTML file output.
size.jsonIntegerThe size (in bytes) of the JSON file output.
entriesCountIntegerThe number of entries in the report.
creatorStringThe name of the user that created the report.
filtersObject[]A list of report filters. See create a holder report for details.
linksStringThe filename used when exporting the report as a file.
outputString[]The holder report object properties that should be included in the report output.
reportObjectThe holder report template.

List metadata for all holder reports

Request

GET https://systems.pdk.io/{{system_id}}/reports/holders/requests HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "2006dde8-a6a6-43f2-9910-c83616c957af",
"status": "finished",
"startTime": "2023-10-06T12:41:34-07:00",
"finishedTime": "2023-10-06T12:41:35-07:00",
"truncatedAt": null,
"timezone": "US/Pacific",
"size": {
"csv": 3561,
"html": 22082,
"json": 3683
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "enabled",
"value": true
}
],
"links": "people-report-2006dde8-a6a6-43f2-9910-c83616c957af-1-1",
"output": [
"id",
"firstName",
"lastName",
"cards",
"groups",
"email",
"bluetooth",
"pendingBluetooth",
"mobileApp",
"pendingMobileApp",
"enabled",
"pin",
"duressPin",
"partition",
"activeDate",
"expireDate",
"customFields"
],
"report": {
"id": "b0131897-1a5f-439e-8fc5-7f9c472c1f99",
"name": "Test Holder Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba"
}
}
]
PropertyTypeDescription
idStringThe holder's ID.
statusStringThe report status. Possible values include pending, finished, and finishedTruncated (if an error occurred during processing).
startTimeStringThe time the report started processing.
finishedTimeStringThe time the report finished processing.
truncatedAtStringThe time the report aborted processing. This is set to null if the report finished processing successfully.
timezoneStringThe report timezone.
sizeObjectAn object containing the size of each available report file type.
size.csvIntegerThe size (in bytes) of the CSV file output.
size.htmlIntegerThe size (in bytes) of the HTML file output.
size.jsonIntegerThe size (in bytes) of the JSON file output.
entriesCountIntegerThe number of entries in the report.
creatorStringThe name of the user that created the report.
filtersObject[]A list of report filters. See create a holder report for details.
linksStringThe filename used when exporting the report as a file.
outputString[]The holder report object properties that should be included in the report output.
reportObjectThe holder report template.

Holder Report Templates

Users can save a set of input filters and output properties by creating a report template. If this template ID is referenced when generating a report, the new report will inherit all the parameters defined in the template. This is useful for reports that are generated regularly to fulfill business auditing requirements.

The holder report template object

{
"id": "b0131897-1a5f-439e-8fc5-7f9c472c1f99",
"name": "Test Holder Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"firstName",
"lastName",
"cards",
"groups",
"email",
"bluetooth",
"pendingBluetooth",
"mobileApp",
"pendingMobileApp",
"enabled",
"pin",
"duressPin",
"partition",
"activeDate",
"expireDate",
"customFields"
]
}
PropertyTypeDescription
idStringThe holder report template ID.
nameStringThe holder report template name.
partitionStringThe partition ID.
filtersObject[]A list of report filters.
filters.typeStringThe filter type. Possible values include firstName, lastName, email, groups, enabled, credentials, and partition.
filters.operatorStringThe filter operator. Possible values include equals, does not equal, contains, and does not contain.
filters.operandStringThe filter operand.
filters.caseSensitiveBooleanWhether the comparison is case sensitive. This only applies when filters.operator is specified.
filters.valueBooleanThe value used for boolean filters. This only applies when filters.type is set to enabled.
filters.memberOfInteger[]A list of IDs representing entities that holders belong to when filters.type is set to groups or partition.
filters.notMemberOfInteger[]A list of IDs representing entities that holders do not belong to when filters.type is set to groups or partition.
filters.cardNumberObjectThe physical credentials filter. This only applies if filters.type is set to credentials.
filters.cardNumber.operatorStringThe physical credentials filter operator. Possible values include equals and does not equal.
filters.cardNumber.operandIntegerThe physical credentials filter operand.
filters.mobileObjectThe digital credentials filter. This only applies if filters.type is set to credentials.
filters.mobile.typeStringThe digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials.
filters.mobile.statusStringThe digital credentials filter status. Possible values include accepted and pending.
outputString[]The holder report object properties that should be included in the report output.

Create a holder report template

Request

POST https://systems.pdk.io/{{system_id}}/reports/holders HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Holder Report Template",
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"firstName",
"lastName",
"cards",
"groups",
"email",
"bluetooth",
"pendingBluetooth",
"mobileApp",
"pendingMobileApp",
"enabled",
"pin",
"duressPin",
"partition",
"activeDate",
"expireDate",
"customFields"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe report name.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoA list of report filters.
filters.typeBodyStringYesThe filter type. Possible values include firstName, lastName, email, groups, enabled, credentials, and partition.
filters.operatorBodyStringSometimesThe filter operator. This is required when filters.type is set to firstName, lastName, or email. Possible values include equals, does not equal, contains, and does not contain.
filters.operandBodyStringSometimesThe filter operand. This is required when filters.operator is specified.
filters.caseSensitiveBodyBooleanNoWhether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false.
filters.valueBodyBooleanSometimesThe value used for boolean filters. This is required when filters.type is set to enabled.
filters.memberOfBodyInteger[]NoA list of IDs representing entities that holders should belong to when filters.type is set to groups or partition.
filters.notMemberOfBodyInteger[]NoA list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition.
filters.cardNumberBodyObjectNoThe physical credentials filter. This only applies if filters.type is set to credentials.
filters.cardNumber.operatorBodyStringYesThe physical credentials filter operator. Possible values include equals and does not equal.
filters.cardNumber.operandBodyIntegerYesThe physical credentials filter operand.
filters.mobileBodyObjectNoThe digital credentials filter. This only applies if filters.type is set to credentials.
filters.mobile.typeBodyStringNoThe digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials.
filters.mobile.statusBodyStringNoThe digital credentials filter status. Possible values include accepted and pending.
outputBodyString[]NoThe holder report object properties that should be included in the report output.

Response

The response contains the ID of the newly created holder report template object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "b0131897-1a5f-439e-8fc5-7f9c472c1f99"
}

Retrieve a holder report template

Request

GET https://systems.pdk.io/{{system_id}}/reports/holders/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe holder report template ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains a holder report template object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "b0131897-1a5f-439e-8fc5-7f9c472c1f99",
"name": "Test Holder Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"firstName",
"lastName",
"cards",
"groups",
"email",
"bluetooth",
"pendingBluetooth",
"mobileApp",
"pendingMobileApp",
"enabled",
"pin",
"duressPin",
"partition",
"activeDate",
"expireDate",
"customFields"
]
}

Update a holder report template

Request

PUT https://systems.pdk.io/{{system_id}}/reports/holders/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Holder Report Template",
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"firstName",
"lastName",
"cards",
"groups",
"email",
"bluetooth",
"pendingBluetooth",
"mobileApp",
"pendingMobileApp",
"enabled",
"pin",
"duressPin",
"partition",
"activeDate",
"expireDate",
"customFields"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe holder report template ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe report name.
partitionBodyStringYesThe partition ID.
filtersBodyObject[]NoA list of report filters.
filters.typeBodyStringYesThe filter type. Possible values include firstName, lastName, email, groups, enabled, credentials, and partition.
filters.operatorBodyStringSometimesThe filter operator. This is required when filters.type is set to firstName, lastName, or email. Possible values include equals, does not equal, contains, and does not contain.
filters.operandBodyStringSometimesThe filter operand. This is required when filters.operator is specified.
filters.caseSensitiveBodyBooleanNoWhether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false.
filters.valueBodyBooleanSometimesThe value used for boolean filters. This is required when filters.type is set to enabled.
filters.memberOfBodyInteger[]NoA list of IDs representing entities that holders should belong to when filters.type is set to groups or partition.
filters.notMemberOfBodyInteger[]NoA list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition.
filters.cardNumberBodyObjectNoThe physical credentials filter. This only applies if filters.type is set to credentials.
filters.cardNumber.operatorBodyStringYesThe physical credentials filter operator. Possible values include equals and does not equal.
filters.cardNumber.operandBodyIntegerYesThe physical credentials filter operand.
filters.mobileBodyObjectNoThe digital credentials filter. This only applies if filters.type is set to credentials.
filters.mobile.typeBodyStringNoThe digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials.
filters.mobile.statusBodyStringNoThe digital credentials filter status. Possible values include accepted and pending.
outputBodyString[]NoThe holder report object properties that should be included in the report output.

Response

HTTP/1.1 204 No Content

Delete a holder report template

Request

DELETE https://systems.pdk.io/{{system_id}}/reports/holders/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe report template ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

List all holder report templates

Request

GET https://systems.pdk.io/{{system_id}}/reports/holders HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of holder report template objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"name": "Test Holder Report Template",
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"firstName",
"lastName",
"cards",
"groups",
"email",
"bluetooth",
"pendingBluetooth",
"mobileApp",
"pendingMobileApp",
"enabled",
"pin",
"duressPin",
"partition",
"activeDate",
"expireDate",
"customFields"
]
}
]

Credential Reports

Credential reports provide details about the credentials that have been issued through the access control system.

tip

Credential reports are generated asynchronously and may not be available immediately. For real-time monitoring and data synchronization, use webhooks instead.

The credential report object

{
"id": "83481691-680a-4d8d-9352-9651d3f1753b",
"holderId": "8b37106e-fb08-4700-b14d-70a3967b5086",
"firstName": "John",
"lastName": "Wiegand",
"credentialNumber": "1234567",
"type": ["card"],
"status": "enabled",
"creationTimestamp": "2023-07-19T19:38:23-07:00",
"lastScanTimestamp": "2023-07-20T07:52:21-07:00",
"lastScanDetails": {
"deviceId": "35347d04-a99c-4a58-ab32-1317b832507a",
"deviceName": "Test Device",
"result": "device.request.allowed"
}
}
PropertyTypeDescription
idStringThe credential ID.
holderIdStringThe credential holder's ID.
firstNameStringThe credential holder's first name.
lastNameStringThe credential holder's last name.
credentialNumberStringThe credential number.
typeString[]An array of credential types. Possible values include card for physical credentials, touch for Bluetooth credentials, and token for mobile credentials.
statusStringThe credential status. Possible values include enabled, disabledImplicit, pending, and expired.
creationTimestampStringAn ISO 8601 timestamp representing the time at which the credential was created.
lastScanTimestampStringAn ISO 8601 timestamp representing the time at which the credential was last scanned.
lastScanDetailsObjectAn object describing the last scan event.
lastScanDetails.deviceIdStringThe ID of the device associated with the last scan event.
lastScanDetails.deviceNameStringThe name of the device associated with the last scan event.
lastScanDetails.resultStringThe result of the last scan event.

Preview a credential report

This endpoint allows you to preview up to 50 results without generating and storing a new credential report.

Request

POST https://systems.pdk.io/{{system_id}}/reports/credentials/preview HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
reportIdBodyStringNoThe credential report template ID. If this is specified, all other body parameters will be inherited from the referenced template and must not be specified in this request.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include credentialNumber, type, facilityCode, creationTimestamp, lastScanTimestamp, and status.
filters.oneOf
filters.notOneOf
BodyString[]SometimesThe filter values that determine which credentials are included or excluded. If filters.type is set to credentialNumber or facilityCode, possible values include numbers or number ranges (e.g. ["1234567", "1000-9999"]). If filters.type is set to credentialType, possible values include card for physical credentials, touch for Bluetooth credentials, and token for mobile credentials. If filters.type is set to status, possible values include enabled, disabledImplicit, pending, and expired.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to creationTimestamp or lastScanTimestamp. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
outputBodyString[]NoThe credential report object properties that should be included in the report output.

Response

The response contains an array of credential report objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "83481691-680a-4d8d-9352-9651d3f1753b",
"holderId": "8b37106e-fb08-4700-b14d-70a3967b5086",
"firstName": "John",
"lastName": "Wiegand",
"credentialNumber": "1234567",
"type": ["card"],
"status": "enabled",
"creationTimestamp": "2023-07-19T19:38:23-07:00",
"lastScanTimestamp": "2023-07-20T07:52:21-07:00",
"lastScanDetails": {
"deviceId": "35347d04-a99c-4a58-ab32-1317b832507a",
"deviceName": "Test Device",
"result": "device.request.allowed"
}
}
]

Create a credential report

Request

POST https://systems.pdk.io/{{system_id}}/reports/credentials/generate HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
reportIdBodyStringNoThe credential report template ID. If this is specified, all other body parameters will be inherited from the referenced template and must not be specified in this request.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include credentialNumber, type, facilityCode, creationTimestamp, lastScanTimestamp, and status.
filters.oneOf
filters.notOneOf
BodyString[]SometimesThe filter values that determine which credentials are included or excluded. If filters.type is set to credentialNumber or facilityCode, possible values include numbers or number ranges (e.g. ["1234567", "1000-9999"]). If filters.type is set to credentialType, possible values include card for physical credentials, touch for Bluetooth credentials, and token for mobile credentials. If filters.type is set to status, possible values include enabled, disabledImplicit, pending, and expired.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to creationTimestamp or lastScanTimestamp. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
outputBodyString[]NoThe credential report object properties that should be included in the report output.

Response

Since reports are generated asynchronously, the response does not include any information about the pending report. However, the ID of the pending report is available immediately when you list metadata for all credential reports.

HTTP/1.1 204 No Content

Retrieve a credential report

Request

GET https://systems.pdk.io/{{system_id}}/reports/credentials/requests/{{report_id}}/view HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
reportIdPathStringYesThe credential report ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of credential report objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "83481691-680a-4d8d-9352-9651d3f1753b",
"holderId": "8b37106e-fb08-4700-b14d-70a3967b5086",
"firstName": "John",
"lastName": "Wiegand",
"credentialNumber": "1234567",
"type": ["card"],
"status": "enabled",
"creationTimestamp": "2023-07-19T19:38:23-07:00",
"lastScanTimestamp": "2023-07-20T07:52:21-07:00",
"lastScanDetails": {
"deviceId": "35347d04-a99c-4a58-ab32-1317b832507a",
"deviceName": "Test Device",
"result": "device.request.allowed"
}
}
]

Delete a credential report

Request

DELETE https://systems.pdk.io/{{system_id}}/reports/credentials/requests/{{report_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_idPathStringYesThe report ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

Retrieve metadata for a credential report

Request

GET https://systems.pdk.io/{{system_id}}/reports/credentials/requests/{{report_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_idPathStringYesThe report ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "391f7630-f3b6-4cfc-930d-b3ebfe8fd8fb,
"status": "finished",
"startTime": "2023-07-10T10:41:50-07:00",
"finishedTime": "2023-07-10T10:41:51-07:00",
"truncatedAt": null,
"timezone": "US/Pacific",
"size": {
"csv": 3821,
"html": 22522,
"json": 3953
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"links": "credentials-report-118804-1-1",
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
PropertyTypeDescription
idStringThe report ID.
statusStringThe report status. Possible values include pending, finished, and finishedTruncated (if an error occurred during processing).
startTimeStringThe time the report started processing.
finishedTimeStringThe time the report finished processing.
truncatedAtStringThe time the report aborted processing. This is set to null if the report finished processing successfully.
timezoneStringThe report timezone.
sizeObjectAn object containing the size of each available report file type.
size.csvIntegerThe size (in bytes) of the CSV file output.
size.htmlIntegerThe size (in bytes) of the HTML file output.
size.jsonIntegerThe size (in bytes) of the JSON file output.
entriesCountIntegerThe number of entries in the report.
creatorStringThe name of the user that created the report.
filtersObject[]A list of report filters. See create a credential report for details.
linksStringThe filename used when exporting the report as a file.
outputString[]The credential report object properties that will be included in the report output.

List metadata for all credential reports

Request

GET https://systems.pdk.io/{{system_id}}/reports/credentials/requests HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "391f7630-f3b6-4cfc-930d-b3ebfe8fd8fb,
"status": "finished",
"startTime": "2023-07-10T10:41:50-07:00",
"finishedTime": "2023-07-10T10:41:51-07:00",
"truncatedAt": null,
"timezone": "US/Pacific",
"size": {
"csv": 3821,
"html": 22522,
"json": 3953
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"links": "credentials-report-118804-1-1",
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
]
PropertyTypeDescription
idStringThe report ID.
statusStringThe report status. Possible values include pending, finished, and finishedTruncated (if an error occurred during processing).
startTimeStringThe time the report started processing.
finishedTimeStringThe time the report finished processing.
truncatedAtStringThe time the report aborted processing. This is set to null if the report finished processing successfully.
timezoneStringThe report timezone.
sizeObjectAn object containing the size of each available report file type.
size.csvIntegerThe size (in bytes) of the CSV file output.
size.htmlIntegerThe size (in bytes) of the HTML file output.
size.jsonIntegerThe size (in bytes) of the JSON file output.
entriesCountIntegerThe number of entries in the report.
creatorStringThe name of the user that created the report.
filtersObject[]A list of report filters. See create a credential report for details.
linksStringThe filename used when exporting the report as a file.
outputString[]The credential report object properties that will be included in the report output.

Credential Report Templates

Users can save a set of input filters and output properties by creating a report template. If this template ID is referenced when generating a report, the new report will inherit all the parameters defined in the template. This is useful for reports that are generated regularly to fulfill business auditing requirements.

The credential report template object

{
"id": "dd59de8e-461a-4a57-b91a-6481fd6df594",
"name": "Test Credential Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
PropertyTypeDescription
idStringThe credential report template ID.
nameStringThe credential report template name.
partitionStringThe partition ID.
filtersObject[]An array of filters.
filters.typeStringThe filter type. Possible values include credentialNumber, type, facilityCode, creationTimestamp, lastScanTimestamp, and status.
filters.oneOf
filters.notOneOf
String[]The filter values that determine which credentials are included or excluded. If filters.type is set to credentialNumber or facilityCode, possible values include numbers or number ranges (e.g. ["1234567", "1000-9999"]). If filters.type is set to credentialType, possible values include card for physical credentials, touch for Bluetooth credentials, and token for mobile credentials. If filters.type is set to status, possible values include enabled, disabledImplicit, pending, and expired.
filters.periodStringThe filter date period. This only applies if filters.type is set to creationTimestamp or lastScanTimestamp. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateStringThe filter date in YYYY-MM-DD format. This only applies if filters.period is set to before or after.
filters.startDateStringThe filter start date in YYYY-MM-DD format. This only applies if filters.period is set to custom.
filters.stopDateStringThe filter stop date in YYYY-MM-DD format. This only applies if filters.period is set to custom.
outputString[]The credential report object properties that will be included in the report output.

Create a credential report template

Request

POST https://systems.pdk.io/{{system_id}}/reports/credentials HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Credential Report Template",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe report name.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include credentialNumber, type, facilityCode, creationTimestamp, lastScanTimestamp, and status.
filters.oneOf
filters.notOneOf
BodyString[]SometimesThe filter values that determine which credentials are included or excluded. If filters.type is set to credentialNumber or facilityCode, possible values include numbers or number ranges (e.g. ["1234567", "1000-9999"]). If filters.type is set to credentialType, possible values include card for physical credentials, touch for Bluetooth credentials, and token for mobile credentials. If filters.type is set to status, possible values include enabled, disabledImplicit, pending, and expired.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to creationTimestamp or lastScanTimestamp. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
outputBodyString[]NoThe credential report object properties that should be included in the report output.

Response

The response contains the ID of the newly created credential report template object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "dd59de8e-461a-4a57-b91a-6481fd6df594"
}

Retrieve a credential report template

Request

GET https://systems.pdk.io/{{system_id}}/reports/credentials/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe credential report template ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains a credential report template object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "dd59de8e-461a-4a57-b91a-6481fd6df594",
"name": "Test Credential Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}

Update a credential report template

Request

PUT https://systems.pdk.io/{{system_id}}/reports/credentials/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Credential Report Template",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe report template ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe report name.
partitionBodyStringYesThe partition ID.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include credentialNumber, type, facilityCode, creationTimestamp, lastScanTimestamp, and status.
filters.oneOf
filters.notOneOf
BodyString[]SometimesThe filter values that determine which credentials are included or excluded. If filters.type is set to credentialNumber or facilityCode, possible values include numbers or number ranges (e.g. ["1234567", "1000-9999"]). If filters.type is set to credentialType, possible values include card for physical credentials, touch for Bluetooth credentials, and token for mobile credentials. If filters.type is set to status, possible values include enabled, disabledImplicit, pending, and expired.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to creationTimestamp or lastScanTimestamp. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
outputBodyString[]NoThe credential report object properties that should be included in the report output.

Response

HTTP/1.1 204 No Content

Delete a credential report template

Request

DELETE https://systems.pdk.io/{{system_id}}/reports/credentials/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe report template ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

List all credential report templates

Request

GET https://systems.pdk.io/{{system_id}}/reports/credentials HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of credential report template objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "dd59de8e-461a-4a57-b91a-6481fd6df594",
"name": "Test Credential Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
]

Event Reports

Event reports provide details about events that have occurred in the access control system. These reports are ideal for retrospective analysis, such as investigating an incident.

tip

Event reports are generated asynchronously and may not be available immediately. For real-time monitoring and data synchronization, use webhooks instead.

The event report object

{
"occurred": 1689865796356,
"event": "device.input.cardread",
"result": "device.request.allowed",
"infoText": "Person \"John Wiegand\" has requested access to the device \"Test Device 1\". Access allowed. Person used card for requesting access.",
"details": {
"holderId": "8b37106e-fb08-4700-b14d-70a3967b5086",
"holderName": "John Wiegand",
"deviceId": "35347d04-a99c-4a58-ab32-1317b832507a",
"deviceName": "Test Device",
"credentialId": "83481691-680a-4d8d-9352-9651d3f1753b",
"cardNumber": "1234567"
}
}
PropertyTypeDescription
occurredIntegerThe time of the event represented as a Unix timestamp in milliseconds.
eventStringThe event type.
resultStringThe event result.
infoTextStringA long description of the event.
detailsObjectDetails about the event.
details.holderIdStringThe holder ID.
details.holderNameStringThe holder's name.
details.deviceIdStringThe device ID.
details.deviceNameStringThe device name.
details.credentialIdStringThe credential ID.
details.cardNumberStringThe credential number.
details.ruleIdStringThe rule ID.
details.ruleNameStringThe rule name.
details.groupIdStringThe group ID.
details.groupNameStringThe group name.
details.connectionIdStringThe connection ID.
details.connectionNameStringThe connection name.
details.elevatorIdStringThe elevator reader device ID.
details.elevatorNameStringThe elevator reader device name.

Event Types

  • antipassback.clear
  • antipassback.violation
  • device.actuate.close
  • device.actuate.delayclose
  • device.actuate.delayopen
  • device.actuate.dnd
  • device.actuate.forcetoggle
  • device.actuate.open
  • device.actuate.openclose
  • device.alarm.circuitbreaker.off
  • device.alarm.circuitbreaker.on
  • device.alarm.forced
  • device.alarm.forced.clear
  • device.alarm.propped.alloff
  • device.alarm.propped.off
  • device.alarm.propped.on
  • device.autoopen.off
  • device.autoopen.on
  • device.input.cardread
  • device.input.dps.closed
  • device.input.dps.opened
  • device.input.rex.off
  • device.input.rex.on
  • device.input.virtualread
  • device.request.allowed
  • device.request.anyduress
  • device.request.denied
  • device.request.duress
  • device.request.ecard.allowed
  • device.request.ecard.denied
  • device.request.found
  • device.request.multiallowed
  • device.request.unknown
  • device.try.dwellopen
  • device.try.open
  • endpoint.alarm.comloss.off
  • endpoint.alarm.comloss.on
  • endpoint.input.controller.boot
  • endpoint.input.factory.reset
  • endpoint.input.kill.timer
  • endpoint.input.lp.off
  • endpoint.input.lp.on
  • endpoint.input.pb.connected
  • endpoint.input.pb.disconnected
  • endpoint.input.pi.off
  • endpoint.input.pi.on
  • endpoint.input.po.absent
  • endpoint.input.po.present
  • endpoint.input.pu.absent
  • endpoint.input.pu.present
  • endpoint.time.unknown.enter
  • endpoint.time.unknown.exit
  • entity.added
  • entity.modified
  • entity.removed
  • error.card.parse
  • notification.credential.reset

Event Results

  • action.close
  • action.delay.close
  • action.delay.open
  • action.do.not.disturb
  • action.force.close
  • action.force.open
  • action.force.toggle
  • action.lockdown.off
  • action.lockdown.on
  • action.open
  • action.open.close
  • action.send.email
  • device.request.allowed
  • device.request.denied
  • device.request.filtered
  • device.request.found
  • device.request.multiallowed
  • device.request.unknown

Preview an event report

This endpoint allows you to preview up to 50 results without generating and storing a new event report.

Request

POST https://systems.pdk.io/{{system_id}}/reports/events/preview HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"filters": [
{
"type": "occurred",
"period": "today"
}
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
reportIdBodyStringNoThe event report template ID. If this is specified, all other body parameters will be inherited from the referenced template and must not be specified in this request.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include occurred, event, result, doors, holders, cards, connections, and groups. At least one occurred filter is required.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to occurred. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.oneOf
filters.notOneOf
BodyMixed[]SometimesThe filter values that determine which events are included or excluded. If filters.type is set to event, this is an array of strings representing event types. If filters.type is set to result, this is an array of strings representing event results. If filters.type is set to doors, holders, cards, connections, or groups, this is an array of integers representing device IDs, holder IDs, credential numbers, connection IDs, or group IDs, respectively.
outputBodyString[]NoThe event report object properties that should be included in the report output.

Response

The response contains an array of event report objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"occurred": 1689865796356,
"event": "device.input.cardread",
"result": "device.request.allowed",
"infoText": "Person \"John Wiegand\" has requested access to the device \"Test Device 1\". Access allowed. Person used card for requesting access.",
"details": {
"holderId": "8b37106e-fb08-4700-b14d-70a3967b5086",
"holderName": "John Wiegand",
"deviceId": "35347d04-a99c-4a58-ab32-1317b832507a",
"deviceName": "Test Device",
"credentialId": "83481691-680a-4d8d-9352-9651d3f1753b",
"cardNumber": "1234567"
}
}
]

Create an event report

Request

POST https://systems.pdk.io/{{system_id}}/reports/events/generate HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"filters": [
{
"type": "occurred",
"period": "today"
}
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
reportIdBodyStringNoThe event report template ID. If this is specified, all other body parameters will be inherited from the referenced template and must not be specified in this request.
partitionBodyStringNoThe partition ID.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include occurred, event, result, doors, holders, cards, connections, and groups. At least one occurred filter is required.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to occurred. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.oneOf
filters.notOneOf
BodyMixed[]SometimesThe filter values that determine which events are included or excluded. If filters.type is set to event, this is an array of strings representing event types. If filters.type is set to result, this is an array of strings representing event results. If filters.type is set to doors, holders, cards, connections, or groups, this is an array of integers representing device IDs, holder IDs, credential numbers, connection IDs, or group IDs, respectively.
outputBodyString[]NoThe event report object properties that should be included in the report output.

Response

Since reports are generated asynchronously, the response does not include any information about the pending report. However, the ID of the pending report is available immediately when you list metadata for all event reports.

HTTP/1.1 204 No Content

Retrieve an event report

Request

GET https://systems.pdk.io/{{system_id}}/reports/events/requests/{{report_id}}/view HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
reportIdPathStringYesThe event report ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of event report objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"occurred": 1689865796356,
"event": "device.input.cardread",
"result": "device.request.allowed",
"infoText": "Person \"John Wiegand\" has requested access to the device \"Test Device 1\". Access allowed. Person used card for requesting access.",
"details": {
"holderId": "8b37106e-fb08-4700-b14d-70a3967b5086",
"holderName": "John Wiegand",
"deviceId": "35347d04-a99c-4a58-ab32-1317b832507a",
"deviceName": "Test Device",
"credentialId": "83481691-680a-4d8d-9352-9651d3f1753b",
"cardNumber": "1234567"
}
}
]

Delete an event report

Request

DELETE https://systems.pdk.io/{{system_id}}/reports/events/requests/{{report_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_idPathStringYesThe report ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

Retrieve metadata for an event report

Request

GET https://systems.pdk.io/{{system_id}}/reports/events/requests/{{report_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_idPathStringYesThe report ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "391f7630-f3b6-4cfc-930d-b3ebfe8fd8fb",
"status": "finished",
"startTime": "2023-07-10T10:41:50-07:00",
"finishedTime": "2023-07-10T10:41:51-07:00",
"truncatedAt": null,
"timezone": "US/Pacific",
"size": {
"csv": 3821,
"html": 22522,
"json": 3953
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"links": "event-report-391f7630-f3b6-4cfc-930d-b3ebfe8fd8fb-1696634883",
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.holderId",
"details.holderName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}
PropertyTypeDescription
idStringThe report ID.
statusStringThe report status. Possible values include pending, finished, and finishedTruncated (if an error occurred during processing).
startTimeStringThe time the report started processing.
finishedTimeStringThe time the report finished processing.
truncatedAtStringThe time the report aborted processing. This is set to null if the report finished processing successfully.
timezoneStringThe report timezone.
sizeObjectAn object containing the size of each available report file type.
size.csvIntegerThe size (in bytes) of the CSV file output.
size.htmlIntegerThe size (in bytes) of the HTML file output.
size.jsonIntegerThe size (in bytes) of the JSON file output.
entriesCountIntegerThe number of entries in the report.
creatorStringThe name of the user that created the report.
filtersObject[]A list of report filters. See create a holder report for details.
linksStringThe filename used when exporting the report as a file.
outputString[]The holder report object properties that will be included in the report output.

List metadata for all event reports

Request

GET https://systems.pdk.io/{{system_id}}/reports/events/requests HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "391f7630-f3b6-4cfc-930d-b3ebfe8fd8fb",
"status": "finished",
"startTime": "2023-07-10T10:41:50-07:00",
"finishedTime": "2023-07-10T10:41:51-07:00",
"truncatedAt": null,
"timezone": "US/Pacific",
"size": {
"csv": 3821,
"html": 22522,
"json": 3953
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"links": "event-report-391f7630-f3b6-4cfc-930d-b3ebfe8fd8fb-1696634883",
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.holderId",
"details.holderName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}
]
PropertyTypeDescription
idStringThe report ID.
statusStringThe report status. Possible values include pending, finished, and finishedTruncated (if an error occurred during processing).
startTimeStringThe time the report started processing.
finishedTimeStringThe time the report finished processing.
truncatedAtStringThe time the report aborted processing. This is set to null if the report finished processing successfully.
timezoneStringThe report timezone.
sizeObjectAn object containing the size of each available report file type.
size.csvIntegerThe size (in bytes) of the CSV file output.
size.htmlIntegerThe size (in bytes) of the HTML file output.
size.jsonIntegerThe size (in bytes) of the JSON file output.
entriesCountIntegerThe number of entries in the report.
creatorStringThe name of the user that created the report.
filtersObject[]A list of report filters. See create a holder report for details.
linksStringThe filename used when exporting the report as a file.
outputString[]The holder report object properties that will be included in the report output.

Event Report Templates

Users can save a set of input filters and output properties by creating a report template. If this template ID is referenced when generating a report, the new report will inherit all the parameters defined in the template. This is useful for reports that are generated regularly to fulfill business auditing requirements.

The event report template object

{
"id": "cfa91393-5baf-4d70-a18f-ae1d40f4068e",
"name": "Test Event Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"sort": "desc",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.holderId",
"details.holderName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}
PropertyTypeDescription
idStringThe event report template ID.
nameStringThe event report template name.
partitionStringThe partition ID.
sortStringThe sort order. Possible values include asc and desc.
filtersObject[]An array of filters.
filters.typeStringThe filter type. Possible values include occurred, event, result, doors, holders, cards, connections, and groups.
filters.periodStringThe filter date period. This only applies if filters.type is set to occurred. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateStringThe filter date in YYYY-MM-DD format. This only applies if filters.period is set to before or after.
filters.startDateStringThe filter start date in YYYY-MM-DD format. This only applies if filters.period is set to custom.
filters.stopDateStringThe filter stop date in YYYY-MM-DD format. This only applies if filters.period is set to custom.
filters.oneOf
filters.notOneOf
Mixed[]The filter values that determine which events will be included or excluded. If filters.type is set to event, this is an array of strings representing event types. If filters.type is set to result, this is an array of strings representing event results. If filters.type is set to doors, holders, cards, connections, or groups, this is an array of integers representing device IDs, holder IDs, credential numbers, connection IDs, or group IDs, respectively.
outputString[]The event report object properties that will be included in the report output.

Create an event report template

Request

POST https://systems.pdk.io/{{system_id}}/reports/events HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Event Report Template",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.holderId",
"details.holderName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe report name.
partitionBodyStringNoThe partition ID.
sortBodyStringNoThe sort order. Possible values include asc and desc. The default value is desc.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include occurred, event, result, doors, holders, cards, connections, and groups. At least one occurred filter is required.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to occurred. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.oneOf
filters.notOneOf
BodyMixed[]SometimesThe filter values that determine which events are included or excluded. If filters.type is set to event, this is an array of strings representing event types. If filters.type is set to result, this is an array of strings representing event results. If filters.type is set to doors, holders, cards, connections, or groups, this is an array of integers representing device IDs, holder IDs, credential numbers, connection IDs, or group IDs, respectively.
outputBodyString[]NoThe event report object properties that should be included in the report output.

Response

The response contains the ID of the newly created event report template object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "cfa91393-5baf-4d70-a18f-ae1d40f4068e"
}

Retrieve an event report template

Request

GET https://systems.pdk.io/{{system_id}}/reports/events/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe report template ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an event report template object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "cfa91393-5baf-4d70-a18f-ae1d40f4068e",
"name": "Test Event Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"sort": "desc",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.holderId",
"details.holderName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}

Update an event report template

Request

PUT https://systems.pdk.io/{{system_id}}/reports/events/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Event Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.holderId",
"details.holderName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe report template ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe report name.
partitionBodyStringYesThe partition ID.
sortBodyStringNoThe sort order. Possible values include asc and desc. The default value is desc.
filtersBodyObject[]NoAn array of filters.
filters.typeBodyStringYesThe filter type. Possible values include occurred, event, result, doors, holders, cards, connections, and groups. At least one occurred filter is required.
filters.periodBodyStringSometimesThe filter date period. This is required if filters.type is set to occurred. Possible values include today, yesterday, thisWeek, lastWeek, thisMonth, lastMonth, before, after, and custom.
filters.dateBodyStringSometimesThe filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after.
filters.startDateBodyStringSometimesThe filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.stopDateBodyStringSometimesThe filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom.
filters.oneOf
filters.notOneOf
BodyMixed[]SometimesThe filter values that determine which events are included or excluded. If filters.type is set to event, this is an array of strings representing event types. If filters.type is set to result, this is an array of strings representing event results. If filters.type is set to doors, holders, cards, connections, or groups, this is an array of integers representing device IDs, holder IDs, credential numbers, connection IDs, or group IDs, respectively.
outputBodyString[]NoThe event report object properties that should be included in the report output.

Response

HTTP/1.1 204 No Content

Delete an event report template

Request

DELETE https://systems.pdk.io/{{system_id}}/reports/events/{{report_template_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_template_idPathStringYesThe report template ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

List all event report templates

Request

GET https://systems.pdk.io/{{system_id}}/reports/events HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of event report template objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "cfa91393-5baf-4d70-a18f-ae1d40f4068e",
"name": "Test Event Report Template",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"sort": "desc",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.holderId",
"details.holderName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}
]

Common Endpoints

The following endpoints are common among all report types.

Download a report

Request

GET https://systems.pdk.io/{{system_id}}/reports/file/{{report_filename}}.{{report_file_type}}.zip HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
report_filenamePathStringYesThe filename. This value can be found in the links property of the report metadata.
report_file_typePathStringYesThe desired file type. Possible values include csv, html, and json.
system_tokenHeaderStringYesA valid system token.

Response

The response contains the binary data corresponding to the specified file type.

HTTP/1.1 200 OK
Content-Type: application/zip

...

Retrieve the reporting plan

Request

GET https://systems.pdk.io/{{system_id}}/reports/plan HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
"plan": {
"type": "basic",
"eventDays": 90,
"reportDays": 30,
"scheduledReports": 3,
"storageBytes": 104857600
},
"storageBytesUsed": 59680
}