To retrieve all events recorded in a directory, use the following request:
For local host:
curl -X GET "http://localhost:8082/events?sinceTime=0" -H "X-RPC-AUTHORIZATION: userId:pwd" -H "X-RPC-DIRECTORY: main"
For SAFR Cloud:
curl -X GET "https://cv-event.real.com/events?sinceTime=0" -H "X-RPC-AUTHORIZATION: userId:pwd" -H "X-RPC-DIRECTORY: main"
Note: Always use https
when making requests over the internet.
To retrieve events currently in progress (not yet ended):
curl -X GET "http://localhost:8082/events" -H "X-RPC-AUTHORIZATION: userId:pwd" -H "X-RPC-DIRECTORY: main"
To retrieve any events that occurred in last 60 seconds:
curl -X GET "http://localhost:8082/events?sinceTime=<currentEpochTimeInMs-60000>" -H "X-RPC-AUTHORIZATION: userId:pwd" -H "X-RPC-DIRECTORY: main"
Element | Description | Notes |
---|---|---|
http://{domain name}/events | URL for the endpoint | Substitute {domain name} with your local host name or SAFR Cloud domain |
X-RPC-AUTHORIZATION: userId:pwd | See Event Service (CVEV) API for more information | |
X-RPC-DIRECTORY: main | See Event Service (CVEV) API for more information | |
sinceTime=<currentEpochTimeInMs-60000> | For use in determining the precise past time for retrieving events. | Replace =<currentEpochTimeInMs-60000> with the current epoch time in milliseconds subtracted by 60000. sinceTime=0 returns all events recorded in a directory. |