databob
Data APIAPI referenceGET /v1/snapshots/content

GET /v1/snapshots/content

Read the content snapshot without recording a rebuild request.

Last updated on

Edit this page

GET /v1/snapshots/content

Authentication

Send Authorization: Bearer with the full dbk_live_ or dbk_test_ secret. The prefix is a label. Authorization is the HMAC of the secret.

Parameters and response

Playground, code samples, and the response schema below are generated from docs/data-api.openapi.yaml.

GET
/v1/snapshots/content

Same body as GET /v1/reports/content. Does not insert a content watch. Does not query Analytics Engine.

Authorization

dataApiKey
headerAuthorizationBearer <dbk_live_ or dbk_test_>

Public data API key. The dbk_live_ or dbk_test_ prefix is a label. Send the full secret. Missing, unknown, and revoked keys are 401. dbw_ and legacy dbr_ keys are 401. This response does not include Retry-After.

Query Parameters

period*string
Value in"7d""28d"
project_id?string

Required when the key can read every site in the org. Optional when the key is limited to one site. A different site in the same org is 403. A missing project and a project in another org are both 404.

content_id?string

One content id. Do not combine with content_ids.

content_ids?string

Comma-separated content ids. At most 20. Do not combine with content_id.

Response Body

Stored content snapshot.

application/json
  1. response
report*string
period*string
Value in"7d""28d"
items*array<>
Itemsitems <= 20
Example Request
curl -X GET 'https://api.databob.dev/v1/snapshots/content?period=7d'
Example Response
{  "report": "content",  "period": "7d",  "items": [    {      "id": "string",      "views": 0,      "previous_views": 0,      "enough_data": true    }  ]}

On this page