VirtuousAI
Reference

Events

List Events

GET
/api/v1/events

Query Parameters

event_type?|
resource_type?|
resource_id?|
from?|
to?|
limit?integer
Default100
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/events"
{
  "events": [
    {
      "actorId": "string",
      "actorType": "user",
      "causationId": "string",
      "correlationId": "string",
      "eventType": "schedule.fired",
      "id": "string",
      "occurredAt": "2019-08-24T14:15:22Z",
      "payload": {},
      "resourceId": "string",
      "resourceType": "action_run",
      "tenantId": "string"
    }
  ],
  "hasNext": true,
  "limit": 0,
  "offset": 0,
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Aggregate Events

GET
/api/v1/events/aggregate

Query Parameters

from?|
to?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/events/aggregate"
{
  "byActorType": [
    {
      "count": 0,
      "key": "string"
    }
  ],
  "byEventType": [
    {
      "count": 0,
      "key": "string"
    }
  ],
  "byResourceType": [
    {
      "count": 0,
      "key": "string"
    }
  ],
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Events By Correlation

GET
/api/v1/events/correlation/{correlation_id}

Path Parameters

correlation_id*string

Query Parameters

limit?integer
Default100
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/events/correlation/string"
{
  "events": [
    {
      "actorId": "string",
      "actorType": "user",
      "causationId": "string",
      "correlationId": "string",
      "eventType": "schedule.fired",
      "id": "string",
      "occurredAt": "2019-08-24T14:15:22Z",
      "payload": {},
      "resourceId": "string",
      "resourceType": "action_run",
      "tenantId": "string"
    }
  ],
  "hasNext": true,
  "limit": 0,
  "offset": 0,
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Events By Resource

GET
/api/v1/events/resource/{resource_type}/{resource_id}

Path Parameters

resource_type*string

Resource types that events can reference.

Mirrors Resource enum in api/auth/domain/permissions.py. When adding a new resource to permissions, add it here too.

Value in"action_run" | "agent_spec" | "artifact" | "automation" | "automation_run" | "chat_thread" | "connection" | "decision" | "flashboard" | "inbound_message" | "template"
resource_id*string
Formatuuid

Query Parameters

limit?integer
Default100
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/events/resource/action_run/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "events": [
    {
      "actorId": "string",
      "actorType": "user",
      "causationId": "string",
      "correlationId": "string",
      "eventType": "schedule.fired",
      "id": "string",
      "occurredAt": "2019-08-24T14:15:22Z",
      "payload": {},
      "resourceId": "string",
      "resourceType": "action_run",
      "tenantId": "string"
    }
  ],
  "hasNext": true,
  "limit": 0,
  "offset": 0,
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Stats By Actor

GET
/api/v1/events/stats/by-actor

Query Parameters

from?|
to?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/events/stats/by-actor"
{
  "actors": [
    {
      "actorId": "string",
      "actorType": "string",
      "failures": 0,
      "successes": 0,
      "total": 0
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Event

GET
/api/v1/events/{event_id}

Path Parameters

event_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/events/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "actorId": "string",
  "actorType": "user",
  "causationId": "string",
  "correlationId": "string",
  "eventType": "schedule.fired",
  "id": "string",
  "occurredAt": "2019-08-24T14:15:22Z",
  "payload": {},
  "resourceId": "string",
  "resourceType": "action_run",
  "tenantId": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}