Documentation
Developer
Create and revoke API keys, register outbound webhooks, watch their deliveries, and copy ready-made API examples.
Overview
The Developer page is where you set up programmatic access to DeviceQuest. It has four sections, listed in the navigation on the page: Keys, Webhooks, Quickstart and REST API.
- API keys let scripts and other systems call the DeviceQuest REST API.
- Webhooks push DeviceQuest events (a new asset, a finished scan, a new vulnerability) to your own HTTPS endpoint as they happen.
- API quickstart and the REST API Reference show working requests you can copy.
You need api_keys:read or webhooks:read to open the page. Creating and revoking keys needs api_keys:write; creating, editing, testing and deleting webhooks needs webhooks:write.
Screen tour
- Summary: Active keys, Expiring soon, Stale, Revoked and Webhook endpoints. Click a number to filter the keys, or Webhook endpoints to jump to the webhooks.
- Search by name, prefix, or URL: filters both keys and webhooks.
- Hide revoked: hides revoked keys (on by default). The number in brackets is how many are hidden.
- Export keys (CSV): downloads the shown keys as CSV.
- Page navigation: Keys, Webhooks, Quickstart, REST API.
- Create key: opens the inline key form.
- Status filters: All, Active, Expired, Expiring, Stale, Revoked.
- The key table: Name, Prefix, Scopes, Last used, Status, and Revoke.
API keys
Create an API key
- In API Keys, click Create key. A form opens inline above the table.
- Enter a Name that says what uses the key, for example
CI/CD Pipeline. - Under Scopes, select at least one scope.
- Set Expiry in days (default 90), or select No expiry.
- Click Create key.
- The secret appears with the warning “This is the only time you will see this secret. Copy it now.” Click Copy, store the key in your secret manager, then click Done.
- The one-time warning.
- The full key secret (masked in this picture). It is never shown again.
- Copy: copies the secret to the clipboard.
- Done: closes the panel. The key appears in the table.
If you lose a key’s secret, revoke the key and create a new one.
Key fields
| Field | Description | Rules |
|---|---|---|
| Name | What the key is for. | Required. |
| Scopes | What the key may do. See the table below. | At least one. |
| Expiry | Days until the key stops working. | A whole number greater than zero. Default 90. Or select No expiry. |
| Scope | Label | Allows |
|---|---|---|
read | Read | Read data through GET and HEAD requests. |
write | Read & write | Read data, and create or update records through POST, PUT and PATCH requests. |
admin | Admin | Full API access, including deletion. |
recognition:read | Device recognition | Use the device-recognition endpoints. |
Send the key in the X-API-Key header of every request:
curl --fail-with-body "https://devicequest.example.com/api/v1/assets" \
--header "Accept: application/json" \
--header "X-API-Key: $DEVICEQUEST_API_KEY"
Key details and statuses
Click a key’s name to open its side sheet: Prefix (with a copy button), Scopes, Created, Last used, Expires, and Revoke key.
| Status | Meaning | Next possible status |
|---|---|---|
| Active | The key works. | Expiring soon, Stale, Revoked |
| Expiring soon | The key expires within 7 days. Create a replacement. | Expired, Revoked |
| Stale | The key has not been used for 90 days or more (or was never used in its first 90 days). Revoke it if nothing needs it. | Active (when used again), Revoked |
| Expired | The expiry date has passed. The key no longer works. | Revoked |
| Revoked | The key was revoked and no longer works. | None |
Revoke keys
- One key: click Revoke on its row, or Revoke key in its side sheet. The Revoke API key dialog warns that any integration using the key stops working immediately. Click Revoke key to confirm.
- Several keys: select them with the row checkboxes (or the header checkbox). In the bar that appears, click Revoke selected, then confirm. Click Clear to deselect.
Revoking cannot be undone.
Webhooks
A webhook sends an HTTPS POST to your endpoint each time a subscribed event happens in DeviceQuest. Each delivery is signed with the webhook’s signing secret, so your endpoint can check that it really came from DeviceQuest.
Create a webhook
- In Webhooks, click Add endpoint.
- Enter a Name, for example
Slack Notifications. - Enter the URL of your endpoint. It must start with
http://orhttps://. - Under Event types, select at least one event.
- Leave Active selected to start deliveries right away.
- Click Save.
- The Webhook created dialog shows the signing secret: “Webhook signing secret — shown only once”. Click Copy secret, store it with your endpoint’s configuration, then click Done.
- The one-time warning.
- The signing secret (masked in this picture).
- Copy secret and Done.
Event types
| Event type (label) | Sent as | Sent when |
|---|---|---|
| New asset | NEW_ASSET | A new asset is discovered or created. |
| Updated asset | UPDATED_ASSET | An asset’s details change. |
| Deleted asset | DELETED_ASSET | An asset is removed. |
| New source | NEW_SOURCE | An asset is seen by a new discovery source. |
| Export completed | EXPORT_COMPLETED | An export finishes and is ready to download. |
| Asset unlinked | UNLINK | An identity link between two asset records is removed. |
| Scan completed | SCAN_COMPLETED | A scan finishes. |
| Vulnerability found | VULNERABILITY_FOUND | A vulnerability is matched to an asset. |
| Compliance updated | COMPLIANCE_UPDATED | A compliance result changes. |
| Flow triggered | FLOW_TRIGGERED | A flow starts running. |
What each delivery contains
Every delivery is a POST with a JSON body and these headers:
| Header | Value |
|---|---|
Content-Type | application/json |
X-DeviceQuest-Event | The event type, for example NEW_ASSET. |
X-DeviceQuest-Event-ID | A unique ID for the event. Use it to ignore duplicates when a delivery is retried. |
X-DeviceQuest-Timestamp | When the delivery was signed, in RFC 3339 format (UTC). |
X-DeviceQuest-Signature | The lowercase hex HMAC-SHA256 of the raw request body immediately followed by the X-DeviceQuest-Timestamp value, keyed with the webhook’s signing secret. No prefix. |
To verify a delivery, recompute the signature from the raw body (BODY), the X-DeviceQuest-Timestamp header (TS) and your signing secret (SECRET), and compare it with the X-DeviceQuest-Signature header (RECEIVED):
# BODY must hold the exact bytes you received (including any trailing newline).
EXPECTED=$(printf '%s%s' "$BODY" "$TS" | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.*= //')
[ "$EXPECTED" = "$RECEIVED" ] && echo "signature valid" || echo "signature mismatch"
# Also reject deliveries whose timestamp is too old, to block replays.
For more verification code, see Verifying signatures.
Your endpoint should answer with a 2xx status within the webhook’s timeout (10 seconds by default; shown as Timeout in the side sheet). Any other answer, or no answer, counts as a failed attempt and is retried with growing delays, up to 10 attempts.
Test, edit, rotate and delete
Click a webhook’s name to open its side sheet. It shows URL, Secret prefix, Event types, Timeout, Created and Updated, followed by the actions and Recent deliveries.
- Test: sends a signed test request to the endpoint right away, with the event header
webhook.testand a body such as{"test":true,"webhookId":"…","triggeredAt":"…"}. A message tells you whether your endpoint accepted it. Test is also on each row of the table. - Edit: change the name, URL, event types or Active, then click Save. Clear Active to pause deliveries without deleting the webhook.
- Rotate secret: creates a new signing secret. The Rotate webhook secret dialog warns that the current secret stops working immediately. After you click Rotate secret, the Webhook secret rotated dialog shows the new secret once. Click Copy secret, update your endpoint, then click Done.
- Delete: removes the webhook after confirmation. No further events are delivered to the endpoint.
Deliveries
- The webhook’s details: URL, Secret prefix, Event types, Timeout, Created, Updated.
- Test, Edit, Rotate secret and Delete.
- Recent deliveries: the latest delivery attempts for real events.
Recent deliveries lists the 20 most recent deliveries, newest first. Click Load more to see 20 more, up to 200. Each row shows the event type, the status, when it was created, the number of attempts (for example 3×) when it was retried, and the last error, if any. Click Show payload to see the JSON body that was sent.
Test requests do not appear here; only deliveries of real events do.
| Status | Meaning | Next possible status |
|---|---|---|
| Pending | The event is queued for delivery. | Delivered, Failed |
| Delivered | Your endpoint answered with a 2xx status. | None |
| Failed | The last attempt failed. Another attempt is scheduled. | Delivered, Failed, Dead letter |
| Dead letter | Every attempt failed. DeviceQuest stops retrying this delivery. | None |
| Cancelled | The delivery was cancelled, for example because the webhook was deleted. | None |
API quickstart
The API quickstart section shows a complete request that lists your assets, already pointing at your DeviceQuest address (shown as Example endpoint). Pick a tab and click Copy:
- Direct REST: cURL, JavaScript fetch, Python requests.
- Official SDK: Go SDK.
Each example reads the address from DEVICEQUEST_BASE_URL and the key from DEVICEQUEST_API_KEY. Use the arrow keys, Home and End to move between tabs.
REST API Reference
The REST API Reference lists the public REST endpoints with their Method, Path, Description, Auth and Required scope. Every endpoint needs an API key with the listed scope.
- Type in Filter by path, method, or scope to narrow the list. The count shows how many endpoints match.
- Click a resource chip (All, or a resource such as
assets) to show only that resource.
| Method | Path | Description | Required scope |
|---|---|---|---|
GET | /api/v1/assets | List assets | read |
GET | /api/v1/assets/search | Search assets | read |
GET | /api/v1/assets/:id | Get asset | read |
GET | /api/v1/assets/export | Export assets | read |
GET | /api/v1/vulnerabilities | List vulnerabilities | read |
GET | /api/v1/vulnerabilities/:id | Get vulnerability | read |
GET | /api/v1/vulnerabilities/export | Export vulnerabilities | read |
GET | /api/v1/cloud-resources | List cloud resources | read |
GET | /api/v1/flows | List automation flows | read |
GET | /api/v1/reports | List reports | read |
GET | /api/v1/reports/:id | Get report | read |
POST | /api/v1/reports | Create report | write |
GET | /api/v1/scans | List scans | read |
POST | /api/v1/scans | Create scan | write |
DELETE | /api/v1/scans/:id | Cancel scan | admin |
POST | /api/v1/recognition/recognize | Recognize device | recognition:read |
POST | /api/v1/recognition/recognize/mac | Recognize device by MAC | recognition:read |
POST | /api/v1/recognition/recognize/ip | Recognize device by IP | recognition:read |
POST | /api/v1/recognition/recognize/fingerprint | Recognize device by fingerprint | recognition:read |
GET | /api/v1/recognition/device-types | List device types | recognition:read |