This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/runtimeBackendSrvRequest

BackendSrvRequest type

BackendSrvRequest type

Used to initiate a remote call via the BackendSrv

Signature

export declare type BackendSrvRequest = {
    url: string;
    retry?: number;
    headers?: Record<string, any>;
    method?: string;
    showSuccessAlert?: boolean;
    showErrorAlert?: boolean;
    requestId?: string;
    hideFromInspector?: boolean;
    data?: any;
    params?: Record<string, any>;
    responseType?: 'json' | 'text' | 'arraybuffer' | 'blob';
    credentials?: RequestCredentials;
    withCredentials?: boolean;
};

Import

import { BackendSrvRequest } from '@grafana/runtime';