Link Search Menu Expand Document

Updated Fri Mar 5th 2021, 12:17 UTC

Get

GET /analytics/:report{?account,startDate,endDate}

Note: This endpoint is still under active development, and may change without warning.

This will return aggregated statistics for the first 100 users of an Account for a given date range

Examples

Getting the Users by Primary Account Report

Request

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

Response

Status

200

Response Type

AnalyticsReport

Example
{
  "@type": "AnalyticsReport",
  "@context": "/contexts/AnalyticsReport.jsonld",
  "id": "/analytics/users_by_organization?account=/accounts/my_account&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"
}

Getting the User Engagement Report

Request

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

Response

Status

200

Response Type

AnalyticsReport

Example
{
  "@type": "AnalyticsReport",
  "@context": "/contexts/AnalyticsReport.jsonld",
  "id": "/analytics/user_engagement?account=/accounts/my_account&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"
}

Getting the Message Deliverability Report

Request

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

Response

Status

200

Response Type

AnalyticsReport

Example
{
  "@type": "AnalyticsReport",
  "@context": "/contexts/AnalyticsReport.jsonld",
  "id": "/analytics/message_deliverability?account=/accounts/my_account&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": "Message Deliverability"
}

© 2021 TextUs