Analytics

Read provider-neutral publication analytics

GET
/api/projects/{projectId}/analytics

Authorization

headerAuthorizationBearer <Postdot API key>

A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.

Path Parameters

projectId*string
Length1 <= length

Query Parameters

from?integer
Range0 <= value
to?integer
Range0 <= value
channelId?string
Length1 <= length
provider?string
Length1 <= length
deliveryMode?string
Value in"manual""automatic"

Response Body

Response for status 200

application/json
  1. response
contractVersion*integer
Range1 <= value
projectId*string
Length1 <= length
projectTimeZone*string
Length1 <= length
observedAt*integer
Range0 <= value
range*
current*
historical*
coverage*
Example Request
curl -X GET 'https://postbot.example/api/projects/string/analytics'
Example Response
{
  "contractVersion": 1,
  "projectId": "string",
  "projectTimeZone": "string",
  "observedAt": 0,
  "range": {
    "from": 0,
    "to": 0
  },
  "current": {
    "publications": {
      "total": 0,
      "byState": [
        {
          "state": "draft",
          "count": 0
        }
      ],
      "byDeliveryMode": [
        {
          "deliveryMode": "manual",
          "count": 0
        }
      ],
      "byDimension": [
        {
          "channelId": "string",
          "channelName": "string",
          "provider": "string",
          "deliveryMode": "manual",
          "count": 0
        }
      ]
    },
    "executions": {
      "scheduled": 0,
      "due": 0,
      "running": 0,
      "retryablePending": 0,
      "succeeded": 0,
      "failed": 0,
      "ambiguous": 0
    },
    "workload": {
      "manualDue": 0,
      "ambiguousReconciliation": 0,
      "oldestDueAt": 0,
      "nextRunAt": 0,
      "futureScheduled": 0,
      "overdue": 0
    }
  },
  "historical": {
    "publications": {
      "created": 0,
      "published": 0,
      "failed": 0,
      "ambiguous": 0,
      "lifecycleTransitions": {
        "total": 0,
        "byState": [
          {
            "state": "draft",
            "count": 0
          }
        ],
        "byDimension": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ]
      },
      "byDimension": {
        "created": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "published": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "failed": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "ambiguous": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ]
      }
    },
    "executions": {
      "claimed": 0,
      "attempts": 0,
      "succeeded": 0,
      "failed": 0,
      "retryable": 0,
      "ambiguous": 0,
      "directAmbiguous": 0,
      "claimRecoveries": 0,
      "ambiguityRecoveries": 0,
      "cancelled": 0,
      "byDimension": {
        "claimed": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "attempts": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "succeeded": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "failed": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "retryable": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "ambiguous": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "directAmbiguous": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "claimRecoveries": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "ambiguityRecoveries": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ],
        "cancelled": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "count": 0
          }
        ]
      }
    },
    "retries": {
      "scheduled": 0,
      "rate": 0,
      "attemptsPerPublication": 0
    },
    "latency": {
      "queueDelay": {
        "count": 1,
        "totalMs": 0,
        "minMs": 0,
        "maxMs": 0,
        "averageMs": 0
      },
      "effectDuration": {
        "count": 1,
        "totalMs": 0,
        "minMs": 0,
        "maxMs": 0,
        "averageMs": 0
      },
      "scheduledToOutcome": {
        "count": 1,
        "totalMs": 0,
        "minMs": 0,
        "maxMs": 0,
        "averageMs": 0
      },
      "manualCompletion": {
        "count": 1,
        "totalMs": 0,
        "minMs": 0,
        "maxMs": 0,
        "averageMs": 0
      }
    },
    "buckets": [
      {
        "bucketDate": "string",
        "bucketStartUtc": 0,
        "bucketEndUtc": 0,
        "metrics": {
          "publicationsCreated": 0,
          "publicationsPublished": 0,
          "publicationsFailed": 0,
          "publicationsAmbiguous": 0,
          "publicationLifecycleTransitions": 0,
          "executionClaimed": 0,
          "executionAttempts": 0,
          "executionSucceeded": 0,
          "executionFailed": 0,
          "executionRetryable": 0,
          "executionAmbiguous": 0,
          "executionClaimRecoveries": 0,
          "executionAmbiguityRecoveries": 0,
          "executionCancelled": 0
        },
        "dimensions": [
          {
            "channelId": "string",
            "channelName": "string",
            "provider": "string",
            "deliveryMode": "manual",
            "metrics": {
              "publicationsCreated": 0,
              "publicationsPublished": 0,
              "publicationsFailed": 0,
              "publicationsAmbiguous": 0,
              "publicationLifecycleTransitions": 0,
              "executionClaimed": 0,
              "executionAttempts": 0,
              "executionSucceeded": 0,
              "executionFailed": 0,
              "executionRetryable": 0,
              "executionAmbiguous": 0,
              "executionClaimRecoveries": 0,
              "executionAmbiguityRecoveries": 0,
              "executionCancelled": 0
            }
          }
        ]
      }
    ]
  },
  "coverage": {
    "supportedFactVersions": [
      1
    ],
    "skippedFactCount": 0,
    "dataQuality": {
      "unknownEventVersions": 0,
      "unsupportedFacts": 0,
      "invalidMetadata": 0,
      "missingLifecycleState": 0,
      "missingAttemptMetadata": 0,
      "missingHistoricalDimensions": 0,
      "incompleteLatencyPairs": 0,
      "incompleteQueueDelayPairs": 0,
      "contradictoryAttempts": 0,
      "duplicateFacts": 0,
      "duplicateAttemptFacts": 0
    }
  }
}

Was this page helpful?