The following endpoints allow users to generate human-readable reports for people, credentials, and events in the access control system. These reports can be used to fulfill business auditing requirements.
People Reports
People reports provide details about credential holders in the access control system.
The people report object
{
"id": 1,
"First Name": "John",
"Last Name": "Wiegand",
"Cards": "123456,123457",
"Groups": "Test Group 1,Test Group 2",
"Email": "john@example.com",
"Enabled": true,
"Pin": "123456",
"Duress Pin": "9123456",
"Partition": "Default",
"Active Date": "2023-07-01T00:00:00-07:00",
"Expire Date": "2024-07-01T00:00:00-07:00",
"Mobile App": 1,
"Pending Mobile App": 0,
"Bluetooth": 1,
"Pending Bluetooth": 0,
"Custom Fields": "{\"Employee ID\":123456}"
}
Property | Type | Description |
---|
id | Integer | The person's ID. |
First Name | String | The person's first name. |
Last Name | String | The person's last name. |
Cards | String | A comma-delimited list of the person's physical credentials. |
Groups | String | A comma-delimited list of the person's groups. |
Email | String | The person's email address. |
Enabled | Boolean | Whether the person is enabled. |
Pin | String | The person's PIN. |
Duress Pin | String | The person's duress PIN. |
Partition | String | The name of the person's partition. |
Active Date | String | The start date of the person's active period. |
Expire Date | String | The end date of the person's active period. |
Mobile App | Integer | The number of active mobile credentials issued to the person. |
Pending Mobile App | Integer | The number of pending mobile credentials issued to the person. |
Bluetooth | Integer | The number of active Bluetooth credentials issued to the person. |
Pending Bluetooth | Integer | The number of pending Bluetooth credentials issued to the person. |
Custom Fields | String | A JSON string of the person's custom field values. |
Preview a people report
This endpoint allows you to preview up to 50 results without generating and storing a new people report.
Request
POST https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/preview HTTP/1.1
{
"filters": [
{
"type": "enabled",
"value": true
}
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
reportId | Body | Integer | No | The people 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 | Integer | 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 people should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that people 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 people report object properties that should be included in the report output. Note that the Custom Fields property must be specified here as Custom Attributes . |
Response
The response contains an array of people report objects.
HTTP/1.1 200 OK
[
{
"id": 1,
"First Name": "John",
"Last Name": "Wiegand",
"Cards": "123456,123457",
"Groups": "Test Group 1,Test Group 2",
"Email": "john@example.com",
"Enabled": true,
"Pin": "123456",
"Duress Pin": "9123456",
"Partition": "Default",
"Active Date": "2023-07-01T00:00:00-07:00",
"Expire Date": "2024-07-01T00:00:00-07:00",
"Mobile App": 1,
"Pending Mobile App": 0,
"Bluetooth": 1,
"Pending Bluetooth": 0,
"Custom Fields": "{\"Employee ID\":123456}"
}
]
Create a people report
Request
POST https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/generate HTTP/1.1
{
"filters": [
{
"type": "enabled",
"value": true
}
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
reportId | Body | Integer | No | The people 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 | Integer | 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 people should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that people 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 people report object properties that should be included in the report output. Note that the Custom Fields property must be specified here as Custom Attributes . |
Response
Since reports are generated asynchronously, the response does not include any information about the pending report. However, once the report has been generated, you can list metadata for all people reports to find the ID of the newly created report.
Retrieve a people report
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/requests/{{report_id}}/view HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_id | Path | String | Yes | The people report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an array of people report objects.
HTTP/1.1 200 OK
[
{
"id": 1,
"First Name": "John",
"Last Name": "Wiegand",
"Cards": "123456,123457",
"Groups": "Test Group 1,Test Group 2",
"Email": "john@example.com",
"Enabled": true,
"Pin": "123456",
"Duress Pin": "9123456",
"Partition": "Default",
"Active Date": "2023-07-01T00:00:00-07:00",
"Expire Date": "2024-07-01T00:00:00-07:00",
"Mobile App": 1,
"Pending Mobile App": 0,
"Bluetooth": 1,
"Pending Bluetooth": 0,
"Custom Fields": "{\"Employee ID\":123456}"
}
]
Delete a people report
Request
DELETE https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_id | Path | Integer | Yes | The report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
Export a people report
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/file/{{filename}}.{{type}}.zip HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
filename | Path | String | Yes | The filename. This value can be found in the links property of the people report metadata. |
type | Path | String | Yes | The desired file type. Possible values include csv , html , and json . |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains the binary data corresponding to the specified file type.
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_id | Path | Integer | Yes | The report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 200 OK
{
"id": 123,
"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": 382,
"html": 2252,
"json": 395
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "enabled",
"value": true
}
],
"links": "people-report-118803-1-1",
"output": [
"id",
"First Name",
"Last Name",
"Cards",
"Groups",
"Email",
"Touch",
"Unredeemed Touch",
"Token",
"Unredeemed Token",
"Enabled",
"Pin",
"Duress Pin",
"Partition",
"Active Date",
"Expire Date",
"Custom Attributes"
]
}
Property | Type | Description |
---|
id | Integer | 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 people report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The people report object properties included in the report output. Note that the Custom Fields property is specified here as Custom Attributes . |
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/requests HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
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. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 200 OK
[
{
"id": 123,
"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": 382,
"html": 2252,
"json": 395
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "enabled",
"value": true
}
],
"links": "people-report-118803-1-1",
"output": [
"id",
"First Name",
"Last Name",
"Cards",
"Groups",
"Email",
"Touch",
"Unredeemed Touch",
"Token",
"Unredeemed Token",
"Enabled",
"Pin",
"Duress Pin",
"Partition",
"Active Date",
"Expire Date",
"Custom Attributes"
]
}
]
Property | Type | Description |
---|
id | Integer | The person'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 people report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The people report object properties included in the report output. Note that the Custom Fields property is specified here as Custom Attributes . |
People 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 people report template object
{
"id": 1,
"name": "Test People Report Template",
"partition": 0,
"filters": [
{
"value": true,
"type": "enabled"
}
],
"output": [
"id",
"First Name",
"Last Name",
"Cards",
"Groups",
"Email",
"Touch",
"Unredeemed Touch",
"Token",
"Unredeemed Token",
"Enabled",
"Pin",
"Duress Pin",
"Partition",
"Active Date",
"Expire Date",
"Custom Attributes"
]
}
Property | Type | Description |
---|
id | Integer | The people report template ID. |
name | String | The people report template name. |
partition | Integer | 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 people belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Integer[] | A list of IDs representing entities that people 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 people report object properties that are included in the report output. |
Create a people report template
Request
POST https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople HTTP/1.1
{
"name": "Test People Report Template",
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"First Name",
"Last Name",
"Cards",
"Groups",
"Email",
"Touch",
"Unredeemed Touch",
"Token",
"Unredeemed Token",
"Enabled",
"Pin",
"Duress Pin",
"Partition",
"Active Date",
"Expire Date",
"Custom Attributes"
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The report name. |
partition | Body | Integer | 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 people should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that people 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 people report object properties that should be included in the report output. Note that the Custom Fields property must be specified here as Custom Attributes . |
Response
The response contains the ID of the newly created people report template object.
HTTP/1.1 200 OK
{
"id": 1
}
Retrieve a people report template
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The people report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains a people report template object.
HTTP/1.1 200 OK
{
"id": 1,
"name": "Test People Report Template",
"partition": 0,
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"First Name",
"Last Name",
"Cards",
"Groups",
"Email",
"Touch",
"Unredeemed Touch",
"Token",
"Unredeemed Token",
"Enabled",
"Pin",
"Duress Pin",
"Partition",
"Active Date",
"Expire Date",
"Custom Attributes"
]
}
Update a people report template
Request
PUT https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/{{report_template_id}} HTTP/1.1
{
"name": "Test People Report Template",
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"First Name",
"Last Name",
"Cards",
"Groups",
"Email",
"Touch",
"Unredeemed Touch",
"Token",
"Unredeemed Token",
"Enabled",
"Pin",
"Duress Pin",
"Partition",
"Active Date",
"Expire Date",
"Custom Attributes"
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The people report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The report name. |
partition | Body | Integer | 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 people should belong to when filters.type is set to groups or partition . |
filters.notMemberOf | Body | Integer[] | No | A list of IDs representing entities that people 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 people report object properties that should be included in the report output. Note that the Custom Fields property must be specified here as Custom Attributes . |
Response
Delete a people report template
Request
DELETE https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
List all people report templates
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudpeople HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
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. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an array of people report template objects.
HTTP/1.1 200 OK
[
{
"id": 1,
"name": "Test People Report Template",
"partition": 0,
"filters": [
{
"type": "enabled",
"value": true
}
],
"output": [
"id",
"First Name",
"Last Name",
"Cards",
"Groups",
"Email",
"Touch",
"Unredeemed Touch",
"Token",
"Unredeemed Token",
"Enabled",
"Pin",
"Duress Pin",
"Partition",
"Active Date",
"Expire Date",
"Custom Attributes"
]
}
]
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 entity.added, entity.modified, and entity.removed webhooks instead.
The credential report object
{
"id": 1,
"personId": 1,
"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": {
"doorId": 1,
"doorName": "Test Device",
"result": "door.request.allowed"
}
}
Property | Type | Description |
---|
id | Integer | The credential ID. |
personId | Integer | 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.doorId | Integer | The ID of the device associated with the last scan event. |
lastScanDetails.doorName | 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://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/preview HTTP/1.1
{
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
reportId | Body | Integer | 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 | Integer | 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 should be 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": 1,
"credentialNumber": "1234567",
"type": ["card"],
"status": "enabled",
"personId": 1,
"firstName": "John",
"lastName": "Wiegand",
"creationTimestamp": "2023-07-19T19:38:23-07:00",
"lastScanTimestamp": "2023-07-20T07:52:21-07:00",
"lastScanDetails": {
"doorId": 1,
"doorName": "Test Device",
"result": "door.request.allowed"
}
},
{
"id": 2,
"credentialNumber": null,
"type": ["touch", "token"],
"status": "pending",
"personId": 1,
"firstName": "John",
"lastName": "Wiegand",
"creationTimestamp": "2023-07-19T19:38:23-07:00",
"lastScanTimestamp": "2023-07-20T07:52:21-07:00",
"lastScanDetails": {
"doorId": 1,
"doorName": "Test Device",
"result": "door.request.allowed"
}
}
]
Create a credential report
Request
POST https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/generate HTTP/1.1
{
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
reportId | Body | Integer | 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 | Integer | 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 should be 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, once the report has been generated, you can list metadata for all credential reports to find the ID of the newly created report.
Retrieve a credential report
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/requests/{{report_id}}/view HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
reportId | Path | Integer | Yes | The credential report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an array of credential report objects.
HTTP/1.1 200 OK
[
{
"id": 1,
"credentialNumber": "1234567",
"type": ["card"],
"status": "enabled",
"personId": 1,
"firstName": "John",
"lastName": "Wiegand",
"creationTimestamp": "2023-07-19T19:38:23-07:00",
"lastScanTimestamp": "2023-07-20T07:52:21-07:00",
"lastScanDetails": {
"doorId": 1,
"doorName": "Test Device",
"result": "door.request.allowed"
}
},
{
"id": 2,
"credentialNumber": null,
"type": ["touch", "token"],
"status": "pending",
"personId": 1,
"firstName": "John",
"lastName": "Wiegand",
"creationTimestamp": "2023-07-19T19:38:23-07:00",
"lastScanTimestamp": "2023-07-20T07:52:21-07:00",
"lastScanDetails": {
"doorId": 1,
"doorName": "Test Device",
"result": "door.request.allowed"
}
}
]
Delete a credential report
Request
DELETE https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_id | Path | Integer | Yes | The report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
Export a credential report
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/file/{{filename}}.{{type}}.zip HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
filename | Path | String | Yes | The filename. This value can be found in the links property of the credential report metadata. |
type | Path | String | Yes | The desired file type. Possible values include csv , html , and json . |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains the binary data corresponding to the specified file type.
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_id | Path | Integer | Yes | The report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 200 OK
{
"id": 123,
"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": 382,
"html": 2252,
"json": 395
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"links": "credentials-report-118804-1-1",
"output": [
"id",
"credentialNumber",
"type",
"status",
"personId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
Property | Type | Description |
---|
id | Integer | 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 included in the report output. |
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/requests HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
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. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 200 OK
[
{
"id": 123,
"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": 382,
"html": 2252,
"json": 395
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"links": "credentials-report-118804-1-1",
"output": [
"id",
"credentialNumber",
"type",
"status",
"personId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
]
Property | Type | Description |
---|
id | Integer | 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 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": 1,
"name": "Test Credential Report Template",
"partition": 0,
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"personId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
Property | Type | Description |
---|
id | Integer | The credential report template ID. |
name | String | The credential report template name. |
partition | Integer | 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://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials HTTP/1.1
{
"name": "Test Credential Report Template",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"personId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The report name. |
partition | Body | Integer | 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 should be 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": 1
}
Retrieve a credential report template
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The credential report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains a credential report template object.
HTTP/1.1 200 OK
{
"id": 1,
"name": "Test Credential Report Template",
"partition": 0,
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"personId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
Update a credential report template
Request
PUT https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/{{report_template_id}} HTTP/1.1
{
"name": "Test Credential Report Template",
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"personId",
"firstName",
"lastName",
"creationTimestamp",
"lastScanTimestamp",
"lastScanDetails"
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The report name. |
partition | Body | Integer | 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 should be 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://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
List all credential report templates
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudcredentials HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
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. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an array of credential report template objects.
HTTP/1.1 200 OK
[
{
"id": 1,
"name": "Test Credential Report Template",
"partition": 0,
"filters": [
{
"type": "type",
"oneOf": ["touch", "token"]
}
],
"output": [
"id",
"credentialNumber",
"type",
"status",
"personId",
"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": "door.input.cardread",
"result": "door.request.allowed",
"infoText": "Person \"John Wiegand\" has requested access to the device \"Test Device 1\". Access allowed. Person used card for requesting access.",
"details": {
"personId": 1,
"personName": "John Wiegand",
"deviceId": 1,
"deviceName": "Test Device",
"credentialId": 1,
"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.personId | Integer | The person ID. |
details.personName | String | The person's name. |
details.deviceId | Integer | The device ID. |
details.deviceName | String | The device name. |
details.credentialId | Integer | The credential ID. |
details.cardNumber | String | The credential number. |
details.ruleId | Integer | The rule ID. |
details.ruleName | String | The rule name. |
details.groupId | Integer | The group ID. |
details.groupName | String | The group name. |
details.connectionId | Integer | The connection ID. |
details.connectionName | String | The connection name. |
details.elevatorId | Integer | The elevator reader device ID. |
details.elevatorName | String | The elevator reader device name. |
Event Types
antipassback.clear
antipassback.violation
door.actuate.close
door.actuate.delayclose
door.actuate.delayopen
door.actuate.dnd
door.actuate.forcetoggle
door.actuate.open
door.actuate.openclose
door.alarm.circuitbreaker.off
door.alarm.circuitbreaker.on
door.alarm.forced
door.alarm.forced.clear
door.alarm.propped.alloff
door.alarm.propped.off
door.alarm.propped.on
door.autoopen.off
door.autoopen.on
door.input.cardread
door.input.dps.closed
door.input.dps.opened
door.input.rex.off
door.input.rex.on
door.input.virtualread
door.request.allowed
door.request.anyduress
door.request.denied
door.request.duress
door.request.ecard.allowed
door.request.ecard.denied
door.request.found
door.request.multiallowed
door.request.unknown
door.try.dwellopen
door.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
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
door.request.allowed
door.request.denied
door.request.filtered
door.request.found
door.request.multiallowed
door.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://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/preview HTTP/1.1
{
"filters": [
{
"type": "occurred",
"period": "today"
}
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
reportId | Body | Integer | 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 | Integer | 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 , persons , 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 should 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 , persons , cards , connections , or groups , this is an array of integers representing device IDs, person 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": 1689865816079,
"event": "door.input.cardread",
"result": "door.request.found",
"infoText": "Person \"John Wiegand\" has performed credentials input on the device \"Test Device 1\". Person used card for requesting access.",
"details": {
"personId": 1,
"personName": "John Wiegand",
"deviceId": 1,
"deviceName": "Test Device",
"credentialId": 1,
"cardNumber": "1234567"
}
},
{
"occurred": 1689865796356,
"event": "door.input.cardread",
"result": "door.request.allowed",
"infoText": "Person \"John Wiegand\" has requested access to the device \"Test Device 1\". Access allowed. Person used card for requesting access.",
"details": {
"personId": 1,
"personName": "John Wiegand",
"deviceId": 1,
"deviceName": "Test Device",
"credentialId": 1,
"cardNumber": "1234567"
}
}
]
Create an event report
Request
POST https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/generate HTTP/1.1
{
"filters": [
{
"type": "occurred",
"period": "today"
}
]
}
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
reportId | Body | Integer | 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 | Integer | 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 , persons , 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 should 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 , persons , cards , connections , or groups , this is an array of integers representing device IDs, person 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, once the report has been generated, you can list metadata for all event reports to find the ID of the newly created report.
Retrieve an event report
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/requests/{{report_id}}/view HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
reportId | Path | Integer | Yes | The event report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an array of event report objects.
HTTP/1.1 200 OK
[
{
"occurred": 1689865816079,
"event": "door.input.cardread",
"result": "door.request.found",
"infoText": "Person \"John Wiegand\" has performed credentials input on the device \"Test Device 1\". Person used card for requesting access.",
"details": {
"personId": 1,
"personName": "John Wiegand",
"deviceId": 1,
"deviceName": "Test Device",
"credentialId": 1,
"cardNumber": "1234567"
}
},
{
"occurred": 1689865796356,
"event": "door.input.cardread",
"result": "door.request.allowed",
"infoText": "Person \"John Wiegand\" has requested access to the device \"Test Device 1\". Access allowed. Person used card for requesting access.",
"details": {
"personId": 1,
"personName": "John Wiegand",
"deviceId": 1,
"deviceName": "Test Device",
"credentialId": 1,
"cardNumber": "1234567"
}
}
]
Delete an event report
Request
DELETE https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_id | Path | Integer | Yes | The report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
Export an event report
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/file/{{filename}}.{{type}}.zip HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
filename | Path | String | Yes | The filename. This value can be found in the links property of the event report metadata. |
type | Path | String | Yes | The desired file type. Possible values include csv , html , and json . |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains the binary data corresponding to the specified file type.
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/requests/{{report_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_id | Path | Integer | Yes | The report ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 200 OK
{
"id": 123,
"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": 382,
"html": 2252,
"json": 395
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"links": "event-report-118801-1689921749",
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.personId",
"details.personName",
"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 | Integer | 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 people report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The people report object properties included in the report output. Note that the Custom Fields property is specified here as Custom Attributes . |
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/requests HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
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. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 200 OK
[
{
"id": 123,
"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": 382,
"html": 2252,
"json": 395
},
"entriesCount": 100,
"creator": "Integration Client",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"links": "event-report-118801-1689921749",
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.personId",
"details.personName",
"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 | Integer | 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 people report for details. |
links | String | The filename used when exporting the report as a file. |
output | String[] | The people report object properties included in the report output. Note that the Custom Fields property is specified here as Custom Attributes . |
Retrieve the event reporting plan
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/plan HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 200 OK
{
"plan": {
"type": "basic",
"eventDays": 90,
"reportDays": 30,
"scheduledReports": 3,
"storageBytes": 104857600
},
"storageBytesUsed": 59680
}
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": 1,
"name": "Test Event Report Template",
"partition": 0,
"sort": "desc",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.personId",
"details.personName",
"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 | Integer | The event report template ID. |
name | String | The event report template name. |
partition | Integer | 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 , persons , 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 , persons , cards , connections , or groups , this is an array of integers representing device IDs, person 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://panel-{{panel_id}}.pdk.io/api/reports/cloudevents HTTP/1.1
{
"name": "Test Event Report Template",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.personId",
"details.personName",
"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 |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The report name. |
partition | Body | Integer | 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 , persons , 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 should 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 , persons , cards , connections , or groups , this is an array of integers representing device IDs, person 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": 1
}
Retrieve an event report template
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an event report template object.
HTTP/1.1 200 OK
{
"id": 1,
"name": "Test Event Report Template",
"partition": 0,
"sort": "desc",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.personId",
"details.personName",
"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://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/{{report_template_id}} HTTP/1.1
{
"name": "Test Event Report Template",
"partition": 0,
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.personId",
"details.personName",
"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 |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The report name. |
partition | Body | Integer | 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 , persons , 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 should 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 , persons , cards , connections , or groups , this is an array of integers representing device IDs, person 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://panel-{{panel_id}}.pdk.io/api/reports/cloudevents/{{report_template_id}} HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
report_template_id | Path | Integer | Yes | The report template ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
List all event report templates
Request
GET https://panel-{{panel_id}}.pdk.io/api/reports/cloudevents HTTP/1.1
Parameter | Location | Type | Required | Description |
---|
panel_id | Path | String | Yes | The cloud node serial number. |
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. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an array of event report template objects.
HTTP/1.1 200 OK
[
{
"id": 1,
"name": "Test Event Report Template",
"partition": 0,
"sort": "desc",
"filters": [
{
"type": "occurred",
"period": "today"
}
],
"output": [
"occurred",
"event",
"result",
"infoText",
"details",
"details.personId",
"details.personName",
"details.deviceId",
"details.deviceName",
"details.credentialId",
"details.cardNumber",
"details.ruleId",
"details.ruleName",
"details.groupId",
"details.groupName",
"details.connectionId",
"details.connectionName",
"details.elevatorId",
"details.elevatorName"
]
}
]