UNPKG

contentful-management

Version:
35 lines (32 loc) 1.34 kB
import { get } from './raw.js'; /** * @deprecated Use {@link getAggregated} instead, calling it once per metric key and * filtering by `filter[sys.dimensions.space.sys.id]` to scope to a space. Sunset: 2027-02-28. */ const getManyForSpace = (http, params) => { return get(http, `/organizations/${params.organizationId}/space_periodic_usages`, { params: params.query, }); }; /** * @deprecated Use {@link getAggregated} instead, calling it once per metric key * (this endpoint accepted multiple metrics per call via `metric[in]`; {@link getAggregated} * is scoped to a single `metricKey` per request). Sunset: 2027-02-28. */ const getManyForOrganization = (http, params) => { return get(http, `/organizations/${params.organizationId}/organization_periodic_usages`, { params: params.query, }); }; const getAggregated = (http, params) => { return get(http, `/organizations/${params.organizationId}/usages/${params.metricKey}`, { params: params.query, }); }; const getAssetBandwidthUsageDetailed = (http, params) => { return get(http, `/organizations/${params.organizationId}/usages-detailed/asset_bandwidth`, { params: params.query, }); }; export { getAggregated, getAssetBandwidthUsageDetailed, getManyForOrganization, getManyForSpace }; //# sourceMappingURL=usage.js.map