Modulify

Get storage delivery info

get_storage_info

Reads how a site's storage is served to the public, from its CDN address to the traffic it has served over a period.

It returns the bucket name, cdnUrl, the full https:// base address every public file is served under, and provisioned, whether the CDN has finished being provisioned. cdnUrl is null until the CDN is provisioned, so a public link is cdnUrl, a slash and the key.

rootVisibility is the default a new file gets when it is uploaded with no visibility to the top level, or into a folder with no default of its own, and it is what set_storage_root_visibility changes. The traffic comes back as bandwidthBytes, requestsServed and cacheHitRate over a period, the last 24 hours by default.

Reach for it when someone asks why a stored file is not loading, whether a file can be private, or what their files are costing in traffic. It keeps working while a storage backup is being restored. See The CDN link and the storage key.

Inputs

Input Type Required Description
projectId string Yes The site id.
period string No One of day, 24h, 7d, 30d, 90d, 12mo or all. day is today so far, from midnight UTC, 24h is the current hour and the 23 before it, 7d, 30d and 90d are the last 7, 30 and 90 days counting today, 12mo is this month and the 11 before it, and all reaches back to when the site was created. Defaults to 24h, and is left out when sending from and to.
from string No The first day of a custom range, as YYYY-MM-DD in UTC. Send it together with to.
to string No The last day of a custom range, as YYYY-MM-DD in UTC, included in the range and at most 3,660 days after from. Send it together with from.