Skip to main content
POST
/
v1
/
team
/
statistics
/
events
Get team event statistics by integration
curl --request POST \
  --url https://api.wirespeed.co/v1/team/statistics/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "startDate": "<string>",
  "endDate": "<string>",
  "days": 123
}
'
import requests

url = "https://api.wirespeed.co/v1/team/statistics/events"

payload = {
"startDate": "<string>",
"endDate": "<string>",
"days": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({startDate: '<string>', endDate: '<string>', days: 123})
};

fetch('https://api.wirespeed.co/v1/team/statistics/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wirespeed.co/v1/team/statistics/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '<string>',
'endDate' => '<string>',
'days' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.wirespeed.co/v1/team/statistics/events"

payload := strings.NewReader("{\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"days\": 123\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.wirespeed.co/v1/team/statistics/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"days\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.wirespeed.co/v1/team/statistics/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"days\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "totalEvents": 123,
  "totalBytes": 123,
  "allTimeTotalEvents": 123,
  "allTimeTotalBytes": 123,
  "ocsfStatistics": [
    {
      "integration": {
        "id": "<string>",
        "enabled": true,
        "teamId": "<string>",
        "config": {
          "name": "<string>",
          "customFields": [
            {
              "slug": "<string>",
              "display": "<string>",
              "type": "<string>",
              "required": true,
              "description": "<string>",
              "defaultValue": "<string>",
              "validationPattern": "<string>",
              "validationMinLength": 123,
              "validationMaxLength": 123,
              "source": "<string>",
              "advancedOption": true,
              "hidden": true,
              "nonEditable": true,
              "entitlementSlug": "<string>",
              "authMethod": "<string>"
            }
          ],
          "logo": "<string>",
          "beta": true,
          "slug": "<string>",
          "default": true,
          "useCases": [],
          "webhookActions": [
            {
              "slug": "<string>",
              "display": "<string>",
              "description": "<string>",
              "useCases": [],
              "showWebhookSecret": true,
              "containmentRequirements": {}
            }
          ],
          "containmentActions": [
            {
              "slug": "<string>",
              "display": "<string>",
              "description": "<string>",
              "useCases": [],
              "showWebhookSecret": true,
              "containmentRequirements": {}
            }
          ],
          "authMethods": [
            {
              "id": "<string>",
              "displayName": "<string>",
              "description": "<string>"
            }
          ],
          "oauthRequiresRedirect": true,
          "requiresConfiguration": true,
          "requiresWebhook": true,
          "logoLight": "<string>",
          "logoDark": "<string>",
          "description": "<string>",
          "internalCreds": true,
          "docsUrl": "<string>",
          "statusUrl": "<string>",
          "rtfm": true,
          "integrationTypes": [],
          "singleInstallOnly": true,
          "hideFromCatalog": true,
          "comingSoon": true
        },
        "permissionsUpdateAvailable": true,
        "permissionUpdateExplanation": "<string>",
        "identityFields": {},
        "createdAt": "<string>",
        "publicEntitlements": [
          {
            "slug": "<string>",
            "display": "<string>",
            "value": true,
            "dismissed": true,
            "description": "<string>",
            "warning": {
              "when": true,
              "message": "<string>"
            }
          }
        ],
        "healthDetails": {
          "errorCount": 123,
          "warningCount": 123,
          "lastCheckedAt": "<string>",
          "lastStatusChangeAt": "<string>"
        },
        "sourceSystemUpdates": true,
        "teamName": "<string>",
        "requiresConfiguration": true,
        "muteHourlyQuality": {},
        "authMethod": "<string>"
      },
      "totalEvents": 123,
      "totalBytes": 123
    }
  ]
}
{
"message": "<string>",
"statusCode": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
startDate
string

Start date (inclusive, ISO8601 string)

endDate
string

End date (inclusive, ISO8601 string)

days
number

Number of days for time-based filtering (1-365). Required by most endpoints unless startDate/endDate provided.

Response

totalEvents
number
required

Total number of events across all integrations

totalBytes
number
required

Total bytes of event data across all integrations

allTimeTotalEvents
number
required

All-time total number of events across all integrations

allTimeTotalBytes
number
required

All-time total bytes of event data across all integrations

ocsfStatistics
object[]
required

OCSF event statistics by integration