Skip to main content

Assets

List Assets

Get a paginated list of assets with optional workspace filtering. List all assets:
curl http://localhost:8002/osm/api/assets \
  -H "Authorization: Bearer $TOKEN"
List assets with pagination:
curl "http://localhost:8002/osm/api/assets?offset=0&limit=100" \
  -H "Authorization: Bearer $TOKEN"
Filter by workspace:
curl "http://localhost:8002/osm/api/assets?workspace=example.com" \
  -H "Authorization: Bearer $TOKEN"
Combine workspace filter with pagination:
curl "http://localhost:8002/osm/api/assets?workspace=example.com&offset=50&limit=25" \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "data": [
    {
      "id": 1,
      "workspace": "example.com",
      "asset_value": "api.example.com",
      "url": "https://api.example.com",
      "input": "api.example.com",
      "scheme": "https",
      "method": "GET",
      "path": "/",
      "status_code": 200,
      "content_type": "application/json",
      "content_length": 4523,
      "title": "API Documentation",
      "words": 523,
      "lines": 89,
      "host_ip": "93.184.216.34",
      "a": ["93.184.216.34", "93.184.216.35"],
      "tls": "TLS 1.3",
      "asset_type": "web",
      "tech": ["nginx/1.21.0", "nodejs", "express"],
      "time": "245ms",
      "remarks": "production",
      "source": "httpx",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    },
    {
      "id": 2,
      "workspace": "example.com",
      "asset_value": "admin.example.com",
      "url": "https://admin.example.com",
      "input": "admin.example.com",
      "scheme": "https",
      "method": "GET",
      "path": "/login",
      "status_code": 401,
      "content_type": "text/html",
      "content_length": 2156,
      "title": "Admin Login - Example Corp",
      "words": 156,
      "lines": 45,
      "host_ip": "93.184.216.36",
      "a": ["93.184.216.36"],
      "tls": "TLS 1.2",
      "asset_type": "web",
      "tech": ["nginx/1.20.0", "php/8.1", "wordpress"],
      "time": "312ms",
      "remarks": "admin-panel",
      "source": "httpx",
      "created_at": "2025-01-15T10:31:00Z",
      "updated_at": "2025-01-15T10:31:00Z"
    }
  ],
  "pagination": {
    "total": 500,
    "offset": 0,
    "limit": 20
  }
}
Asset Fields Reference:
FieldTypeDescription
idintUnique asset identifier
workspacestringWorkspace/scan target name
asset_valuestringPrimary asset identifier (hostname/subdomain)
urlstringFull URL of the asset
inputstringOriginal input value
schemestringProtocol scheme (http, https)
methodstringHTTP method used
pathstringURL path
status_codeintHTTP response status code
content_typestringResponse content type
content_lengthintResponse body size in bytes
titlestringHTML page title
wordsintWord count in response
linesintLine count in response
host_ipstringResolved IP address
aarrayDNS A records
tlsstringTLS version information
asset_typestringAsset type classification
techarrayDetected technologies
timestringResponse time
remarksstringCustom labels/remarks
sourcestringDiscovery source (httpx, nuclei, etc.)
created_attimestampCreation timestamp
updated_attimestampLast update timestamp

List Asset Diff Snapshots

Get a paginated list of stored asset diff snapshots. These snapshots capture changes in assets over time. List all asset diff snapshots:
curl http://localhost:8002/osm/api/assets/diffs \
  -H "Authorization: Bearer $TOKEN"
List with pagination:
curl "http://localhost:8002/osm/api/assets/diffs?offset=0&limit=50" \
  -H "Authorization: Bearer $TOKEN"
Filter by workspace:
curl "http://localhost:8002/osm/api/assets/diffs?workspace=example.com" \
  -H "Authorization: Bearer $TOKEN"
Combine workspace filter with pagination:
curl "http://localhost:8002/osm/api/assets/diffs?workspace=example.com&offset=0&limit=25" \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "data": [
    {
      "id": 1,
      "workspace_name": "example.com",
      "from_time": "2025-01-14T00:00:00Z",
      "to_time": "2025-01-15T00:00:00Z",
      "total_added": 15,
      "total_removed": 3,
      "total_changed": 7,
      "diff_data": "{\"added\":[...],\"removed\":[...],\"changed\":[...]}",
      "created_at": "2025-01-15T10:30:00Z"
    },
    {
      "id": 2,
      "workspace_name": "example.com",
      "from_time": "2025-01-15T00:00:00Z",
      "to_time": "2025-01-16T00:00:00Z",
      "total_added": 8,
      "total_removed": 1,
      "total_changed": 12,
      "diff_data": "{\"added\":[...],\"removed\":[...],\"changed\":[...]}",
      "created_at": "2025-01-16T10:30:00Z"
    }
  ],
  "pagination": {
    "total": 30,
    "offset": 0,
    "limit": 20
  }
}
Asset Diff Snapshot Fields Reference:
FieldTypeDescription
idintUnique snapshot identifier
workspace_namestringWorkspace name for this diff
from_timetimestampStart time of the diff period
to_timetimestampEnd time of the diff period
total_addedintNumber of new assets added
total_removedintNumber of assets removed
total_changedintNumber of assets that changed
diff_datastringJSON serialized diff data containing added, removed, and changed assets
created_attimestampWhen the snapshot was created