{"openapi":"3.1.0","info":{"title":"Jylus Events API","version":"1.0.0","description":"Secure event ingestion and search for Jylus workspaces. Production and test API keys use separate data-plane scopes."},"servers":[{"url":"/api"}],"paths":{"/v1/events":{"post":{"summary":"Ingest one or more events","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["stream","events"],"properties":{"stream":{"type":"string","example":"telemetry"},"namespace":{"type":"string","description":"Optional searchable metadata. It does not select the workspace."},"site_id":{"type":"string","example":"site-sydney-01"},"source_id":{"type":"string","example":"edge-node-01"},"events":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","required":["id","type","occurred_at","data"],"properties":{"id":{"type":"string"},"type":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"data":{"description":"Any valid JSON value."}},"additionalProperties":true}}},"additionalProperties":true}}}},"responses":{"202":{"description":"Accepted"},"400":{"description":"Validation failed"},"401":{"description":"Invalid API key"},"403":{"description":"Missing scope"},"409":{"description":"Idempotency key is already being processed"},"413":{"description":"Payload exceeds 1 MB"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Ingest service is temporarily unavailable"}}}},"/v1/search":{"post":{"summary":"Search events inside the API key workspace","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","minLength":1,"maxLength":500},"namespace":{"type":"string","description":"Optional metadata filter; it never selects the workspace."},"from":{"type":"string","default":"now-24h"},"to":{"type":"string","default":"now"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":25}},"additionalProperties":false}}}},"responses":{"200":{"description":"Workspace-scoped search results"},"400":{"description":"Invalid query"},"401":{"description":"Invalid API key"},"403":{"description":"Missing events:read scope"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Search service is temporarily unavailable"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"jyl_live_... or jyl_test_...","description":"Create a scoped key in the portal. The key selects both the workspace and its production or test data-plane scope."}}}}