Messages
Query Email Activities in SendGrid.
NOTE: E メールアクティビティにアクセスする場合は、SendGrid のEmail Activity History アドインを購入する必要があります。Restricted Access のキーを使用する場合は、messages.read およびemail_activity.read スコープを与える必要があります。
ビュー固有の情報
Select
本製品 はSendGrid API を使用して、以下のカラムと演算子で作成されたWHERE 句条件を処理します。その他のフィルタはクライアントサイドで本製品 内部で処理されます。Note:API は1000 レコードのみを返します。検索を制限するために、利用可能なフィルタから選択してください。
- Idは、'=,IN' 演算子をサポートします。
- Statusは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- Subjectは、'=,!=,LIKE,NOT LIKE'演算子をサポートします。
- FromEmailは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- ToEmailは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- Clicksは、'>,<,<=,>=,=,!=' 演算子をサポートします。
- LastEventTimeは、'>=, <=, BETWEEN' 演算子をサポートします。
- ApiKeyIdは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- AsmGroupIdは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- MarketingCampaignIdは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- MarketingCampaignNameは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- OriginatingIpは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- OutboundIpは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- Teammateは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
- TemplateIdは、'=,!=,LIKE,NOT LIKE' 演算子をサポートします。
例えば、次のクエリはサーバーサイドで処理されます。
SQL
SELECT * FROM Messages WHERE Id = '1234'
SELECT * FROM Messages WHERE Id IN ('1234', '4567')
SELECT * FROM Messages WHERE Status = 'not_delivered'
SELECT * FROM Messages WHERE LastEventTime BETWEEN '2020-01-01' AND '2020-01-15'
NOTE: Pagination is not available on this view. Any query—whether filtered or not—will return a maximum of 1000 records. If your filtered query matches more than 1000 records, only the first 1000 will be returned.
Columns
| Name | Type | References | Description |
| Id [KEY] | String | The Id of the message. | |
| Status | String | Status of the email. | |
| Subject | String | Subject of the email. | |
| FromEmail | String | The email of the sender. | |
| ToEmail | String | The email of the receiver. | |
| ClicksCount | Integer | The number of clicks. | |
| OpensCount | Integer | The number of times that the email was opened. | |
| LastEventTime | Datetime | The datetime of the event. | |
| ApiKeyId | String | Id of the API Key. | |
| AsmGroupId | String | ASM Group Id. | |
| MarketingCampaignId | String | The id of the marketing campaign. | |
| MarketingCampaignName | String | The name of the marketing campaign. | |
| MarketingCampaignSplitId | String | Split id of the campaign. | |
| MarketingCampaignVersion | String | Version of the campaign. | |
| OriginatingIp | String | This is the IP address of the person sending the message | |
| OutboundIp | String | This is the SendGrid dedicated IP address used to send the email | |
| OutboundIpType | String | The type of the outbound IP. | |
| Teammate | String | Username of the teammate. | |
| TemplateId | String | Template ID of the email. | |
| Events | String | List of events related to email message in SendGrid. |