@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
78 lines (77 loc) • 4.45 kB
TypeScript
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi";
import { Configuration } from "../../datadog-api-client-common/configuration";
import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http";
import { DashboardUsage } from "../models/DashboardUsage";
import { DashboardUsageResponse } from "../models/DashboardUsageResponse";
import { ListDashboardsUsageResponse } from "../models/ListDashboardsUsageResponse";
export declare class DashboardsApiRequestFactory extends BaseAPIRequestFactory {
getDashboardUsage(dashboardId: string, _options?: Configuration): Promise<RequestContext>;
listDashboardsUsage(pageLimit?: number, pageOffset?: number, filterEditedBefore?: string, filterViewedBefore?: string, _options?: Configuration): Promise<RequestContext>;
}
export declare class DashboardsApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getDashboardUsage
* @throws ApiException if the response code was not in [200, 299]
*/
getDashboardUsage(response: ResponseContext): Promise<DashboardUsageResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listDashboardsUsage
* @throws ApiException if the response code was not in [200, 299]
*/
listDashboardsUsage(response: ResponseContext): Promise<ListDashboardsUsageResponse>;
}
export interface DashboardsApiGetDashboardUsageRequest {
/**
* The ID of the dashboard.
* @type string
*/
dashboardId: string;
}
export interface DashboardsApiListDashboardsUsageRequest {
/**
* Maximum number of dashboards to return per page. Server-side maximum is 500; values above 500 return a 400 Bad Request.
* @type number
*/
pageLimit?: number;
/**
* Zero-based offset into the result set.
* @type number
*/
pageOffset?: number;
/**
* Return only dashboards whose last edit (`edited_at`) is strictly before this ISO 8601 timestamp (`edited_at < value`; boundary matches are excluded). Must include a timezone offset (for example, `Z` or `+00:00`); naive timestamps return HTTP 400.
* @type string
*/
filterEditedBefore?: string;
/**
* Return only dashboards whose most recent view (`viewed_at`) is strictly before this ISO 8601 timestamp, including dashboards that have never been viewed. Must include a timezone offset; naive timestamps return HTTP 400. Orgs without Real User Monitoring (RUM) will see all dashboards returned by this filter.
* @type string
*/
filterViewedBefore?: string;
}
export declare class DashboardsApi {
private requestFactory;
private responseProcessor;
private configuration;
constructor(configuration: Configuration, requestFactory?: DashboardsApiRequestFactory, responseProcessor?: DashboardsApiResponseProcessor);
/**
* Get usage statistics for a single dashboard. The response includes view counts, the most recent view and edit times, widget counts, and the dashboard quality score. View-count fields depend on Real User Monitoring (RUM) and are `null` or `0` in orgs without RUM.
* @param param The request object
*/
getDashboardUsage(param: DashboardsApiGetDashboardUsageRequest, options?: Configuration): Promise<DashboardUsageResponse>;
/**
* Get paginated usage statistics for every dashboard in the caller's organization. Use `page[limit]` and `page[offset]` to walk the result set. Use `filter[edited_before]` or `filter[viewed_before]` to narrow results by recency. View-count fields depend on Real User Monitoring (RUM) and are `null` or `0` in orgs without RUM.
* @param param The request object
*/
listDashboardsUsage(param?: DashboardsApiListDashboardsUsageRequest, options?: Configuration): Promise<ListDashboardsUsageResponse>;
/**
* Provide a paginated version of listDashboardsUsage returning a generator with all the items.
*/
listDashboardsUsageWithPagination(param?: DashboardsApiListDashboardsUsageRequest, options?: Configuration): AsyncGenerator<DashboardUsage>;
}