Skip to content

Query🔗

Constructor🔗

Query(ref_id: str)

Methods🔗

build🔗

Builds the object.

def build() -> alerting.Query

datasource_uid🔗

Grafana data source unique identifier; it should be 'expr' for a Server Side Expression operation.

def datasource_uid(datasource_uid: str) -> typing.Self

model🔗

JSON is the raw JSON query and includes the above properties as well as custom properties.

def model(model: cogbuilder.Builder[cogvariants.Dataquery]) -> typing.Self

query_type🔗

QueryType is an optional identifier for the type of query.

It can be used to distinguish different types of queries.

def query_type(query_type: str) -> typing.Self

ref_id🔗

RefID is the unique identifier of the query, set by the frontend call.

def ref_id(ref_id: str) -> typing.Self

relative_time_range🔗

RelativeTimeRange is the per query start and end time

for requests.

def relative_time_range(relative_time_range: alerting.RelativeTimeRange) -> typing.Self

See also🔗