API documentation

Get file tree structure

Returns the file and folder tree inside an archive file (ZIP, RAR, etc.) without downloading the archive.

GET/v1/inventory/{id}/tree
GETGet file tree structure
curl -X GET "https://api.darkradar.com/api/public/v1/inventory/507f1f77bcf86cd799439011/tree" \
  -H "x-api-key: $DARKRADAR_API_KEY"
Response

Successfully retrieved file tree

{
  "success": true,
  "message": "OK",
  "data": {
    "root": {
      "name": "archive.zip",
      "type": "archive",
      "children": [
        {
          "name": "passwords.txt",
          "type": "file",
          "size": 1234,
          "path": "/passwords.txt"
        },
        {
          "name": "cookies",
          "type": "folder",
          "children": [
            {
              "name": "chrome_cookies.db",
              "type": "file",
              "size": 45678,
              "path": "/cookies/chrome_cookies.db"
            }
          ]
        }
      ]
    }
  },
  "meta": {
    "timestamp": "2024-02-01T10:30:45.123Z",
    "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "responseTime": 41
  }
}

Access

Scopeinventory:read
Plan entitlementapi_access

Path parameters

FieldsValues
id · string · requiredUnique identifier of the inventory item · Example: 507f1f77bcf86cd799439011

Responses

200Successfully retrieved file tree
400Invalid request (malformed id, missing or invalid field)
401Key missing, invalid, expired or revoked
403Insufficient scope, no API access in plan, or product not enabled
404Record not found or not owned by this key’s firm
408The request exceeded its maximum response time
429Rate limit exceeded; retry after a minute

Response limits

Rate limit500 requests per 15 min · per IP

Was this page helpful?