Struct sendgrid_api::query::Query[][src]

pub struct Query {
    pub client: Client,
}

Fields

client: Client

Implementations

Filter all messages.

This function performs a GET to the /messages endpoint.

This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice.

Filter all messages to search your Email Activity. All queries need to be URL encoded, and have this format:

query={query_type}="{query_content}"

encoded, this would look like this:

query=type%3D%22query_content%22

for example:

Filter by a specific email - query=to_email%3D%22example%40example.com%22

Filter by subject line - query=subject%3d%22A%20Great%20Subject%22

Full list of basic query types and examples:

Filter queryUnencoded Example (put this one into the try it out query - it’ll automatically encode it for you)Encoded Example (use this one in your code)
msg_idmsg_id=“filter0307p1las1-16816-5A023E36-1.0”msg_id%3D%22filter0307p1las1-16816-5A023E36-1.0%22
from_emailfrom_email=“testing@sendgrid.net”from_email%3D%22testing%40sendgrid.net%22
subjectsubject=“This is a subject test”subject%22This%20is%20a%20subject%20test%22
to_emailto_email=“example@example.com”to_email%3D%22example%40example.com%22
statusstatus%22processed%22
template_id
asm_group_id
api_key_id
eventsstatus=“processed”status%3D%22processed%22
originating_ip
categories
unique_args
outbound_ip
last_event_timelast_event_time=“2017-11-07T23:13:58Z”last_event_time%3D%E2%80%9C2017-11-07T23%3A13%3A58Z%E2%80%9D
clicksclicks=“0”clicks%3D%220%22

For information about building compound queries, and for the full query language functionality, see the query language reference.

Coming soon, example compound queries: limit + to email + date

Parameters:

  • query: &str – The license key provided with your New Relic account.
  • limit: f64 – The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000.
  • x_query_id: &str – The license key provided with your New Relic account.
  • x_cursor: &str – The license key provided with your New Relic account.
  • authorization: &str – The license key provided with your New Relic account.

Filter messages by message ID.

This function performs a GET to the /messages/{msg_id} endpoint.

This is BETA functionality. You may not have access, and we reserve the right to change functionality without notice.

Get all of the details about the specified message.

Parameters:

  • authorization: &str – The license key provided with your New Relic account.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.