Smartocto Tentacles API: Integration endpoints with parameters

The smartocto Tentacles API offers you the possibility to integrate the headertests and the results into your systems. Below you'll find the endpoints and parameters to request the information.

Endpoints

Headertests per hour

GET https://api.smartocto.com/api/integrations/v1/:brandId/headertests

Path parameters:

  • brandId (string, required): your brandname in the smartocto-url. (e.g: yourbrandname in yourbrandname.smartocto.com)


    Query parameters:

  • api_key (string, required): Please contact smartocto support to get your API key.

  • from (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00

  • to (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00

Output: 

Content-Type: application/json

[{
  "hour": "2020-05-01T08:00:00.000Z",
  "tests": [{
  "testId": 123,
  "relationId": "a1b2c3"
  }]
}, {
  "hour": "2020-05-01T09:00:00.000Z",
  "tests": [{
    "testId": 45690,
  "relationId": "d4e5f6"
  }, {
    "testId": 87650,
  "relationId": "g7h8i9"
  }]
}]

 

Headertests details

GET https://api.smartocto.com/api/integrations/v1/:brandId/headertests/:testId/details

Path parameters:

  • brandId (string, required): your brandname in the smartocto-url. (e.g: yourbrandname in yourbrandname.smartocto.com)

  • testId (string, required): e.g. 123

 

Query parameters:

Output: 

Content-Type: application/json

{
  "status": "completed",
  "linkClicks": 45465,
  "loyaltyClicks": 856,
  "winner": "Winner title",
"relationId": "a1b2c3",
  "startDateTime": "2020-03-05T01:00:00.000Z",
  "finishDateTime": "2020-03-05T23:00:00.000Z"
}

Output values:

  • status - test status

  • linkClicks - number of clicks

  • loyaltyClicks - a sum of the total loyaltyClicks events from the abtest

  • winner - winner title or "no winner"

  • relationId - article ID on which the AB test has been performed

  • startDateTime - (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00

  • finishDateTime - (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00 (if the test is completed)

 

Headertests data

GET https://api.smartocto.com/api/integrations/v1/:brandId/headertests/:testId/data

Path parameters:

  • brandId (string, required): your brandname in the smartocto-url. (e.g: yourbrandname in yourbrandname.smartocto.com)

  • testId (string, required): e.g. 123abc456

Query parameters:

Output: 

Content-Type: application/json

{
  "testId": "12345",
"relationId": "a1b2c3",
  "startDateTime": "2020-05-01T08:00:00.000Z",
  "finishDateTime": "2020-05-01T08:30:00.000Z",
  "testData": [{
    "titleId": "xyz",
    "titleValue": "The fox and the grapes"
  }, {
    "titleId": "opq",
    "titleValue": "The fox and the chicken"
  }],
  "impressions": [{
    "timestamp": "2020-05-01T08:00:00.123Z",
    "titleId": "xyz"
  }, {
    "timestamp": "2020-05-01T08:00:00.123Z",
    "titleId": "opq"
  }],
  "clicks": [{
    "timestamp": "2020-05-01T08:00:00.123Z",
    "titleId": "xyz"
  }, {
    "timestamp": "2020-05-01T08:00:00.123Z",
    "titleId": "opq"
  }]
}

 

Pageviews per minute

GET https://api.smartocto.com/api/integrations/v1/:brandId/posts/:relationId/pageviews

Path parameters:

  • brandId (string, required): your brandname in the smartocto-url. (e.g: yourbrandname in yourbrandname.smartocto.com)

  • relationId (string, required): unique identifier for the tested story (e.g. a1b2c3)

Query parameters:

  • api_key (string, required): Please contact smartocto support to get your API key.

  • from (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00

  • to (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00

  • interval: group-by interval
    supported values:

    • 1m: group by minute

    • 1h: group by hour

    • 1d: group by day

Output: 

Content-Type: application/json

{
  "post_id":"16131d8",
  "data": [
    {"time": "2020-05-18T12:34:56.000Z", "value": 11},
    {"time": "2020-05-18T12:34:56.000Z", "value": 22},
    {"time": "2020-05-18T12:34:56.000Z", "value": 33},
    ...
  ]
}

The interval between the time values is equal to the interval value in query parameters.

 

Notifications per minute

GET https://api.smartocto.com/api/integrations/v1/:brandId/posts/:relationId/notifications

Path parameters:

  • brandId (string, required): your brandname in the smartocto-url. (e.g: yourbrandname in yourbrandname.smartocto.com)

  • relationId (string, required): unique identifier for the tested story (e.g. a1b2c3)

Query parameters:

  • api_key (string, required): Please contact smartocto support to get your API key.

  • from (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00

  • to (ISO 8601 timestamp, required, needs to be encoded): e.g. 2020-02-20T18:36:00+00:00

  • interval: group-by interval
    supported values:

    • 1m: group by minute

    • 1h: group by hour

    • 1d: group by day

Output: 

Content-Type: application/json

 {
  "post_id":"16131d8",
  "data": [
    {"time": "2020-05-18T12:34:56.000Z", "value": 44},
    {"time": "2020-05-18T12:34:56.000Z", "value": 55},
    {"time": "2020-05-18T12:34:56.000Z", "value": 66},
    ...
  ]
}

The interval between the time values is equal to the interval value in query parameters.