Skip to main content Link Search Menu Expand Document (external link)

Updated Thu Sep 22nd 2022, 19:00 UTC

Create

POST /:account/analytics/:section/:report{?descendants,startDate,endDate}

Generate a given report. Gives the generated aggregate results of the requested report. Available reports are retrievable via index or section requests.

Examples

Generate an analytics report

Request

POST /my_account/analytics/overview/user_engagement?startDate=2020-10-23&endDate=2020-10-30
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X POST /my_account/analytics/overview/user_engagement?startDate=2020-10-23&endDate=2020-10-30
    

Response

Status

200

Response Type

AnalyticsReport

Example Body

{
  "@type": "AnalyticsReport",
  "@context": "/contexts/AnalyticsReport.jsonld",
  "id": "/my_account/analytics/overview/user_engagement?start_date=2020-10-23&end_date=2020-10-30",
  "startDate": "2020-10-23",
  "endDate": "2020-10-30",
  "headers": [
    {
      "title": "Organization Name",
      "slug": "organization_name",
      "description": "The highest level account."
    },
    {
      "title": "User Created",
      "slug": "user_created",
      "description": "The date the user was created in Next."
    }
  ],
  "totalCount": 1,
  "data": [
    [
      "Example Account",
      "TextUs Account",
      "Example Account",
      "Not Chuck",
      "user",
      "2020-10-23",
      "2020-10-30"
    ]
  ],
  "title": "User Engagement"
}

© 2022 TextUs