Skip to main content

Data Access Logging

XQ's platform provides a detailed chain of custody for every encryption key, recording when it was accessed, by whom, and from where. Through XQ's APIs, developers can easily surface this information to end users, offering transparency and reinforcing trust in the security of their data.

Accessing Data Logs​

Integrate XQ authentication seamlessly into your application's client-side authentication flow, enabling users to track where their data is being accessed.

Step 1: Begin the dashboard login process.​

To initiate this process, when a user logs into your application, an email is automatically sent to them. XQ allows developers to include a state parameter in the email body, which can be used in client-side applications to identify the flow the user is coming from and direct them to the appropriate screen after a successful login.

Additionally, a host parameter specifies the target domain for the login links. This parameter enables routing users to the correct domain, ensuring they are directed to your platform seamlessly.

Parameters — /login/link

NameTypeRequiredDescription
api-keystringYesDashboard API key
emailstringYesThe email address of the user.
statestringOptional parameter that would pass through from the frontend and get placed as query parameter in the magic link that is in the email. This can be used for the front end to determine which flow the user is coming from, and therefore which screen the user should be sent to after they have successfully logged in.
hoststringThe host domain that login links will target. If not provided, the server instance default will be used.

POST
Headers
curl
curl -X POST 'https://dashboard.xqmsg.net/v2/login/link' \
-H 'api-key: <API_KEY>' \
-d '{
"email": "test@example.com",
"state": "",
"host": "example.com"
}'

Sent from your browser straight to dashboard.xqmsg.net. Credentials stay in this tab and are cleared on reload; missing ones appear as <API_KEY> / <ACCESS_TOKEN> in the curl command.

Step 2: Exchange the Pre-Auth token for a valid authentication token.​

When the user is routed to your platform, you can extract the pre-auth token embedded in the URI as access_token. This token can then be used on the client side to exchange it for a valid authentication token.

Parameters — /login/verify

NameTypeRequiredDescription
api-keystringYesDashboard API key
authorizationstringYesThis is a bearer token required to make most XQ API calls. To get one, a user must first utilize the login/link endpoint, upon which they get a pre-auth token.

GET
Headers
Bearer
curl
curl -X GET 'https://dashboard.xqmsg.net/v2/login/verify?request=default' \
-H 'api-key: <API_KEY>' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'

Sent from your browser straight to dashboard.xqmsg.net. Credentials stay in this tab and are cleared on reload; missing ones appear as <API_KEY> / <ACCESS_TOKEN> in the curl command.

Step 3: List User Communications​

You can then list the user communications and present this data to your clients. This endpoint is more of an overview of the communications rather than a deeper dive on a single key.

Parameters — /communications

NameTypeRequiredDescription
api-keystringYesDashboard API key
authorizationstringYesThis is a bearer token required to make most XQ API calls. To get one, a user must first utilize the login/link endpoint, upon which they get a pre-auth token.
fromintegerThe lower boundary time (in milliseconds) to search. A zero value will be ignored.
limitintegerPage size.
pageintegerPage number.
recipientsstringFilter by recipient email. Comma-separated values will match against any recipient in the list.
searchstringGeneric search field for user-defined input. Matches against resource names (email subject, file name, etc.), recipients, and owners.
statusstringThe comma-separated status of the key: 0 - Available, 1 - Revoked, 2 - Expired.
tointegerThe upper boundary time (in milliseconds) to search. A zero value will be ignored.
typestringThe type of key: 0 - Unknown, 1 - File, 2 - Email. Comma-separated values will match against EITHER type.
usersstringFilter by sender's email. Comma-separated values will match against any sender in the list.

GET
Headers
Bearer
curl
curl -X GET 'https://dashboard.xqmsg.net/v2/communications?from=1&to=2&limit=50&page=0&recipients=recipient%40example.com&search=example%20search&status=0%2C1%2C2&type=1%2C2&users=sender%40example.com' \
-H 'api-key: <API_KEY>' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'

Sent from your browser straight to dashboard.xqmsg.net. Credentials stay in this tab and are cleared on reload; missing ones appear as <API_KEY> / <ACCESS_TOKEN> in the curl command.

Step 4: Get Detailed Logs for a specific key​

To access detailed logs associated with a specific key, developers can use the log endpoint. This endpoint provides a comprehensive chain of custody for the key, offering complete visibility into its access history.

This can help developers present more detailed entries when users want to dive deeper into a specific item.

Parameters — /log

NameTypeRequiredDescription
api-keystringYesDashboard API key
authorizationstringYesThis is a bearer token required to make most XQ API calls. To get one, a user must first utilize the login/link endpoint, upon which they get a pre-auth token.
datastringYesA unique identifier for the requested data.
pageintegerPage number for pagination.
limitintegerThe maximum number of results to return per page.
tzintegerThe timezone offset in hours from UTC.

GET
Headers
Bearer
curl
curl -X GET 'https://dashboard.xqmsg.net/v2/log?page=0&limit=50&data=hLeHS3dszrVM4AnAHEMJRILDRCkXXq6kY3eQW93sN22&tz=-8' \
-H 'api-key: <API_KEY>' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'

Sent from your browser straight to dashboard.xqmsg.net. Credentials stay in this tab and are cleared on reload; missing ones appear as <API_KEY> / <ACCESS_TOKEN> in the curl command.

Additional Presentable Components​

There are various presentable data items developers can integrate in addition to the logs provided above. To identify any further presentable items navigate to the Manage section of the API reference.