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.
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}"
}
Property | Type | Description |
---|
id | String | The holder's ID. |
firstName | String | The holder's first name. |
lastName | String | The holder's last name. |
cards | String | A comma-delimited list of the holder's physical credentials. |
groups | String | A comma-delimited list of the holder's groups. |
email | String | The holder's email address. |
enabled | Boolean | Whether the holder is enabled. |
pin | String | The holder's PIN. |
duressPin | String | The holder's duress PIN. |
partition | String | The name of the holder's partition. |
activeDate | String | The start date of the holder's active period formatted as YYYY-MM-DD HH:mm:ss . |
expireDate | String | The end date of the holder's active period formatted as YYYY-MM-DD HH:mm:ss . |
bluetooth | Integer | The number of active Bluetooth credentials issued to the holder. |
pendingBluetooth | Integer | The number of pending Bluetooth credentials issued to the holder. |
mobileApp | Integer | The number of active mobile credentials issued to the holder. |
pendingMobileApp | Integer | The number of pending mobile credentials issued to the holder. |
customFields | String | A 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
{
"filters": [
{
"value": true,
"type": "enabled"
}
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
reportId | Body | String | No | The 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. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | A list of report filters. |
filters.type | Body | String | No | The filter type. Possible values include firstName , lastName , email , groups , enabled , credentials , and partition . |
filters.operator | Body | String | Sometimes | The 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.operand | Body | String | Sometimes | The filter operand. This is required when filters.operator is specified. |
filters.caseSensitive | Body | Boolean | No | Whether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false . |
filters.value | Body | Boolean | Sometimes | The value used for boolean filters. This is required when filters.type is set to enabled . |
filters.memberOf | Body | Integer[] | No | A list of IDs representing entities that holders should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition . |
filters.cardNumber | Body | Object | No | The physical credentials filter. This only applies if filters.type is set to credentials . |
filters.cardNumber.operator | Body | String | Yes | The physical credentials filter operator. Possible values include equals and does not equal . |
filters.cardNumber.operand | Body | Integer | Yes | The physical credentials filter operand. |
filters.mobile | Body | Object | No | The digital credentials filter. This only applies if filters.type is set to credentials . |
filters.mobile.type | Body | String | No | The digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials. |
filters.mobile.status | Body | String | No | The digital credentials filter status. Possible values include accepted and pending . |
output | Body | String[] | No | The 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
[
{
"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
{
"filters": [
{
"value": true,
"type": "enabled"
}
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
reportId | Body | String | No | The 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. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | A list of report filters. |
filters.type | Body | String | No | The filter type. Possible values include firstName , lastName , email , groups , enabled , credentials , and partition . |
filters.operator | Body | String | Sometimes | The 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.operand | Body | String | Sometimes | The filter operand. This is required when filters.operator is specified. |
filters.caseSensitive | Body | Boolean | No | Whether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false . |
filters.value | Body | Boolean | Sometimes | The value used for boolean filters. This is required when filters.type is set to enabled . |
filters.memberOf | Body | Integer[] | No | A list of IDs representing entities that holders should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition . |
filters.cardNumber | Body | Object | No | The physical credentials filter. This only applies if filters.type is set to credentials . |
filters.cardNumber.operator | Body | String | Yes | The physical credentials filter operator. Possible values include equals and does not equal . |
filters.cardNumber.operand | Body | Integer | Yes | The physical credentials filter operand. |
filters.mobile | Body | Object | No | The digital credentials filter. This only applies if filters.type is set to credentials . |
filters.mobile.type | Body | String | No | The digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials. |
filters.mobile.status | Body | String | No | The digital credentials filter status. Possible values include accepted and pending . |
output | Body | String[] | No | The 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.
Retrieve a holder report
Request
GET https://systems.pdk.io/{{system_id}}/reports/holders/requests/{{report_id}}/view HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_id | Path | String | Yes | The holder report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of holder report objects.
HTTP/1.1 200 OK
[
{
"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
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_id | Path | String | Yes | The report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
Request
GET https://systems.pdk.io/{{system_id}}/reports/holders/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_id | Path | String | Yes | The report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 200 OK
{
"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"
}
}
Property | Type | Description |
---|
id | String | The report ID. |
status | String | The report status. Possible values include pending , finished , and finishedTruncated (if an error occurred during processing). |
startTime | String | The time the report started processing. |
finishedTime | String | The time the report finished processing. |
truncatedAt | String | The time the report aborted processing. This is set to null if the report finished processing successfully. |
timezone | String | The report timezone. |
size | Object | An object containing the size of each available report file type. |
size.csv | Integer | The size (in bytes) of the CSV file output. |
size.html | Integer | The size (in bytes) of the HTML file output. |
size.json | Integer | The size (in bytes) of the JSON file output. |
entriesCount | Integer | The number of entries in the report. |
creator | String | The name of the user that created the report. |
filters | Object[] | A list of report filters. See create a holder report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The holder report object properties that should be included in the report output. |
report | Object | The holder report template. |
Request
GET https://systems.pdk.io/{{system_id}}/reports/holders/requests HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 200 OK
[
{
"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"
}
}
]
Property | Type | Description |
---|
id | String | The holder's ID. |
status | String | The report status. Possible values include pending , finished , and finishedTruncated (if an error occurred during processing). |
startTime | String | The time the report started processing. |
finishedTime | String | The time the report finished processing. |
truncatedAt | String | The time the report aborted processing. This is set to null if the report finished processing successfully. |
timezone | String | The report timezone. |
size | Object | An object containing the size of each available report file type. |
size.csv | Integer | The size (in bytes) of the CSV file output. |
size.html | Integer | The size (in bytes) of the HTML file output. |
size.json | Integer | The size (in bytes) of the JSON file output. |
entriesCount | Integer | The number of entries in the report. |
creator | String | The name of the user that created the report. |
filters | Object[] | A list of report filters. See create a holder report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The holder report object properties that should be included in the report output. |
report | Object | The 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"
]
}
Property | Type | Description |
---|
id | String | The holder report template ID. |
name | String | The holder report template name. |
partition | String | The partition ID. |
filters | Object[] | A list of report filters. |
filters.type | String | The filter type. Possible values include firstName , lastName , email , groups , enabled , credentials , and partition . |
filters.operator | String | The filter operator. Possible values include equals , does not equal , contains , and does not contain . |
filters.operand | String | The filter operand. |
filters.caseSensitive | Boolean | Whether the comparison is case sensitive. This only applies when filters.operator is specified. |
filters.value | Boolean | The value used for boolean filters. This only applies when filters.type is set to enabled . |
filters.memberOf | Integer[] | A list of IDs representing entities that holders belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Integer[] | A list of IDs representing entities that holders do not belong to when filters.type is set to groups or partition . |
filters.cardNumber | Object | The physical credentials filter. This only applies if filters.type is set to credentials . |
filters.cardNumber.operator | String | The physical credentials filter operator. Possible values include equals and does not equal . |
filters.cardNumber.operand | Integer | The physical credentials filter operand. |
filters.mobile | Object | The digital credentials filter. This only applies if filters.type is set to credentials . |
filters.mobile.type | String | The digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials. |
filters.mobile.status | String | The digital credentials filter status. Possible values include accepted and pending . |
output | String[] | 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
{
"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"
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The report name. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | A list of report filters. |
filters.type | Body | String | Yes | The filter type. Possible values include firstName , lastName , email , groups , enabled , credentials , and partition . |
filters.operator | Body | String | Sometimes | The 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.operand | Body | String | Sometimes | The filter operand. This is required when filters.operator is specified. |
filters.caseSensitive | Body | Boolean | No | Whether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false . |
filters.value | Body | Boolean | Sometimes | The value used for boolean filters. This is required when filters.type is set to enabled . |
filters.memberOf | Body | Integer[] | No | A list of IDs representing entities that holders should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition . |
filters.cardNumber | Body | Object | No | The physical credentials filter. This only applies if filters.type is set to credentials . |
filters.cardNumber.operator | Body | String | Yes | The physical credentials filter operator. Possible values include equals and does not equal . |
filters.cardNumber.operand | Body | Integer | Yes | The physical credentials filter operand. |
filters.mobile | Body | Object | No | The digital credentials filter. This only applies if filters.type is set to credentials . |
filters.mobile.type | Body | String | No | The digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials. |
filters.mobile.status | Body | String | No | The digital credentials filter status. Possible values include accepted and pending . |
output | Body | String[] | No | The 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
{
"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
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The holder report template ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains a holder report template object.
HTTP/1.1 200 OK
{
"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
{
"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"
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The holder report template ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The report name. |
partition | Body | String | Yes | The partition ID. |
filters | Body | Object[] | No | A list of report filters. |
filters.type | Body | String | Yes | The filter type. Possible values include firstName , lastName , email , groups , enabled , credentials , and partition . |
filters.operator | Body | String | Sometimes | The 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.operand | Body | String | Sometimes | The filter operand. This is required when filters.operator is specified. |
filters.caseSensitive | Body | Boolean | No | Whether the comparison should be case sensitive. This only applies when filters.operator is specified. The default value is false . |
filters.value | Body | Boolean | Sometimes | The value used for boolean filters. This is required when filters.type is set to enabled . |
filters.memberOf | Body | Integer[] | No | A list of IDs representing entities that holders should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that holders should not belong to when filters.type is set to groups or partition . |
filters.cardNumber | Body | Object | No | The physical credentials filter. This only applies if filters.type is set to credentials . |
filters.cardNumber.operator | Body | String | Yes | The physical credentials filter operator. Possible values include equals and does not equal . |
filters.cardNumber.operand | Body | Integer | Yes | The physical credentials filter operand. |
filters.mobile | Body | Object | No | The digital credentials filter. This only applies if filters.type is set to credentials . |
filters.mobile.type | Body | String | No | The digital credentials filter type. Possible values include touch for Bluetooth credentials and token for mobile credentials. |
filters.mobile.status | Body | String | No | The digital credentials filter status. Possible values include accepted and pending . |
output | Body | String[] | No | The holder report object properties that should be included in the report output. |
Response
Delete a holder report template
Request
DELETE https://systems.pdk.io/{{system_id}}/reports/holders/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The report template ID. |
system_token | Header | String | Yes | A valid system token. |
Response
List all holder report templates
Request
GET https://systems.pdk.io/{{system_id}}/reports/holders HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of holder report template objects.
HTTP/1.1 200 OK
[
{
"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.
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"
}
}
Property | Type | Description |
---|
id | String | The credential ID. |
holderId | String | The credential holder's ID. |
firstName | String | The credential holder's first name. |
lastName | String | The credential holder's last name. |
credentialNumber | String | The credential number. |
type | String[] | An array of credential types. Possible values include card for physical credentials, touch for Bluetooth credentials, and token for mobile credentials. |
status | String | The credential status. Possible values include enabled , disabledImplicit , pending , and expired . |
creationTimestamp | String | An ISO 8601 timestamp representing the time at which the credential was created. |
lastScanTimestamp | String | An ISO 8601 timestamp representing the time at which the credential was last scanned. |
lastScanDetails | Object | An object describing the last scan event. |
lastScanDetails.deviceId | String | The ID of the device associated with the last scan event. |
lastScanDetails.deviceName | String | The name of the device associated with the last scan event. |
lastScanDetails.result | String | The 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
{
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
reportId | Body | String | No | The 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. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include credentialNumber , type , facilityCode , creationTimestamp , lastScanTimestamp , and status . |
filters.oneOf
filters.notOneOf | Body | String[] | Sometimes | 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.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
output | Body | String[] | No | The 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
[
{
"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
{
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
reportId | Body | String | No | The 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. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include credentialNumber , type , facilityCode , creationTimestamp , lastScanTimestamp , and status . |
filters.oneOf
filters.notOneOf | Body | String[] | Sometimes | 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.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
output | Body | String[] | No | The 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.
Retrieve a credential report
Request
GET https://systems.pdk.io/{{system_id}}/reports/credentials/requests/{{report_id}}/view HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
reportId | Path | String | Yes | The credential report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of credential report objects.
HTTP/1.1 200 OK
[
{
"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
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_id | Path | String | Yes | The report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
Request
GET https://systems.pdk.io/{{system_id}}/reports/credentials/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_id | Path | String | Yes | The report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 200 OK
{
"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"
]
}
Property | Type | Description |
---|
id | String | The report ID. |
status | String | The report status. Possible values include pending , finished , and finishedTruncated (if an error occurred during processing). |
startTime | String | The time the report started processing. |
finishedTime | String | The time the report finished processing. |
truncatedAt | String | The time the report aborted processing. This is set to null if the report finished processing successfully. |
timezone | String | The report timezone. |
size | Object | An object containing the size of each available report file type. |
size.csv | Integer | The size (in bytes) of the CSV file output. |
size.html | Integer | The size (in bytes) of the HTML file output. |
size.json | Integer | The size (in bytes) of the JSON file output. |
entriesCount | Integer | The number of entries in the report. |
creator | String | The name of the user that created the report. |
filters | Object[] | A list of report filters. See create a credential report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The credential report object properties that will be included in the report output. |
Request
GET https://systems.pdk.io/{{system_id}}/reports/credentials/requests HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 200 OK
[
{
"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"
]
}
]
Property | Type | Description |
---|
id | String | The report ID. |
status | String | The report status. Possible values include pending , finished , and finishedTruncated (if an error occurred during processing). |
startTime | String | The time the report started processing. |
finishedTime | String | The time the report finished processing. |
truncatedAt | String | The time the report aborted processing. This is set to null if the report finished processing successfully. |
timezone | String | The report timezone. |
size | Object | An object containing the size of each available report file type. |
size.csv | Integer | The size (in bytes) of the CSV file output. |
size.html | Integer | The size (in bytes) of the HTML file output. |
size.json | Integer | The size (in bytes) of the JSON file output. |
entriesCount | Integer | The number of entries in the report. |
creator | String | The name of the user that created the report. |
filters | Object[] | A list of report filters. See create a credential report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | 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"
]
}
Property | Type | Description |
---|
id | String | The credential report template ID. |
name | String | The credential report template name. |
partition | String | The partition ID. |
filters | Object[] | An array of filters. |
filters.type | String | The 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.period | String | The 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.date | String | The filter date in YYYY-MM-DD format. This only applies if filters.period is set to before or after . |
filters.startDate | String | The filter start date in YYYY-MM-DD format. This only applies if filters.period is set to custom . |
filters.stopDate | String | The filter stop date in YYYY-MM-DD format. This only applies if filters.period is set to custom . |
output | String[] | 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
{
"name": "Test Credential Report Template",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The report name. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include credentialNumber , type , facilityCode , creationTimestamp , lastScanTimestamp , and status . |
filters.oneOf
filters.notOneOf | Body | String[] | Sometimes | 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.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
output | Body | String[] | No | The 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
{
"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
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The credential report template ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains a credential report template object.
HTTP/1.1 200 OK
{
"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
{
"name": "Test Credential Report Template",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"holderId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The report template ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The report name. |
partition | Body | String | Yes | The partition ID. |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include credentialNumber , type , facilityCode , creationTimestamp , lastScanTimestamp , and status . |
filters.oneOf
filters.notOneOf | Body | String[] | Sometimes | 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.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
output | Body | String[] | No | The credential report object properties that should be included in the report output. |
Response
Delete a credential report template
Request
DELETE https://systems.pdk.io/{{system_id}}/reports/credentials/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The report template ID. |
system_token | Header | String | Yes | A valid system token. |
Response
List all credential report templates
Request
GET https://systems.pdk.io/{{system_id}}/reports/credentials HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of credential report template objects.
HTTP/1.1 200 OK
[
{
"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.
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"
}
}
Property | Type | Description |
---|
occurred | Integer | The time of the event represented as a Unix timestamp in milliseconds. |
event | String | The event type. |
result | String | The event result. |
infoText | String | A long description of the event. |
details | Object | Details about the event. |
details.holderId | String | The holder ID. |
details.holderName | String | The holder's name. |
details.deviceId | String | The device ID. |
details.deviceName | String | The device name. |
details.credentialId | String | The credential ID. |
details.cardNumber | String | The credential number. |
details.ruleId | String | The rule ID. |
details.ruleName | String | The rule name. |
details.groupId | String | The group ID. |
details.groupName | String | The group name. |
details.connectionId | String | The connection ID. |
details.connectionName | String | The connection name. |
details.elevatorId | String | The elevator reader device ID. |
details.elevatorName | String | The 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
{
"filters": [
{
"type": "occurred",
"period": "today"
}
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
reportId | Body | String | No | The 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. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include occurred , event , result , doors , holders , cards , connections , and groups . At least one occurred filter is required. |
filters.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.oneOf
filters.notOneOf | Body | Mixed[] | Sometimes | The 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. |
output | Body | String[] | No | The 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
[
{
"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
{
"filters": [
{
"type": "occurred",
"period": "today"
}
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
reportId | Body | String | No | The 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. |
partition | Body | String | No | The partition ID. |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include occurred , event , result , doors , holders , cards , connections , and groups . At least one occurred filter is required. |
filters.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.oneOf
filters.notOneOf | Body | Mixed[] | Sometimes | The 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. |
output | Body | String[] | No | The 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.
Retrieve an event report
Request
GET https://systems.pdk.io/{{system_id}}/reports/events/requests/{{report_id}}/view HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
reportId | Path | String | Yes | The event report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of event report objects.
HTTP/1.1 200 OK
[
{
"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
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_id | Path | String | Yes | The report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
Request
GET https://systems.pdk.io/{{system_id}}/reports/events/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_id | Path | String | Yes | The report ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 200 OK
{
"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"
]
}
Property | Type | Description |
---|
id | String | The report ID. |
status | String | The report status. Possible values include pending , finished , and finishedTruncated (if an error occurred during processing). |
startTime | String | The time the report started processing. |
finishedTime | String | The time the report finished processing. |
truncatedAt | String | The time the report aborted processing. This is set to null if the report finished processing successfully. |
timezone | String | The report timezone. |
size | Object | An object containing the size of each available report file type. |
size.csv | Integer | The size (in bytes) of the CSV file output. |
size.html | Integer | The size (in bytes) of the HTML file output. |
size.json | Integer | The size (in bytes) of the JSON file output. |
entriesCount | Integer | The number of entries in the report. |
creator | String | The name of the user that created the report. |
filters | Object[] | A list of report filters. See create a holder report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The holder report object properties that will be included in the report output. |
Request
GET https://systems.pdk.io/{{system_id}}/reports/events/requests HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 200 OK
[
{
"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"
]
}
]
Property | Type | Description |
---|
id | String | The report ID. |
status | String | The report status. Possible values include pending , finished , and finishedTruncated (if an error occurred during processing). |
startTime | String | The time the report started processing. |
finishedTime | String | The time the report finished processing. |
truncatedAt | String | The time the report aborted processing. This is set to null if the report finished processing successfully. |
timezone | String | The report timezone. |
size | Object | An object containing the size of each available report file type. |
size.csv | Integer | The size (in bytes) of the CSV file output. |
size.html | Integer | The size (in bytes) of the HTML file output. |
size.json | Integer | The size (in bytes) of the JSON file output. |
entriesCount | Integer | The number of entries in the report. |
creator | String | The name of the user that created the report. |
filters | Object[] | A list of report filters. See create a holder report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | 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"
]
}
Property | Type | Description |
---|
id | String | The event report template ID. |
name | String | The event report template name. |
partition | String | The partition ID. |
sort | String | The sort order. Possible values include asc and desc . |
filters | Object[] | An array of filters. |
filters.type | String | The filter type. Possible values include occurred , event , result , doors , holders , cards , connections , and groups . |
filters.period | String | The 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.date | String | The filter date in YYYY-MM-DD format. This only applies if filters.period is set to before or after . |
filters.startDate | String | The filter start date in YYYY-MM-DD format. This only applies if filters.period is set to custom . |
filters.stopDate | String | The 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. |
output | String[] | 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
{
"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"
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The report name. |
partition | Body | String | No | The partition ID. |
sort | Body | String | No | The sort order. Possible values include asc and desc . The default value is desc . |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include occurred , event , result , doors , holders , cards , connections , and groups . At least one occurred filter is required. |
filters.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.oneOf
filters.notOneOf | Body | Mixed[] | Sometimes | The 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. |
output | Body | String[] | No | The 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
{
"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
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The report template ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an event report template object.
HTTP/1.1 200 OK
{
"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
{
"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"
]
}
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The report template ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The report name. |
partition | Body | String | Yes | The partition ID. |
sort | Body | String | No | The sort order. Possible values include asc and desc . The default value is desc . |
filters | Body | Object[] | No | An array of filters. |
filters.type | Body | String | Yes | The filter type. Possible values include occurred , event , result , doors , holders , cards , connections , and groups . At least one occurred filter is required. |
filters.period | Body | String | Sometimes | The 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.date | Body | String | Sometimes | The filter date in YYYY-MM-DD format. This is required if filters.period is set to before or after . |
filters.startDate | Body | String | Sometimes | The filter start date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.stopDate | Body | String | Sometimes | The filter stop date in YYYY-MM-DD format. This is required if filters.period is set to custom . |
filters.oneOf
filters.notOneOf | Body | Mixed[] | Sometimes | The 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. |
output | Body | String[] | No | The event report object properties that should be included in the report output. |
Response
Delete an event report template
Request
DELETE https://systems.pdk.io/{{system_id}}/reports/events/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_template_id | Path | String | Yes | The report template ID. |
system_token | Header | String | Yes | A valid system token. |
Response
List all event report templates
Request
GET https://systems.pdk.io/{{system_id}}/reports/events HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of event report template objects.
HTTP/1.1 200 OK
[
{
"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
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
report_filename | Path | String | Yes | The filename. This value can be found in the links property of the report metadata. |
report_file_type | Path | String | Yes | The desired file type. Possible values include csv , html , and json . |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains the binary data corresponding to the specified file type.
Retrieve the reporting plan
Request
GET https://systems.pdk.io/{{system_id}}/reports/plan HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 200 OK
{
"plan": {
"type": "basic",
"eventDays": 90,
"reportDays": 30,
"scheduledReports": 3,
"storageBytes": 104857600
},
"storageBytesUsed": 59680
}