analytics

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-analytics"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/83d044a8-2e41-46eb-a741-5043d696d3f3/social-card.svg?v=3e7ae33eec8b" alt="analytics" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/analytics/reports

Saved reports; ?archived=true lists the archived ones

Parameters

archivedstringquery
true | false
limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/reports" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "query": {
        "kind": "messages",
        "from": "string",
        "to": "string",
        "groupBy": "day",
        "sourceKind": "string",
        "sourceId": "string",
        "channel": "email",
        "includeMachineOpens": true
      },
      "createdAt": "2024-01-01T00:00:00Z",
      "schedule": "daily",
      "recipients": [
        "string"
      ],
      "rollingDays": 0,
      "sheetId": "string",
      "lastSentAt": "2024-01-01T00:00:00Z",
      "ownerId": null,
      "visibility": "shared"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem88[]required
Show child parameters
idstringrequired
namestringrequired
queryQueryVariant | QueryVariant2 | QueryVariant3 | QueryVariant4 | QueryVariant5 | QueryVariant6required
createdAtstringrequired
schedulestringrequired
daily | weekly | monthly
recipientsstring[]required
rollingDaysintegerrequired
sheetIdstringrequired
lastSentAtstringrequired
ownerIdstringrequired
= null
visibilitystringrequired
shared | private = shared
nextCursorstringrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · GET /v1/analytics/reports

POSThttps://hermeticor.com/v1/analytics/reports

Request body

application/json
namestringrequired
queryQueryVariant7 | QueryVariant8 | QueryVariant9 | QueryVariant10 | QueryVariant11 | QueryVariant12required
{
  "name": "string",
  "query": {
    "kind": "messages",
    "from": "string",
    "to": "string",
    "groupBy": "day",
    "sourceKind": "string",
    "sourceId": "string",
    "channel": "email",
    "includeMachineOpens": true
  }
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/analytics/reports" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","query":{"kind":"messages","from":"string","to":"string","groupBy":"day","sourceKind":"string","sourceId":"string","channel":"email","includeMachineOpens":true}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
Example
{
  "id": "string",
  "name": "string",
  "query": {
    "kind": "messages",
    "from": "string",
    "to": "string",
    "groupBy": "day",
    "sourceKind": "string",
    "sourceId": "string",
    "channel": "email",
    "includeMachineOpens": true
  },
  "createdAt": "2024-01-01T00:00:00Z",
  "schedule": "daily",
  "recipients": [
    "string"
  ],
  "rollingDays": 0,
  "sheetId": "string",
  "lastSentAt": "2024-01-01T00:00:00Z",
  "ownerId": null,
  "visibility": "shared"
}
Schema
idstringrequired
namestringrequired
queryQueryVariant | QueryVariant2 | QueryVariant3 | QueryVariant4 | QueryVariant5 | QueryVariant6required
createdAtstringrequired
schedulestringrequired
daily | weekly | monthly
recipientsstring[]required
rollingDaysintegerrequired
sheetIdstringrequired
lastSentAtstringrequired
ownerIdstringrequired
= null
visibilitystringrequired
shared | private = shared
4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

POSThttps://hermeticor.com/v1/analytics/reports/batch/archive

Archive reports (hidden, unscheduled, restorable)

Request body

application/json
idsstring[]required
{
  "ids": [
    "string"
  ]
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/analytics/reports/batch/archive" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "count": 0
}
Schema
countintegerrequired
4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

POSThttps://hermeticor.com/v1/analytics/reports/batch/restore

Request body

application/json
idsstring[]required
{
  "ids": [
    "string"
  ]
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/analytics/reports/batch/restore" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

POSThttps://hermeticor.com/v1/analytics/reports/owners/batch/update

Reassign reports to another member (null = unassigned)

Request body

application/json
idsstring[]required
ownerIdstringrequired
{
  "ids": [
    "string"
  ],
  "ownerId": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/analytics/reports/owners/batch/update" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["string"],"ownerId":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

GEThttps://hermeticor.com/v1/analytics/reports/{id}

Read a saved report definition

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/reports/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 201 · POST /v1/analytics/reports

4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

DELETEhttps://hermeticor.com/v1/analytics/reports/{id}

Parameters

idstringpathrequired

Code samples

cURL
curl -X DELETE "https://hermeticor.com/v1/analytics/reports/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "ok": true
}
Schema
okbooleanrequired
true
4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

PATCHhttps://hermeticor.com/v1/analytics/reports/{id}

Edit a saved report name or definition

Parameters

idstringpathrequired

Request body

application/json
namestring
queryQueryVariant7 | QueryVariant8 | QueryVariant9 | QueryVariant10 | QueryVariant11 | QueryVariant12
{
  "name": "string",
  "query": {
    "kind": "messages",
    "from": "string",
    "to": "string",
    "groupBy": "day",
    "sourceKind": "string",
    "sourceId": "string",
    "channel": "email",
    "includeMachineOpens": true
  }
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/analytics/reports/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","query":{"kind":"messages","from":"string","to":"string","groupBy":"day","sourceKind":"string","sourceId":"string","channel":"email","includeMachineOpens":true}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 201 · POST /v1/analytics/reports

4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

POSThttps://hermeticor.com/v1/analytics/reports/{id}/clone

Copy a saved report definition

Parameters

idstringpathrequired

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/analytics/reports/{id}/clone" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response

Same as 201 · POST /v1/analytics/reports

4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

GEThttps://hermeticor.com/v1/analytics/reports/{id}/run

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/reports/{id}/run" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "kind": "string",
  "result": {}
}
Schema
kindstringrequired
resultrequired
4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

GEThttps://hermeticor.com/v1/analytics/reports/{id}/export

CSV text of a saved report (unavailable metrics are empty cells)

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/reports/{id}/export" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "filename": "string",
  "csv": "string"
}
Schema
filenamestringrequired
csvstringrequired
4XX Default Response

Same as 4XX · GET /v1/analytics/reports

5XX Default Response

Same as 4XX · GET /v1/analytics/reports

Updated