Is AI recommending you? Ask Contentstack Canoe for free
Is AI recommending your brand? Find out with Contentstack Canoe for free
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Contentstack for Developers
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • The Forrester Wave™: Digital Experience Platforms, Q4 2025
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Analytics API
  4. Traffic

Traffic

markdownView as Markdown

Per-URL request counts, HTTP status distribution, and cache hit and miss ratios.

Cache Usage

GEThttps://app.contentstack.com/analytics/v2/hit-miss-ratio

The Cache Usage request counts cache hits and misses, so you can see how much of your traffic the cache absorbs. A hit is a response served from cache; a miss is one that had to be read from the database.

Each row carries status, either HIT or MISS; type, the service, such as cdn; count, the number of responses; and date, the day they occurred.

Pass cache to restrict the result to HIT, to MISS, or to all.

Sample Response
Status|200 OK
1234
{
  "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
  "paginated": false
}

Status Code

GEThttps://app.contentstack.com/analytics/v2/http-statuses

The Status Code request counts API requests by the HTTP status they returned, such as 200, 201, 400 or 404, so you can watch error rates alongside volume.

Each row carries status, the HTTP status as a string; type, the service that returned it, such as cma; count, how many requests ended that way; and date, the day they were made.

Pass httpStatusCode to narrow the result to a single status instead of all of them.

Sample Response
Status|200 OK
1234
{
  "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
  "paginated": false
}

Top URLs

GEThttps://app.contentstack.com/analytics/v2/url

The Top URLs request counts requests per URL for the services you name, so you can see which paths carry your traffic.

Each row carries url, the path that was accessed; type, the service that served it, such as cdn; and count, the number of requests. The result also carries urlDataSource, naming the store that answered the query. That value is set by the environment, can differ between requests, and is informational only.

Sort with sortBy, which accepts count or bandwidth, and orderBy, which accepts 1 for ascending or -1 for descending.

includeTotalCount is ignored when limit is sent.

Sample Response
Status|200 OK
1234
{
  "jobId": "job_7******a-c**f-4**9-9**0-c**********6",
  "paginated": true
}
Hide Parameters

Query Parameters

orgUidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
fromrequiredstring

Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.

Example:

2024-01-31
durationoptionalstring

Determines the granularity of the data. Accepted values are sec, minute, hour, day, week, month, year, and historic; any other value returns a 400 error. If you omit duration, the response is not broken down by date.

Example:

day
torequiredstring

Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future.

Example:

2024-03-31
servicesrequiredstring

Specify the array of services for which you want statistics, such as: ["cma", "ui", "cdn", "graphql", "images", "assets", "automations", "launch", "cs-assets"]. Pass either a JSON array of service names, for example ["cdn","cma"], or a single service name on its own, for example automations. A comma-separated list is not supported and returns no data.

Example:

["cdn","cma"]
apiKeyoptionalstring

Enter your stack API key to get data for that specific stack.

Example:

your_stack_api_key
cacheoptionalstring

Enter HIT to return only cached responses, MISS to return only responses served from the database, or all to return both. Any other value returns a 400 error.

Example:

HIT
space_uidoptionalstring

Enter a space UID to filter the response to that space, or all to include every space. The value is not case-sensitive. Only available when services is set to cs-assets on its own. Passing it alongside any other service returns a 400 error.

Example:

all
subServiceoptionalstring

Enter all, delivery-api, or management-api to filter the response to one part of the cs-assets service. The value is not case-sensitive; any other value returns a 400 error. Defaults to all. Like space_uid, it can only be used when services is set to cs-assets on its own.

Example:

all

Headers

authorizationoptionalstring

An OAuth access token from a machine-to-machine app, for server-to-server calls that need no user session.

Authentication is required. Pass either this header or authtoken, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

authtokenoptionalstring

A Contentstack authtoken, returned by the Log in to your account request on the Content Management API.

Authentication is required. Pass either this header or authorization, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

An account may hold at most 20 valid authtokens at a time; creating a twenty-first expires the oldest without warning. In an SSO-enabled organization, users who sign in through the identity provider do not receive an authtoken, so only the organization owner and users permitted to bypass SSO can call this API with one.

Hide Parameters

Query Parameters

fromrequiredstring

Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.

Example:

2024-01-31
torequiredstring

Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future.

Example:

2024-03-31
durationoptionalstring

Determines the granularity of the data. Accepted values are sec, minute, hour, day, week, month, year, and historic; any other value returns a 400 error. If you omit duration, the response is not broken down by date.

Example:

day
orgUidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
servicesrequiredstring

Specify the array of services for which you want statistics, such as: ["cma", "ui", "cdn", "graphql", "images", "assets", "automations", "launch", "cs-assets"]. Pass either a JSON array of service names, for example ["cdn","cma"], or a single service name on its own, for example automations. A comma-separated list is not supported and returns no data.

Example:

["cdn","cma"]
httpStatusCodeoptionalstring

Enter an HTTP status code to filter the response.

Example:

200
apiKeyoptionalstring

Enter your stack API key to get data for that specific stack.

Example:

your_stack_api_key
space_uidoptionalstring

Enter a space UID to filter the response to that space, or all to include every space. The value is not case-sensitive. Only available when services is set to cs-assets on its own. Passing it alongside any other service returns a 400 error.

Example:

all
subServiceoptionalstring

Enter all, delivery-api, or management-api to filter the response to one part of the cs-assets service. The value is not case-sensitive; any other value returns a 400 error. Defaults to all. Like space_uid, it can only be used when services is set to cs-assets on its own.

Example:

all

Headers

authorizationoptionalstring

An OAuth access token from a machine-to-machine app, for server-to-server calls that need no user session.

Authentication is required. Pass either this header or authtoken, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

authtokenoptionalstring

A Contentstack authtoken, returned by the Log in to your account request on the Content Management API.

Authentication is required. Pass either this header or authorization, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

An account may hold at most 20 valid authtokens at a time; creating a twenty-first expires the oldest without warning. In an SSO-enabled organization, users who sign in through the identity provider do not receive an authtoken, so only the organization owner and users permitted to bypass SSO can call this API with one.

Hide Parameters

Query Parameters

orgUidrequiredstring

Enter the UID of your Organization.

Example:

your_organization_uid
fromrequiredstring

Specify the start date for the required data. Use the following date format: YYYY-MM-DD. It cannot be in the future.

Example:

2024-01-31
torequiredstring

Enter the end date for the required data. The date format should be: YYYY-MM-DD. It must be on or after the from date and cannot be in the future.

Example:

2024-03-31
includeTotalCountoptionalstring

Set this parameter to true to include the total number of matching URLs in the response. If you also pass limit, the total is omitted from the response; request a page without limit to get it.

Example:

true
durationoptionalstring

Determines the granularity of the data. Accepted values are sec, minute, hour, day, week, month, year, and historic; any other value returns a 400 error. If you omit duration, the response is not broken down by date.

Example:

day
servicesoptionalstring

Specify the array of services for which you want statistics, such as: ["cma", "ui", "cdn", "graphql", "images", "assets", "automations", "launch"]. Pass either a JSON array of service names, for example ["cdn","cma"], or a single service name on its own, for example automations. A comma-separated list is not supported and returns no data.

Example:

["cdn","cma"]
apiKeyoptionalstring

Enter the API key of the stack.

Example:

your_stack_api_key
orderByoptionalstring

Enter 1 to sort the response in ascending order by count or -1 to sort it in descending order by count. By default, the value is set to -1, which orders the response in descending order.

Example:

1
sortByoptionalstring

Enter count to rank URLs by number of requests, or bandwidth to rank them by bandwidth consumed. Defaults to count.

Example:

count
limitoptionalstring

Specify the number of items you wish to fetch per request. This parameter must be passed together with skip; sending one without the other returns a 400 error. limit also has an upper bound set per environment; exceeding it returns a 400 error rather than a truncated result.

Example:

2
skipoptionalstring

Enter the number of items to skip. For example, a skip value of 10 will skip the first 10 items. This parameter must be passed together with limit; sending one without the other returns a 400 error.

Headers

authorizationoptionalstring

An OAuth access token from a machine-to-machine app, for server-to-server calls that need no user session.

Authentication is required. Pass either this header or authtoken, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

authtokenoptionalstring

A Contentstack authtoken, returned by the Log in to your account request on the Content Management API.

Authentication is required. Pass either this header or authorization, not both. The renderer lists them as separate optional headers, but a request with neither is rejected.

An account may hold at most 20 valid authtokens at a time; creating a twenty-first expires the oldest without warning. In an SSO-enabled organization, users who sign in through the identity provider do not receive an authtoken, so only the organization owner and users permitted to bypass SSO can call this API with one.