Event endpoints
Use these endpoints to query Speed Analysis Lab events.
Get a list of events
Section titled Get a list of eventsPOST /v1/speed-analysis/event/list
Returns the list of events.
Parameters
keystringKey of the event.
dateFromISO 8601 date stringRetrieve events executed after this date.
ISO format in UTC (for example "2021-08-13T12:32:40.000Z") or with a time zone offset ("2021-08-13T12:32:40+02:00" or "2021-08-13T12:32:40%2B+02:00" when encoded in the URL).
monitoringIdnumberUnique identifier of a monitoring. It can used to get events for a specific monitoring.
scenarioIdnumberUnique identifier of a scenario. It can used to get events for a specific scenario.
Request example
curl --location --request POST 'https://api.contentsquare.com/v1/speed-analysis/event/list' \--header 'Authorization: Bearer <your_access_token>'--data '{ "key": ""}'Response example
{ "payload": { "events": [ { "key": "", "text": "", "date": "2016-10-07T12:00:00.000+02:00" } ] }, "success": true}Create an event
Section titled Create an eventPOST /v1/speed-analysis/event/create
Returns the created event.
Parameters
keystring RequiredKey of the event.
textstring RequiredText of the event.
dateISO 8601 date string RequiredDate of the event.
ISO format in UTC (for example "2021-08-13T12:32:40.000Z") or with a time zone offset ("2021-08-13T12:32:40+02:00" or "2021-08-13T12:32:40%2B+02:00" when encoded in the URL).
monitoringsnumber[]List of monitoring identifiers that can be retrieved from the monitoring list (
/monitoring/list). It can be used to associate the event with multiple monitorings.scenariosnumber[]List of scenario identifiers that can be retrieved from the scenario list (
/scenario/list). It can be used to associate the event with multiple scenarios.
Request example
curl --location --request POST 'https://api.contentsquare.com/v1/speed-analysis/event/create' \--header 'Authorization: Bearer <your_access_token>'--data '{ "key":"", "text": "", "date": "", "monitorings":[0]}'Response example
{ "payload": { "key": "" }, "success": true}Delete an event
Section titled Delete an eventPOST /v1/speed-analysis/event/delete
Returns the deleted event.
Parameters
keystring RequiredKey of the event.
Request example
curl --location --request POST 'https://api.contentsquare.com/v1/speed-analysis/event/delete' \--header 'Authorization: Bearer <your_access_token>'--data '{ "key":""}'Response example
{ "payload": { "key": "" }, "success": true}
