Stream scan progress
Follow website discovery and test generation through Server-Sent Events.
curl -X GET "https://app.aegisrunner.com/api/v1/ci/crawls/123e4567-e89b-12d3-a456-426614174000/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://app.aegisrunner.com/api/v1/ci/crawls/123e4567-e89b-12d3-a456-426614174000/events"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://app.aegisrunner.com/api/v1/ci/crawls/123e4567-e89b-12d3-a456-426614174000/events", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://app.aegisrunner.com/api/v1/ci/crawls/123e4567-e89b-12d3-a456-426614174000/events", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.aegisrunner.com/api/v1/ci/crawls/123e4567-e89b-12d3-a456-426614174000/events')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Service Unavailable",
"message": "The service is temporarily unavailable. Please try again later",
"code": 503
}
/ci/crawls/{crawlId}/eventsTarget server for requests. Edit to use your own host.
Create a project token under Project setup → CI/CD.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Create a project token under Project setup → CI/CD.
Path Parameters
Responses
Server-Sent Events with JSON data. Comment lines are keepalives.
Follow website discovery and test generation through Server-Sent Events. Use the crawl_id returned by a website scan trigger. Completion is reported by the done event.
See API authentication for tokens and API errors for completion and failure handling.
Event stream example
The successful response is text/event-stream, not a JSON object. A completed website scan can produce:
event: connected
data: {"crawl_id":"00000000-0000-4000-8000-000000000002","status":"running"}
event: done
data: {"crawl_id":"00000000-0000-4000-8000-000000000002","result":"completed"}
Progress events can appear between these messages. Inspect the done event's result: failed indicates an unsuccessful scan. A timeout or disconnection does not establish successful completion.
Use the streaming cURL example or aegis scan --watch when you need live progress outside the dashboard.