CData Cloud は、クラウドホスト型のソリューションで、複数の標準サービスやプロトコルにまたがるSendGrid へのアクセスを実現します。SQL Server データベースに接続できるアプリケーションであれば、CData Cloud を介してSendGrid に接続できます。
CData Cloud により、他のOData エンドポイントや標準SQL Server と同じように、SendGrid への接続を標準化し、構成することができます。
このページでは、CData Cloud でのSendGrid への接続の確立 のガイド、利用可能なリソースに関する情報、および使用可能な接続プロパティのリファレンスについて説明します。
接続の確立 は、CData Cloud にデータベースを作成するためのSendGrid への認証方法と必要な接続プロパティの設定方法について示します。
利用可能な標準サービスを経由してSendGrid からデータにアクセスする方法と、CData Cloud の管理については、CData Cloud ドキュメント で詳しく説明します。
Database タブで対応するアイコンを選択して、SendGrid に接続します。必須プロパティはSettings にリストされています。Advanced タブには、通常は必要ない接続プロパティが表示されます。
SendGrid Cloud 経由で認証するには、API キーを使用する必要があります。
API キーを取得するには以下の手順に従ってください。
NOTE: E メールイベントにアクセスする場合は、SendGrid のEmail Activity History アドインを購入する必要があります。Restricted Access のキーを使用する場合は、messages.read およびemail_activity.read スコープを与える必要があります。
デフォルトでは、Cloud はサーバーとのTLS のネゴシエーションを試みます。サーバー証明書は、デフォルトのシステム信頼済み証明書ストアで検証されます。SSLServerCert 接続プロパティを使用して、証明書の検証方法をオーバーライドできます。
別の証明書を指定するには、SSLServerCert 接続プロパティを参照してください。
HTTP プロキシへの認証には、以下のように設定します。
次のプロパティを設定します。
Cloud は、SendGrid API をリレーショナルテーブル、ビュー、およびストアドプロシージャとしてモデル化します。大抵のテーブル、ビュー、およびストアドプロシージャは、簡単なテキストベースのコンフィギュレーションファイルであるスキーマファイルにて定義されます。
しかし、Recipients テーブルは動的です。Cloud は、SendGrid に接続し、適切なWeb サービスを呼び出してこのテーブルのメタデータを取得します。Recipients テーブルに定義したカスタムフィルタに加えた変更はすべて接続時に利用可能です。これらのカスタムフィルタはWHERE 句内でカラムとして使用できます。これらのカスタムフィルタはCustomFields テーブル内に表示されます。
Cloud は、SendGrid API を使用してサポートされているフィルタを処理します。その他のフィルタは、Cloud 内でクライアント側で処理されます。
新しいMarketing Campaigns API で利用可能なエンティティについては、新しいMarketing Campaigns データモデル を参照してください。
Legacy API で利用可能なエンティティについては、レガシーデータモデル を参照してください。
CData Cloud は、新しいMarketing Campaigns API をリレーショナルテーブル、ビュー、およびストアドプロシージャとしてモデル化します。ほとんどのテーブル、ビュー、ストアドプロシージャは、スキーマファイルに定義されています。テキストベースのシンプルな設定ファイルです。 Cloud は、SendGrid API を使用してサポートされているフィルタを処理します。その他のフィルタは、Cloud 内でクライアント側で処理されます。
新しいMarketing Campaigns データモデルを使用するには、Schema をNMC に設定します。
テーブル は、簡単にクエリや更新ができる利用可能なテーブルについて説明します。
ビュー は変更ができないテーブルです。一般的に、読み取り専用のデータはビューとして表示されます。
ストアドプロシージャ は、Sendgrid のファンクションライクなインターフェースです。これらを使用して、情報を検索、更新、および変更できます。
Cloud はSendGrid のデータを、標準のSQL ステートメントを使用してクエリできるリレーショナルデータベースのテーブルのリストとしてモデル化します。
| Name | Description |
| Alerts | Create, update, delete, and query Alerts in SendGrid. |
| ApiKeys | Query, Create, Update and Delete the available ApiKeys in SendGrid. |
| Blocks | Query and Delete the available Blocks in SendGrid. |
| Bounces | Query and Delete the available Bounces in SendGrid. |
| CancelScheduledSends | Update, delete, and query Cancel Scheduled Sends in SendGrid. |
| GlobalUnsubscribes | Query Global Unsubscribes in SendGrid. |
| InvalidEmails | Query and Delete invalid emails in SendGrid. |
| NMCCustomFields | Create, delete, and query New Marketing Campaign Custom Fields in SendGrid. |
| NMCLists | Create, update, delete, and query the available New Marketing Campaign Lists in SendGrid. |
| NMCSegments | Create, update, delete, and query New Marketing Campaign Segments in SendGrid. |
| NMCSenders | Create, update, delete, and query New Marketing Campaign Senders in SendGrid. |
| NMCSingleSends | Create, update, delete, and query the available New Marketing Campaign Single Sends in SendGrid. |
| Spam | Query and delete Spam reports in SendGrid. |
| Teammates | Query Teammates in SendGrid. |
| UnsubscribeGroups | Create, update, delete, and query Unsubscribe Groups in SendGrid. |
| Users | Query the available Users in SendGrid. |
Create, update, delete, and query Alerts in SendGrid.
このテーブルはId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM Alerts SELECT * FROM Alerts WHERE Id = '148825'
Stats Notification の挿入には、次のカラムが必須です:Type、EmailTo、Frequency。
INSERT INTO Alerts (Type, EmailTo, Frequency) VALUES ('stats_notification', '[email protected]', 'daily')
Usage Limit の挿入には、次のカラムが必須です:Type、EmailTo、Percentage。
INSERT INTO Alerts (Type, EmailTo, Percentage) VALUES ('usage_limit', '[email protected]', 20)
Id を指定することでEmailTo を更新できます。
UPDATE Alerts SET EmailTo = '[email protected]' WHERE Id = 1310789
Id を指定することでAlerts から削除できます。
DELETE FROM Alerts WHERE Id = 1310789
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The ID of the alert. | |
| CreatedAt | Datetime | True |
Date when the alert was created. | |
| UpdatedAt | Datetime | True |
Date when the alert was updated. | |
| EmailTo | String | False |
The email address that the alert will be sent to. | |
| Percentage | Integer | False |
The email address that the alert will be sent to. | |
| Type | String | False |
The type of alert. Allowed values (usage_limit, stats_notification). | |
| Frequency | String | False |
If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent.(daily, weekly, monthly). |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query, Create, Update and Delete the available ApiKeys in SendGrid.
すべてのApi Keys を取得します
SELECT * FROM ApiKeys
特定のApi Key に関する情報を取得します
SELECT * FROM Apikeys WHERE ApiKeyId = 'Dqdvdvdvdv4yLeuVQqO3rFxN5ktUxA'
挿入には、次のカラムが必須です:Name。
Scopes の値は次のとおりです:
alerts.create, alerts.read, alerts.update, alerts.delete, asm.groups.create, asm.groups.read, asm.groups.update, asm.groups.delete, ips.pools.ips.read, mail.send, mail_settings.bcc.read, mail_settings.bcc.update, mail_settings.address_whitelist.read, mail_settings.address_whitelist.update, mail_settings.footer.read,
mail_settings.footer.update, mail_settings.forward_spam.read, mail_settings.forward_spam.update, mail_settings.plain_content.read, mail_settings.plain_content.update, mail_settings.spam_check.read, mail_settings.spam_check.update, mail_settings.bounce_purge.read, mail_settings.bounce_purge.update, mail_settings.forward_bounce.read,
mail_settings.forward_bounce.update, partner_settings.new_relic.read, partner_settings.new_relic.update, partner_settings.sendwithus.read, partner_settings.sendwithus.update, tracking_settings.click.read, tracking_settings.click.update, tracking_settings.subscription.read, tracking_settings.subscription.update, tracking_settings.open.read,
tracking_settings.open.update, tracking_settings.google_analytics.read, tracking_settings.google_analytics.update, user.webhooks.event.settings.read, user.webhooks.event.settings.update, user.webhooks.event.test.create, user.webhooks.event.test.read, user.webhooks.event.test.update, user.webhooks.parse.settings.create, user.webhooks.parse.settings.read,
user.webhooks.parse.settings.update, user.webhooks.parse.settings.delete, stats.read, stats.global.read, categories.stats.read, categories.stats.sums.read, devices.stats.read, clients.stats.read, clients.phone.stats.read, clients.tablet.stats.read, clients.webmail.stats.read, clients.desktop.stats.read, geo.stats.read, mailbox_providers.stats.read,
browsers.stats.read, user.webhooks.parse.stats.read, templates.create, templates.read, templates.update, templates.delete, templates.versions.create, templates.versions.read, templates.versions.update, templates.versions.delete, templates.versions.activate.create, user.timezone.read, user.timezone.update, user.settings.enforced_tls.read, user.settings.enforced_tls.update,
api_keys.create, api_keys.read, api_keys.update, api_keys.delete, email_activity.read, categories.create, categories.read, categories.update, categories.delete, mail_settings.template.read, mail_settings.template.update, marketing_campaigns.create, marketing_campaigns.read, marketing_campaigns.update, marketing_campaigns.delete, mail.batch.create, mail.batch.read, mail.batch.update,
mail.batch.delete, user.scheduled_sends.create, user.scheduled_sends.read, user.scheduled_sends.update, user.scheduled_sends.delete, access_settings.whitelist.create, access_settings.whitelist.read, access_settings.whitelist.update, access_settings.whitelist.delete, access_settings.activity.read, whitelabel.create, whitelabel.read, whitelabel.update, whitelabel.delete, suppression.create,
suppression.read, suppression.update, suppression.delete, messages.read
INSERT INTO Apikeys (Name) VALUES ('apiname')
INSERT INTO Apikeys (Name, Scopes, Sample) VALUES ('apiname', 'alerts.create,alerts.read', 'test')
ApiKeyid を指定することでApiKeys を更新できます。更新を希望しない場合でも、UPDATE 中に名前とスコープの両方を指定する必要があります。
UPDATE Apikeys SET Name = 'apiname2', Scopes = 'alerts.create,alerts.read' WHERE apikeyid = 'Dqdvdvdvdv4yLeuVQqO3rFxN5kscsctUxA-P_Q'
ApiKeyid を指定してApiKeys を削除することができます。
DELETE FROM ApiKeys WHERE apikeyid = 'CMp4C8klscscscsQ0GxqvxtK2-P_Q'
| Name | Type | ReadOnly | References | Description |
| ApiKeyId [KEY] | String | False |
The ID of your API Key. | |
| Name | String | False |
The name of your API Key. | |
| Scopes | String | False |
The permissions this API Key has access to. This is populated only when Id is specified. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query and Delete the available Blocks in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。指定しない場合は、過去120日間のデフォルト期間が適用されます。CreatedAt カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM Blocks WHERE CreatedAt > '2016-01-01' AND CreatedAt < '2016-01-30'
Email を指定することでBlocks から削除できます。
DELETE FROM Blocks WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| CreatedAt | Datetime | True |
The time the block was created. | |
| Reason | String | False |
The reason for the block. | |
| Email [KEY] | String | False |
The email that blocked. | |
| Status | String | False |
The enhanced SMTP block response. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query and Delete the available Bounces in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。指定しない場合は、過去120日間のデフォルト期間が適用されます。CreatedAt カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM Bounces WHERE CreatedAt > '2016-01-01' AND CreatedAt < '2016-01-30'
Email を指定することでBounces から削除できます。
DELETE FROM Bounces WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| CreatedAt | Datetime | True |
The time the bounce was created. | |
| Reason | String | False |
The reason for the bounce. | |
| Email [KEY] | String | False |
The email that bounced. | |
| Status | String | False |
The enhanced SMTP bounce response. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Update, delete, and query Cancel Scheduled Sends in SendGrid.
このテーブルはBatchId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM CancelScheduledSends SELECT * FROM CancelScheduledSends WHERE BatchId = 148825
BatchId を指定してCancelScheduledSends を更新することができます。
使用できる値はcancel、pause です。
UPDATE CancelScheduledSends SET Status = 'cancel' WHERE BatchId = 1310789
BatchId を指定することでCancelScheduledSends から削除できます。
DELETE FROM CancelScheduledSends WHERE BatchId = 1310789
| Name | Type | ReadOnly | References | Description |
| BatchId [KEY] | String | False |
The Id of the batch. | |
| Status | String | False |
The status of the scheduled send.Allowed Values: cancel, pause |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query Global Unsubscribes in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。ただし、このフィルタは任意です。CreatedAt カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM GlobalUnsubscribes WHERE CreatedAt > '2016-01-01' AND CreatedAt < '2016-01-30'
このテーブルでInsert 操作を行うには、GlobalUnsubscribes リストに追加されるE メールを指定する必要があります。次に例を示します。
INSERT INTO GlobalUnsubscribes (Email) VALUES ('[email protected]')
このテーブルでDelete 操作を行うには、GlobalUnsubscribes リストから削除されるE メールを指定する必要があります。次に例を示します。
DELETE FROM GlobalUnsubscribes WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| Email [KEY] | String | False |
Email of the unsubscriber. | |
| CreatedAt | Datetime | True |
The time the unsubscriber was created. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query and Delete invalid emails in SendGrid.
このテーブルはEmail によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM InvalidEmails SELECT * FROM InvalidEmails WHERE Email = '[email protected]'
Email を指定することでInvalidEmails から削除できます。
DELETE FROM InvalidEmails WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| Created | Datetime | True |
The time the when the email address was added to the invalid emails list. | |
| Reason | String | False |
A reason explaining why the email address was marked as invalid.. | |
| Email [KEY] | String | False |
The email address that was marked as invalid. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, delete, and query New Marketing Campaign Custom Fields in SendGrid.
新しいMarketing Campaign のカスタムフィールドは、ユーザーにより指定された連絡先を分類するフィルタです。NMC プレフィックスは、New Marketing Campaign の略です。
すべてのNMCCustomFields の取得、またはId でのフィルタが可能です。
SELECT * FROM NMCCustomFields WHERE Id = '1'
タイプに関係なく、NMC Custom Fields をフィルタするには引用符を使用します。
NMCCustomFields に挿入するには、フィールド名とその種類の指定が必要です。タイプは、text、date、およびnumber が使用できます。
INSERT INTO NMCCustomFields (name, type) VALUES ('age', 'number')
UPDATE NMCCustomFields SET name = 'updated name' WHERE Id = '123'
Id を指定することでNMCCustomFields から削除できます。
DELETE FROM NMCCustomFields WHERE Id = '1'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the custom field. | |
| Name | String | False |
The name of the custom field. | |
| Type | String | False |
The type of the custom field. Allowed values are number, text, or date. |
Create, update, delete, and query the available New Marketing Campaign Lists in SendGrid.
NMC プレフィックスは、New Marketing Campaign の略です。
NMCLists テーブルはId によってのみフィルタできます。
SELECT * FROM NMCLists WHERE Id = '123'
テーブルへの挿入には、NMCLists の名前のみ必要です。
INSERT INTO NMCLists (Name) VALUES ('TestList')
Id を指定することでNMCLists を更新できます。
UPDATE NMCLists SET Name = 'New Name' WHERE Id = '123'
Id を指定することでNMCLists から削除できます。
DELETE FROM NMCLists WHERE Id = '123'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the list. | |
| Name | String | False |
The name of the list. | |
| ContactCount | Integer | True |
The recipient count of the list. | |
| ItemUrl | String | True |
The URL of the List Item. |
Create, update, delete, and query New Marketing Campaign Segments in SendGrid.
NMC プレフィックスは、New Marketing Campaign の略です。
すべてのセグメントの取得、またはId でのフィルタが可能です。
SELECT * FROM NMCSegments WHERE Id = '1'
特定の抽出条件によってセグメントはNMCContacts を分割できます。これらの抽出条件を指定するには、QueryDSL フィルタを使用します。
INSERT INTO NMCSegments (Name, QueryDSL) VALUES ("New Segment", "Segment Cdata", "first_name LIKE '%test%'"))
上記のステートメントは、値 "test" を含むFirstName を持つNMCContacts を含んだNMCSegments を作成します。
名前またはコンディションを更新することができます。すべてのセットが上書きされるので、フルセットを指定してください。
UPDATE NMCSegments SET Name = "Name Updated", QueryDSL = "first_name LIKE '%test update%'" WHERE Id = '123'
Id でのみNMCSegments を削除できます。
DELETE FROM NMCSegments WHERE Id = '123'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the segment. | |
| Name | String | False |
The name of the segment. | |
| ParentListId | String | False |
The Id of the list associated with the segment. | |
| ContactsCount | Integer | True |
The recipient count of the segment. | |
| CreatedAt | Datetime | True |
Field name for the first condition. | |
| SampleUpdatedAt | Datetime | False |
Field name for the first condition. | |
| UpdatedAt | Datetime | True |
Field name for the first condition. | |
| QueryDSL | String | False |
Field name for the first condition. | |
| NextSampleUpdate | Datetime | True |
The last updated samples date. | |
| ItemUrl | String | True |
The URL of the Segment item. | |
| ContactSampleAggregate | String | True |
The aggregate of the contact sample. |
Create, update, delete, and query New Marketing Campaign Senders in SendGrid.
NMC は、New Marketing Campaign の略です。
このテーブルはId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM NMCSenders SELECT * FROM NMCSenders WHERE Id = '148825'
挿入には、次のカラムが必須です:Nickname、FromEmail、FromName、ReplytoEmail、Address、City、Country。
INSERT INTO NMCSenders (Nickname, FromEmail, FromName, ReplytoEmail, Address, City, Country) VALUES ('Nickname', 'FromEmail', 'FromName', 'ReplytoEmail', 'Address', 'City', 'Country')
Id を指定してNMCSenders を更新することができます。
UPDATE NMCSenders SET Nickname = 'Nickname', FromEmail = 'FromEmail', FromName = 'FromName', ReplytoEmail = 'ReplytoEmail', Address = 'Address', City = 'City', Country = 'Country' WHERE Id = 1310789
Id を指定することでAlerts から削除できます。
DELETE FROM NMCSenders WHERE Id = 1310789
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The unique identifier of the sender identity. | |
| Nickname | String | False |
A nickname for the sender identity. Not used for sending.. | |
| FromEmail | String | False |
This is where the email will appear to originate from for your recipient. | |
| FromName | String | False |
This is the name appended to the from email field. IE - Your name or company name. | |
| ReplytoEmail | String | False |
This is the email that your recipient will reply to. | |
| ReplytoName | String | False |
This is the name appended to the reply to email field. IE - Your name or company name. | |
| Address | String | False |
The physical address of the sender identity. | |
| Address2 | String | False |
Additional sender identity address information. | |
| City | String | False |
The city of the sender identity. | |
| State | String | False |
The state of the sender identity. | |
| Zip | String | False |
The zipcode of the sender identity. | |
| Locked | String | True |
Indicator if the sender is locked. | |
| VerifiedStatus | String | True |
Verified status of the sender. | |
| VerifiedReason | String | True |
Verified reason of the sender. | |
| Country | String | False |
The country of the sender identity. | |
| CreatedAt | Datetime | True |
The end of the time range when the bounce was created. | |
| UpdatedAt | Datetime | True |
The end of the time range when the bounce was created. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, update, delete, and query the available New Marketing Campaign Single Sends in SendGrid.
NMC は、New Marketing Campaign の略です。
このテーブルはId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM NMCSingleSends SELECT * FROM NMCSingleSends WHERE Id = '148825'
挿入には、次のカラムが必須です:Name。
INSERT INTO NMCSingleSends (Name) VALUES ('SingleSend Name')
Id を指定してNMCSingleSends を更新することができます。
UPDATE NMCSingleSends SET Name = 'SingleSend Updated' WHERE Id = 1310789
Id を指定することでNMCSingleSends から削除できます。
DELETE FROM NMCSingleSends WHERE Id = 1310789
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the single send. | |
| Name | String | False |
The name of the single send. | |
| Categories | String | False |
The name of the single send. | |
| Status | String | False |
The status of the single send. | |
| CreatedAt | String | True |
The created timestamp of the single send. | |
| UpdatedAt | String | True |
The updated timestamp of the single send. | |
| IsABTest | Boolean | False |
Indicator showing if the single send is an AB Test. | |
| SendAt | Datetime | False |
The ISO 8601 time at which to send the single send. | |
| EmailConfigCustomUnsubscribeUrl | String | False |
The URL allowing recipients to unsubscribe. | |
| EmailConfigEditor | String | False |
The editor, design or code, used to modify the Single Send's design in the Marketing Campaigns application user interface. This is populated only when Id is specified. | |
| EmailConfigGeneratePlainContent | Boolean | False |
If this property is set to true, plain_content is always generated from html_content. If it's set to false, plain_content is not altered. This is populated only when Id is specified. | |
| EmailConfigHtmlContent | String | False |
The HTML content of the Single Send. This property is not used when a design_id value is set. This is populated only when Id is specified. | |
| EmailConfigIpPool | String | False |
The name of the IP Pool from which the Single Send emails are sent. This is populated only when Id is specified. | |
| EmailConfigPlainContent | String | False |
The plain text content of the Single Send. This is populated only when Id is specified. | |
| EmailConfigSenderId | Integer | False |
The ID of the verified sender from whom the Single Send will be sent. This is populated only when Id is specified. | |
| EmailConfigSubject | String | False |
The subject line of the Single Send. This is populated only when Id is specified. | |
| EmailConfigSuppressionGroupId | Integer | False |
The ID of the Suppression Group to allow recipients to unsubscribe. This is populated only when Id is specified. | |
| SendToListIds | String | False |
The IDs of each contact list to which the Single Send will be sent. This is populated only when Id is specified. | |
| SendToSegmentIds | String | False |
The IDs of each segment to which the Single Send will be sent. This is populated only when Id is specified. | |
| SendToAll | Boolean | False |
If this property is set to true, the Single Send will be sent to all of your contacts. This is populated only when Id is specified. | |
| ItemUrl | String | True |
The URL of the Single Send Item. |
Query and delete Spam reports in SendGrid.
このテーブルはEmail によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM Spam SELECT * FROM Spam WHERE Email = '[email protected]'
Delete from Spam
Email を指定することでSpam から削除できます。
DELETE FROM Spam WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| CreatedAt | Datetime | True |
The time when the spam report was made. | |
| Email [KEY] | String | False |
The email address of the recipient who marked your message as spam. | |
| Ip | String | False |
The IP address that the message was sent on. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query Teammates in SendGrid.
例えば、次のクエリはサーバーサイドで処理されます。
SELECT * FROM Teammates WHERE Username = 'test'
SELECT * FROM Teammates WHERE Username IN ('test', 'test2')
挿入には、次のカラムが必須です:Email およびScopes。Scopes カラムは、値のカンマ区切りのリストを許容します。利用できる値は以下です:user.account.read, user.credits.read, user.email.create, user.email.read, user.email.update, user.email.delete, user.profile.create, user.profile.read, user.profile.update, user.profile.delete
IsAdmin は任意で、デフォルトではAPI からはfalse として受け取られます。
INSERT INTO Teammates (Email, Scopes) VALUES ('[email protected]', 'user.profile.read,user.profile.update')
INSERT INTO Teammates (Email, Scopes, IsAdmin) VALUES ('[email protected]', 'user.profile.read,user.profile.update', 'true')
更新には、次のカラムが必須です:Username およびScopes。Scopes カラムは、値のカンマ区切りのリストを許容します。利用できる値は以下です:user.account.read, user.credits.read, user.email.create, user.email.read, user.email.update, user.email.delete, user.profile.create, user.profile.read, user.profile.update, user.profile.delete
UPDATE Teammates SET Scopes = 'user.profile.read' WHERE Username = 'testuser'
Teammates テーブルからレコードを削除するには、username カラムのみが必要です。次に例を示します。
DELETE FROM Teammates WHERE Username = 'testuser'
| Name | Type | ReadOnly | References | Description |
| Username [KEY] | String | False |
The username of the teammate. | |
| String | False |
Email of the teammate. | ||
| FirstName | String | False |
First name of the teammate. | |
| LastName | String | False |
Last name of the teammate. | |
| UserType | String | False |
User type of the teammate. | |
| IsAdmin | Boolean | False |
Indicator if the teammate is admin. | |
| Phone | String | False |
Phone of the teammate. | |
| Website | String | False |
Website of the teammate. | |
| Company | String | False |
Company of the teammate. | |
| Address | String | False |
Address of the teammate. | |
| Address2 | String | False |
Address 2 of the teammate. | |
| City | String | False |
City of the teammate. | |
| State | String | False |
State of the teammate. | |
| Country | String | False |
Country of the teammate. | |
| Zip | String | False |
Zip of the teammate. | |
| Scopes | String | False |
Scope of the permissions for the new teammate. Multiple values are allowed and should be split by a comma symbol. Possible values are: user.account.read,user.credits.read,user.email.create,user.email.read,user.email.update,user.email.delete,user.profile.create,user.profile.read,user.profile.update,user.profile.delete | |
| IsPartnerSSO | Boolean | False |
Indicator if the teammate partner is SSO. | |
| IsSSO | Boolean | False |
Indicator if the teammate is SSO. | |
| IsUnified | Boolean | False |
Indicator if the teammate is unified. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, update, delete, and query Unsubscribe Groups in SendGrid.
UnsubscribeGroups はId によってのみフィルタできます。
SELECT * FROM UnsubscribeGroups WHERE Id = '1'
UnsubscribeGroups に挿入するには、名前と説明を指定します。
INSERT INTO UnsubscribeGroups (Name, Description, IsDefault) VALUES ('Unsubscribe1', 'General Unsubscribe', true)
Id を指定することでUnsubscribeGroups を更新できます。
UPDATE UnsubscribeGroups SET Name = 'New Name', Description = 'New Description' WHERE Id = '1'
Id を指定することでUnsubscribeGroups から削除できます。
DELETE FROM UnsubscribeGroups WHERE Id = '1'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
Id of the unsubscribe group. | |
| Name | String | False |
The name of the unsubscribe group. | |
| Description | String | False |
The description of the unsubscribe group. | |
| LastEmailSentAt | Datetime | True |
The last time an email was sent to the unsubscribe group. | |
| IsDefault | Boolean | False |
If the unsubscribe group is the default group or not. | |
| Unsubscribes | Integer | True |
The number of unsubscribes from this group. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query the available Users in SendGrid.
Query this table to retrieve your current profile details.
SELECT * FROM Users
You can update the all the columns marked as readonly false.
UPDATE Users Set Address='Milpitas', Address2='North Carolina' WHERE id='38713966'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the user. | |
| Address | String | False |
The address of the user. | |
| Address2 | String | False |
The secondary address field for the user. | |
| City | String | False |
The city of the user. | |
| Company | String | False |
The company of the user. | |
| Country | String | False |
The country of the user. | |
| FirstName | String | False |
The first name of the user. | |
| LastName | String | False |
The last name of the user. | |
| Phone | String | False |
The phone number of the user. | |
| State | String | False |
The state the user is located in. | |
| Website | String | False |
The Web site URL of the user. | |
| Zip | String | False |
The ZIP code of the user. | |
| String | True |
The Email Address of the user. | ||
| Type | String | True |
The type of the user. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
ビューは、データを示すという点でテーブルに似ていますが、ビューは読み取り専用です。
クエリは、ビューに対して通常のテーブルと同様に実行することができます。
| Name | Description |
| AutomationStats | Get All Automation Stats |
| Categories | Query the available Categories in SendGrid. |
| CategoryStats | Query the available Category Stats in SendGrid. |
| Designs | List Designs |
| DynamicTemplates | Query Teammates in SendGrid. |
| GlobalStats | Query the available Global Stats in SendGrid. |
| GroupSuppressions | Query group suppressions in SendGrid. |
| IPAccessManagement | Query Global Unsubscribes in SendGrid. |
| MailSettings | Query all the mail settings in SendGrid. |
| MessageEvents | List of events related to email message in SendGrid. |
| Messages | Query Email Activities in SendGrid. |
| NMCContacts | Query New Marketing Campaign Contacts in SendGrid. |
| NMCReservedFields | Query the available New Marketing Campaign Reserved Fields in SendGrid. |
| NMCSegmentsContacts | Query New Marketing Campaign Segments Contacts sample in SendGrid. |
| PartnerSettings | Query all the partner settings in SendGrid. |
| SingleSendClickTrackingStats | Retrieves Single Send click tracking statistics by Id. |
| SingleSendsStats | Get all Single Sends statistics. |
| StatsByBrowser | Query Browser Statistics in SendGrid. |
| StatsByClient | Query Client Statistics in SendGrid. |
| StatsByDevice | Query Device Statistics in SendGrid. |
| StatsByLocation | Query Location Statistics in SendGrid. |
| StatsByMailboxProvider | Query Mailbox Provider Statistics in SendGrid. |
| Subusers | Query all the subusers in sendgrid. |
| SubuserStats | Query Subuser Statistics in SendGrid. |
| Templates | Retrieve paged transactional templates |
Get All Automation Stats
The following is an example to query the AutomationStats view:
SELECT * FROM AutomationStats
| Name | Type | References | Description |
| Id | String | This is the ID of the Automation you are requesting stats for. | |
| Aggregation | String | This describes the time unit to which the stat is rolled up. It is based on the aggregated_by parameter included in the request. It can be 'total' or the date (in YYYY-MM-DD format) the stats are for. | |
| StepId | String | This is the ID of the step if the stats were requested to be grouped by step_id. | |
| BounceDrops | Integer | BounceDrops | |
| Bounces | Integer | Bounces | |
| Clicks | Integer | Clicks | |
| Delivered | Integer | Delivered | |
| InvalidEmails | Integer | InvalidEmails | |
| Opens | Integer | Opens | |
| Requests | Integer | Requests | |
| SpamReportDrops | Integer | SpamReportDrops | |
| SpamReports | Integer | SpamReports | |
| UniqueClicks | Integer | UniqueClicks | |
| UniqueOpens | Integer | UniqueOpens | |
| Unsubscribes | Integer | Unsubscribes |
Query the available Categories in SendGrid.
このテーブルをクエリして、SendGrid で使用可能なカテゴリを取得します。
SELECT * FROM Categories
| Name | Type | References | Description |
| Name | String | The name of the categories. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query the available Category Stats in SendGrid.
以下は、CategoryStats ビューをクエリする例です。
SELECT * FROM CategoryStats WHERE Name = 'news'
日付でフィルタをかけることもできます。指定しない場合は、過去1年間のデフォルト期間が適用されます。このカラムでは=、>=、<=、<、および> 演算子がサポートされています。
SELECT * FROM CategoryStats WHERE Name = 'news' AND Date > '2016-01-01' AND Date < '2016-01-30'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the category. | |
| Date | Date | The time the global statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| Drops | Integer | The number of emails automatically dropped by SendGrid because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails confirmed delivered. | |
| InvalidEmails | Integer | The number of emails with a malformed address or reported as invalid by the receiving server. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid. | |
| Requests | Integer | The number of emails you requested to send via SendGrid. | |
| SpamReportDrops | Integer | The number of emails automatically dropped because the emails were marked as spam by the recipients. | |
| SpamReports | Integer | The number of emails marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. | |
| UnsubscribeDrops | Integer | The number of emails in this category dropped by SendGrid because the recipient unsubscribed from your emails. | |
| Unsubscribes | Integer | The number of recipients who unsubscribed from your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
List Designs
The following is an example to query the Designs view:
SELECT * FROM Designs SELECT * FROM Designs WHERE ID = 'd0ceee19-e773-403b-a72c-8d7c58ec6065'
| Name | Type | References | Description |
| Id [KEY] | String | ID of the Design. | |
| UpdatedAt | String | Datetime that Design was last updated. | |
| CreatedAt | String | Datetime that Design was created. | |
| ThumbnailURL | String | A Thumbnail preview of the template's html content. | |
| Name | String | The name of the new design. | |
| Editor | String | The editor used in the UI. | |
| ItemUrl | String | The URL of the Design Item. | |
| Subject | String | The subject of the Design Item. | |
| GeneratePlainContent | Boolean | Indicates whether plain content is to be generated. |
Query Teammates in SendGrid.
| Name | Type | References | Description |
| Id [KEY] | String | The ID of the template. | |
| Name | String | Name of the template. | |
| Generation | String | Generation of the template. (dynamic) | |
| UpdatedAt | Datetime | The last time the template was updated. |
Query the available Global Stats in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。指定しない場合は、過去1年間のデフォルト期間が適用されます。Date カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM GlobalStats
SELECT * FROM GlobalStats WHERE Date > '2016-01-01' AND Date < '2016-03-30'
| Name | Type | References | Description |
| Date | Date | The time the global statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| BounceDrops | Integer | The number of emails automatically dropped by SendGrid because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails confirmed delivered. | |
| InvalidEmails | Integer | The number of emails with a malformed address or reported as invalid by the receiving server. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid. | |
| Requests | Integer | The number of emails you requested to send via SendGrid. | |
| SpamReportDrops | Integer | The number of emails automatically dropped because the emails were marked as spam by the recipients. | |
| SpamReports | Integer | The number of emails marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. | |
| UnsubscribeDrops | Integer | The number of emails globally dropped by SendGrid because the recipient unsubscribed from your emails. | |
| Unsubscribes | Integer | The number of recipients who unsubscribed from your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query group suppressions in SendGrid.
以下は、GroupSuppressions テーブルをクエリする例です。
SELECT * FROM GroupSuppressions WHERE GroupId = 391 SELECT * FROM GroupSuppressions WHERE GroupId IN (391, 392, 393)
| Name | Type | References | Description |
| GroupId [KEY] | Integer | Email of the unsubscriber. | |
| Emails | String | The time the unsubscriber was created. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Global Unsubscribes in SendGrid.
次のクエリのみがサーバーサイドで処理されます。
SELECT * FROM IPAccessManagement
| Name | Type | References | Description |
| IP | String | IP Address. | |
| Allowed | Boolean | Indicator if this IP is allowed for access. | |
| AuthMethod | String | Authentication method. | |
| FirstAt | Timestamp | First time when IP has accessed the account. | |
| LastAt | Timestamp | Last time when IP has accessed the account. | |
| Location | String | Location of the IP. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query all the mail settings in SendGrid.
You can retrieve all the mail settings.
SELECT * FROM MailSettings
| Name | Type | References | Description |
| Title | String | The title of the mail setting. | |
| Enabled | String | Indicates if this mail setting is currently enabled. | |
| Name | String | The name of the mail setting. | |
| Description | String | A description of the mail setting. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
List of events related to email message in SendGrid.
NOTE: E メールイベントにアクセスする場合は、SendGrid のEmail Activity History アドインを購入する必要があります。Restricted Access のキーを使用する場合は、messages.read およびemail_activity.read スコープを与える必要があります。
SELECT * FROM MessageEvents WHERE MessageId = '1234'
NOTE: The query below will return message events only for the first 1000 message IDs retrieved from the messages endpoint.
SELECT * FROM MessageEvents;
| Name | Type | References | Description |
| MessageId | String | The Id of the message. | |
| EventName | String | Name of event.
使用できる値は次のとおりです。bounced, opened, clicked, processed, dropped, delivered, deferred, spam_report, unsubscribe, group_unsubscribe, group_resubscribe | |
| Processed | Datetime | The date when the event was processed. | |
| Reason | String | Explanation of what caused the message to be 'bounced', 'deferred', or 'blocked'. | |
| AttemptNum | Integer | Used with 'deferred' events to indicate the attempt number out of 10. | |
| Url | String | Used with 'clicked' event to indicate which url the user clicked. | |
| BounceType | String | Use to distinguish between types of bounces.
使用できる値は次のとおりです。soft, hard | |
| HttpUserAgent | String | Client recipient used to click or open message. | |
| MXServer | String | The MX server that received the email. | |
| ApiKeyId | String | Id of the API Key. | |
| AsmGroupId | String | ASM Group Id. | |
| Categories | String | Categories users associated to the message. | |
| UniqueArgs | String | JSON hash of key-value pairs associated with the message. | |
| 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. |
Query Email Activities in SendGrid.
NOTE: E メールアクティビティにアクセスする場合は、SendGrid のEmail Activity History アドインを購入する必要があります。Restricted Access のキーを使用する場合は、messages.read およびemail_activity.read スコープを与える必要があります。
Note:API は1000 レコードのみを返します。検索を制限するために、利用可能なフィルタから選択してください。
例えば、次のクエリはサーバーサイドで処理されます。
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.
| 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. |
Query New Marketing Campaign Contacts in SendGrid.
新しいMarketing Campaign の連絡先はユーザーが管理する受信者です。NMC プレフィックスは、New Marketing Campaign の略です。
すべてのNMCContacts の取得、またはId、ListId、SegmentId でのフィルタが可能です。
SELECT * FROM NMCCustomFields WHERE Id = 'pe37d765-ba38-46d9-be55-1e45a1ee8c84'
SELECT * FROM NMCCustomFields WHERE Id IN ('pe37d765-ba38-46d9-be55-1e45a1ee8c84', 'fe37d765-ba38-46d9-be55-1e45a1ee8c84')
SELECT * FROM NMCCustomFields WHERE ListId = 't6d51a34-3981-4fa6-bd3f-abdd4de8ff9f'
SELECT * FROM NMCCustomFields WHERE ListId IN ('j6d51a34-3981-4fa6-bd3f-abdd4de8ff9f', 'f6d51b34-3981-4fa6-bd3f-abdd4de8ff9f')
SELECT * FROM NMCCustomFields WHERE SegmentId = '82aeee2d-2870-41e4-b43c-0dcf63481589'
SELECT * FROM NMCCustomFields WHERE SegmentId IN ('82aeee2d-2870-41e4-b43c-0dcf63481589', 'j9d51a34-3981-4fa6-bd3f-abdd4de8ff9f')
| Name | Type | References | Description |
| Id [KEY] | String | This column is dynamic and maps to the corresponding field in the API. | |
| AddressLine1 | String | This column is dynamic and maps to the corresponding field in the API. | |
| AddressLine2 | String | This column is dynamic and maps to the corresponding field in the API. | |
| City | String | This column is dynamic and maps to the corresponding field in the API. | |
| Country | String | This column is dynamic and maps to the corresponding field in the API. | |
| PostalCode | String | This column is dynamic and maps to the corresponding field in the API. | |
| StateProvinceRegion | String | This column is dynamic and maps to the corresponding field in the API. | |
| Line | String | This column is dynamic and maps to the corresponding field in the API. | |
| String | This column is dynamic and maps to the corresponding field in the API. | ||
| PhoneNumber | String | This column is dynamic and maps to the corresponding field in the API. | |
| UniqueName | String | This column is dynamic and maps to the corresponding field in the API. | |
| String | This column is dynamic and maps to the corresponding field in the API. | ||
| String | This column is dynamic and maps to the corresponding field in the API. | ||
| FirstName | String | This column is dynamic and maps to the corresponding field in the API. | |
| LastName | String | This column is dynamic and maps to the corresponding field in the API. | |
| CreatedAt | Datetime | This column is dynamic and maps to the corresponding field in the API. | |
| UpdatedAt | Datetime | This column is dynamic and maps to the corresponding field in the API. | |
| ItemUrl | String | This column is dynamic and maps to the corresponding field in the API. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| SegmentId | String | This column is dynamic and maps to the corresponding field in the API. | |
| ListId | Uuid | This column is dynamic and maps to the corresponding field in the API. |
Query the available New Marketing Campaign Reserved Fields in SendGrid.
このテーブルは、フィルタリングをサポートしていません。NMC プレフィックスは、New Marketing Campaign の略です。
SELECT * FROM NMCReservedFields
| Name | Type | References | Description |
| Id | String | The Id of the reserved field. | |
| Name | String | The name of the reserved field. | |
| Type | String | The type of the reserved field. |
Query New Marketing Campaign Segments Contacts sample in SendGrid.
| Name | Type | References | Description |
| Id [KEY] | String | The Id of the contact sample. | |
| String | The email of the contact sample. | ||
| FirstName | String | The first name of the contact sample. | |
| LastName | String | The last name of the contact sample. | |
| NMCSegmentId | String |
NMCSegments.Id | Segment id of the contacts table. |
Query all the partner settings in SendGrid.
You can retrieve all the partner settings.
SELECT * FROM PartnerSettings
| Name | Type | References | Description |
| Title | String | The title of the partner. | |
| Enabled | String | Indicates if this partner setting has been enabled. | |
| Name | String | The name of the partner setting. | |
| Description | String | A description of this partner setting. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Retrieves Single Send click tracking statistics by Id.
Get Single Send Click Tracking statistics. To access the view, you need to provide the Single Send ID.
SELECT * FROM SingleSendClickTrackingStats where SingleSendId = '74550809-66a2-11ef-ad7f-460f539623db'
| Name | Type | References | Description |
| SingleSendId | String | The Id of Single Send for which you want to retrieve click tracking statistics. | |
| Url | String | The URL of the link clicked. If {{custom_fields}} are part of the URL, they are included. | |
| UrlLocation | Integer | The location of the link clicked in each Single Send A/B variation, or if there are no variations, the Single Send itself. Links are numbered from the top down; the topmost link is index 0. | |
| ABvariation | String | The A/B variation of the Single Send statistic returned. It is set to 'all' if the ab_variation query parameter was not set in the request and group_by does not contain ab_variation. | |
| ABphase | String | The A/B phase of the Single Send statistic returned. If the ab_phase query parameter was not provided, it returns 'all'. | |
| Clicks | Integer | The number of clicks on this particular link. |
Get all Single Sends statistics.
The Cloud uses the SendGrid API to process search criteria that refer to the Id column, while other filters are processed client side within the Cloud.
Get all Single Sends statistics:
SELECT * FROM SingleSendsStats
Get Single Send statistics by ID:
SELECT * FROM SingleSendsStats where id = '25723e10-669e-11ef-b50f-0e4b6974e9ad'
| Name | Type | References | Description |
| Id [KEY] | String | The ID of the Single Send you require stats for. | |
| ABvariation | String | The A/B variation of the Single Send statistic returned. If the group_by parameter doesn't include ab_variation in the request, then the value is 'all'. | |
| ABphase | String | This is the A/B phase of the Single Send statistic returned. If the group_by parameter doesn't include ab_phase in the request, then the value is 'all'. | |
| Aggregation | String | The time unit to which the statistic is rolled up. It is based on the aggregated_by parameter included in the request. It can be 'total' or the date (in YYYY-MM-DD format) the statistics are for. | |
| BounceDrops | Integer | The number of dropped messages due to previous bounces. | |
| Bounces | Integer | The number of email messages that bounced (not delivered to recipients). | |
| Clicks | Integer | The total number of times links in the email were clicked. | |
| Delivered | Integer | The total number of messages successfully delivered to recipient inboxes. | |
| InvalidEmails | Integer | The number of email addresses that were invalid or did not exist. | |
| Opens | Integer | The total number of times the email was opened. | |
| Requests | Integer | The total number of email send requests made for the Single Send campaign. | |
| SpamReportDrops | Integer | The number of messages not sent because recipients previously marked your emails as spam. | |
| SpamReports | Integer | The number of times recipients reported the email as spam. | |
| UniqueClicks | Integer | The number of unique recipients who clicked at least one link in the email. | |
| UniqueOpens | Integer | The number of unique recipients who opened the email at least once. | |
| Unsubscribes | Integer | The number of recipients who unsubscribed using the unsubscribe link in the email. |
Query Browser Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByBrowser WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Browser Statistics by name.
SELECT * FROM StatsByBrowser WHERE Name = 'Firefox'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Client Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByClient WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Client Statistics by name.
SELECT * FROM StatsByClient WHERE Name = 'Other'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Device Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByDevice WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Device Statistics by name.
SELECT * FROM StatsByDevice WHERE Name = 'Phone'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Location Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByLocation WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Location Statistics by name.
SELECT * FROM StatsByLocation WHERE Name = 'US'
To query Location Statistics by type.
SELECT * FROM StatsByLocation WHERE Type = 'country'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Mailbox Provider Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByMailboxProvider WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Mailbox Provider Statistics by name.
SELECT * FROM StatsByMailboxProvider WHERE Name = 'Microsoft Outlook Live'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| Drops | Integer | The number of emails automatically dropped by SendGrid because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails confirmed delivered. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid. | |
| Requests | Integer | The number of emails you requested to send via SendGrid. | |
| SpamReports | Integer | The number of emails marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query all the subusers in sendgrid.
Query this table to retrieve all subusers.
SELECT * FROM Subusers
You can filter by Username to retrieve a specific subuser.
SELECT * FROM Subusers WHERE Username = 'Example'
| Name | Type | References | Description |
| Id | Integer | The Id of the subuser. | |
| String | The email of the subuser. | ||
| Username | String | The username of the subuser. | |
| Disabled | Boolean | Indicates whether the subuser is enabled or disabled. |
Query Subuser Statistics in SendGrid.
SubuserName でフィルタリングすると、特定のサブユーザーの統計情報を取得できます。
SELECT * FROM SubuserStats WHERE SubuserName = 'Example'
日付でフィルタをかけることもできます。このカラムでは=、>=、<=、<、および> 演算子がサポートされています。指定しない場合は、過去1年間のデフォルト期間が適用されます。
SELECT * FROM SubuserStats WHERE SubuserName = 'News' AND Date > '2016-01-01' AND Date < '2016-01-30'
| Name | Type | References | Description |
| Date | Date | The time the subuser statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| Drops | Integer | The number of emails automatically dropped because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links that were clicked in the emails from this subuser. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails from this subsuer that were confirmed delivered. | |
| InvalidEmails | Integer | The number of emails with a malformed address or reported as invalid by the receiving server. | |
| Opens | Integer | The number of times emails from this subuser were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid by this subuser. | |
| Requests | Integer | The number of emails that you requested to send via SendGrid from this subuser. | |
| SpamReportDrops | Integer | The number of emails automatically dropped because the emails were marked as spam by the recipients. | |
| SpamReports | Integer | The number of emails from this subuser that were marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked on links in your emails from this subuser. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails from this subuser. | |
| UnsubscribeDrops | Integer | The number of emails from this subuser dropped by SendGrid because the recipients unsubscribed from your emails. | |
| Unsubscribes | Integer | The number of recipients who unsubscribed from your emails from this subuser. | |
| SubuserName | String | The name of the statistic. | |
| Type | String | The type of the statistic. |
Retrieve paged transactional templates
The following is an example to query the Templates view:
SELECT * FROM Templates
The Cloud will use the SendGrid API to process WHERE clause conditions built with the following column and operator.
SELECT * FROM Templates WHERE Generation = 'dynamic'
| Name | Type | References | Description |
| ID [KEY] | String | The ID of the transactional template. | |
| Generation | String | Defines the generation of the template. By default, we will get data for both dynamic and legacy.
使用できる値は次のとおりです。dynamic, legacy | |
| Name | String | The name for the transactional template. | |
| UpdatedAt | String | The date and time that this transactional template version was updated. | |
| Versions | String | The different versions of this transactional template. |
ストアドプロシージャはファンクションライクなインターフェースで、SendGrid の単純なSELECT/INSERT/UPDATE/DELETE 処理にとどまらずCloud の機能を拡張します。
ストアドプロシージャは、パラメータのリストを受け取り、目的の機能を実行し、プロシージャが成功したか失敗したかを示すとともにSendGrid から関連するレスポンスデータを返します。
| Name | Description |
| AddRecipientToList | Adds a recipient to a list. |
| GetImportContactsStatus | Gets the Import contacts status |
| GetScopes | Returns a list of all scopes that this user has access to. |
| ImportMarketingContacts | Import contacts to sendgrid account from CSV file. |
| SendMail | Sends a mail. |
| SendMail2 | Sends a mail. This Stored Procedure is used to handle aggregates. |
| SendTestCampaign | Sends a test campaign. |
Adds a recipient to a list.
| Name | Type | Required | Description |
| ListId | String | True | The unique identifier for the list. |
| RecipientId | String | True | The Id of the recipient. |
| AccountId | String | False | The ID of the account. |
| SubuserUsername | String | False | The username of the subuser. |
| Name | Type | Description |
| Success | String | Whether or not the recipient was successfully added to the list. |
Gets the Import contacts status
GetImportContactsStatus ストアドプロシージャはImport Contacts のJobId が必要とし、これはImportMarketingContacts ストアドプロシージャを実行することで取得できます。
例:
EXEC GetImportContactsStatus JobId= '1234'
| Name | Type | Required | Description |
| JobId | String | True | The Id of the Import Contacts Job |
| Name | Type | Description |
| Success | String | The Staus of the corresponding Import Contacts Job. |
| RequestedCount | String | The Number of contacts requested to modify through API. |
| CreatedCount | String | The Number of contacts created. |
| UpdatedCount | String | The Number of Updated contacts. |
| DeletedCount | String | The Number of Deleted contacts. |
Returns a list of all scopes that this user has access to.
| Name | Type | Required | Description |
| AccountId | String | False | The Id of the account on whose behalf the call is made. |
| SubuserUsername | String | False | The username of the Subuser on whose behalf the call is made. |
| Name | Type | Description |
| Scopes | String | List of all scopes. |
Import contacts to sendgrid account from CSV file.
ImportMarketingContacts ストアドプロシージャは、Field Mapping Ids および連絡先データを含むFile のパスが必要です。
Field Mapping にはcustom_field ids またはreserved_field ids が使用できます。これらのId は"Get All Field Definitions" エンドポイントを使用して取得できます。
NOTE:
1. ファイルから連絡先をインポートするには、Email フィールドマッピングが必須です。
2. 現時点では、この操作にはcsv ファイル形式のみがサポートされています。
例:
EXEC ImportMarketingContacts FileType= 'csv' , FieldMappings= '_rf2_T,_rf9_T' , FilePath = 'C:\Dev\Tests\v20\ProviderSendgrid\example.csv'
| Name | Type | Required | Description |
| FileType | String | False | The type of the file
使用できる値は次のとおりです。csv |
| FieldMappings | String | True | Comma separated list of field_definition IDs |
| ListIds | String | False | Comma separated list of List id's |
| FilePath | String | False | The absolute path of the File to import contacts |
| Name | Type | Description |
| JobId | String | The Id of the Import Contacts Job |
Sends a mail.
DynamicTemplateData インプットはテンプレートの動的データに関する情報を必要とします。テンプレートに入れる各種変数の値。
例:{"fullname":"Test","paymenttotal":"Test","description":"Test"}
NOTE:TemplateId カラムは、Dynamics Templates を使用する場合に必須です。
SendMail では、リクエストボディに少なくとも1つのpersonalizations オブジェクトが必要で、集計関数を使用して追加できます。
例:
TEMP テーブルを使用。
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'abc')
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'xyz')
INSERT INTO To#TEMP (ToEmail) VALUES ('[email protected]')
INSERT INTO ToCC#TEMP (ToCCName, ToCCEmail) VALUES ('[email protected]', 'xyz')
INSERT INTO ToBCC#TEMP (ToBCCEmail, ToBCCName) VALUES ('[email protected]', 'abc')
INSERT INTO Content#TEMP (ContentValue, ContentType) VALUES ('[email protected]', 'text/plain')
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2', 'To#TEMP', 'ToCC#TEMP', 'ToBCC#TEMP')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content = 'Content#TEMP'
Aggregate 値を使用。
単一のメールアドレスにメールを送信。
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2',
'[
{
"ToEmail": "[email protected]",
"ToName": "abc"
}
]',
'[
{
"ToCCName": "xyz",
"ToCCEmail": "[email protected]"
}
]',
'[
{
"ToBCCEmail": "[email protected]",
"ToBCCName": "abcd"
}
]')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content =
'{
"ContentValue":"content",
"ContentType":"text/plain"
}'
複数のメールアドレスにメールを送信。
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2',
'[
{
"ToEmail": "[email protected]",
"ToName": "abc"
},
{
"ToEmail": "[email protected]",
"ToName": "xyz"
},
{
"ToEmail": "[email protected]"
}
]',
'[
{
"ToCCName": "sac",
"ToCCEmail": "[email protected]"
}
]',
'[
{
"ToBCCEmail": "xyz",
"ToBCCName": "[email protected]"
}
]')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content =
'{
"ContentValue":"content",
"ContentType":"text/html"
}'
Send Mail using attachment.
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'abc')
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'xyz')
INSERT INTO To#TEMP (ToEmail) VALUES ('[email protected]')
INSERT INTO ToCC#TEMP (ToCCName, ToCCEmail) VALUES ('[email protected]', 'xyz')
INSERT INTO ToBCC#TEMP (ToBCCEmail, ToBCCName) VALUES ('[email protected]', 'abc')
INSERT INTO Content#TEMP (ContentValue, ContentType) VALUES ('[email protected]', 'text/plain')
INSERT INTO Attachments#TEMP (AttachmentContent, AttachmentFilename) VALUES ('abcdefghijklmn', 'Test2.png')
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2', 'To#TEMP', 'ToCC#TEMP', 'ToBCC#TEMP')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content = 'Content#TEMP', Attachments = 'Attachments#TEMP'
| Name | Type | Required | Description |
| Subject | String | True | The subject of the mail to be sent. |
| ContentValue | String | False | The content of the mail to be sent. |
| ContentType | String | False | The type of content to be sent. supported values are text/plain and text/html |
| Content | String | True | The aggregate for Content object |
| SendAt | String | False | The date and time when you want your email to be delivered. Scheduling more than 72 hours in advance is forbidden. |
| FromEmail | String | True | The email address of the sender. |
| FromName | String | False | The name of the sender. |
| ToEmail | String | False | Email address to send the mail to |
| ToName | String | False | Email's respective names to send the mail to. |
| To | String | False | The aggregate for To recipients |
| ToCCEmail | String | False | Email address of the recipients who will receive a copy of your email |
| ToCCName | String | False | Name of the recipients who will receive a copy of your email. |
| ToCC | String | False | The aggregate for ToCC recipients. |
| ToBCCEmail | String | False | Email address of the recipients who will receive a blind carbon copy of your email. |
| ToBCCName | String | False | Name of the recipients who will receive a blind carbon copy of your email. |
| ToBCC | String | False | The aggregate for ToBCC recipients. |
| ReplyToEmail | String | False | The email address of the person to whom you are replying to. |
| ReplyToName | String | False | The name of the person to whom you are replying to. |
| AttachmentPaths | String | False | Path of the file to attach to the mail to be sent |
| TemplateId | String | False | The Id of the template that you may want to send |
| DynamicTemplateData | String | False | The data of the dynamic template. |
| Personalizations | String | True | An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. |
| AttachmentFilename | String | False | The attachment's filename. Specify only when you don't specify the AttachmentPaths. |
| Attachments | String | False | An array of objects where you can specify any attachments you want to include. Specify only when you don't specify the AttachmentPaths. |
| Name | Type | Description |
| Success | String | Whether or not the mail was sent successfully. |
Sends a mail. This Stored Procedure is used to handle aggregates.
SendMail2 Stored Procedure is specifically made for handling the aggregates. User has to provide the whole json structure in order to execute this Stored Procedure.
For Example:
EXECUTE SendMail2 Personalizations = '[{"to": [{"email": "[email protected]", "name": "John Doe"}, {"email": "[email protected]", "name": "Julia Doe"}], "cc": [{"email": "[email protected]", "name": "Jane Doe"}], "bcc": [{"email": "[email protected]", "name": "Jim Doe"}]}, {"from": {"email": "[email protected]", "name": "Example Sales Team"}, "to": [{"email": "[email protected]", "name": "Janice Doe"}], "bcc": [{"email": "[email protected]", "name": "Jordan Doe"}]}]', FromEmail = '[email protected]', FromName = 'Example Order Confirmation', Subject = 'Test Subject', Content = '[{"type": "text/html", "value": "test value"}]', Categories = '["cake", "pie"]'
| Name | Type | Required | Description |
| Personalizations | String | True | An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. |
| FromEmail | String | True | The email address of the sender. |
| FromName | String | True | The name of the sender. |
| ReplyToEmail | String | False | The email address of the person to whom you are replying to. |
| ReplyToName | String | False | The name of the person to whom you are replying to. |
| Subject | String | True | The global or 'message level' subject of your email. |
| Content | String | True | An array where you can specify the content of your email. |
| Attachments | String | False | An array of objects where you can specify any attachments you want to include. |
| Categories | String | False | An array of category names for this message. Each category name may not exceed 255 characters. |
| SendAt | String | False | A unix timestamp allowing you to specify when you want your email to be delivered. |
| BatchId | String | False | An ID representing a batch of emails to be sent at the same time. |
| AsmGroupId | String | False | The unsubscribe group to associate with this email. |
| AsmGroupsToDisplay | String | False | An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page. |
| IpPoolName | String | False | The IP Pool that you would like to send this email from. |
| MailSettingsByPassListManagementEnable | String | False | A collection of different mail settings that you can use to specify how you would like this email to be handled. Indicates if this setting is enabled. |
| MailSettingsFooterEnable | String | False | The default footer that you would like included on every email. Indicates if this setting is enabled. |
| MailSettingsSandboxModeEnable | String | False | Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly. Indicates if this setting is enabled. |
| TrackingSettingsClickTrackingEnable | String | False | Allows you to track if a recipient clicked a link in your email. Indicates if this setting is enabled. |
| TrackingSettingsClickTrackingEnableText | String | False | Allows you to track if a recipient clicked a link in your email. Indicates if this setting should be included in the text/plain portion of your email. |
| TrackingSettingsOpenTrackingEnable | String | False | Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened. Indicates if this setting is enabled. |
| TrackingSettingsOpenTrackingSubstitutionTag | String | False | Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened. Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. |
| TrackingSettingsSubscriptionTrackingEnable | String | False | Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. Indicates if this setting is enabled. |
| TemplateId | String | False | The Id of the template that you may want to send |
| Name | Type | Description |
| Success | String | Whether or not the mail was sent successfully. |
Sends a test campaign.
| Name | Type | Required | Description |
| To | String | True | The email address to send the campaign to. |
| Campaign_ID | String | True | The Id of the campaign to send. |
| AccountId | String | False | The ID of the account. |
| SubuserUsername | String | False | The username of the subuser. |
| Name | Type | Description |
| Success | String | Whether or not the campaign was sent successfully. |
CData Cloud は、レガシーAPI をリレーショナルテーブル、ビュー、およびストアドプロシージャとしてモデル化します。大抵のテーブル、ビュー、およびストアドプロシージャは、簡単なテキストベースのコンフィギュレーションファイルであるスキーマファイルにて定義されます。
しかし、Recipients テーブルは動的です。Cloud は、SendGrid に接続し、適切なWeb サービスを呼び出してこのテーブルのメタデータを取得します。Recipients テーブルに定義したカスタムフィルタに加えた変更はすべて接続時に利用可能です。これらのカスタムフィルタはWHERE 句内でカラムとして使用できます。これらのカスタムフィルタはCustomFields テーブル内に表示されます。
Cloud は、SendGrid API を使用してサポートされているフィルタを処理します。その他のフィルタは、Cloud 内でクライアント側で処理されます。
従来のデータモデルを使用するには、Schema をLegacy に設定します。
テーブル は、簡単にクエリや更新ができる利用可能なテーブルについて説明します。
ビュー は変更ができないテーブルです。一般的に、読み取り専用のデータはビューとして表示されます。
ストアドプロシージャ は、Sendgrid のファンクションライクなインターフェースです。これらを使用して、情報を検索、更新、および変更できます。
Cloud はSendGrid のデータを、標準のSQL ステートメントを使用してクエリできるリレーショナルデータベースのテーブルのリストとしてモデル化します。
| Name | Description |
| Alerts | Create, update, delete, and query Alerts in SendGrid. |
| ApiKeys | Query, Create, Update and Delete the available ApiKeys in SendGrid. |
| Blocks | Query and Delete the available Blocks in SendGrid. |
| Bounces | Query and Delete the available Bounces in SendGrid. |
| CancelScheduledSends | Update, delete, and query Cancel Scheduled Sends in SendGrid. |
| CustomFields | Create, delete, and query Custom Fields in SendGrid. |
| GlobalUnsubscribes | Query Global Unsubscribes in SendGrid. |
| InvalidEmails | Query and Delete invalid emails in SendGrid. |
| Lists | Create, update, delete, and query the available Lists in SendGrid. |
| MarketingCampaigns | Create, update, delete, and query Marketing Campaigns in SendGrid. |
| Recipients | The SendGrid table Recipients. |
| Schedules | Create, update, delete, and query Campaign Schedules in SendGrid. |
| Segments | Create, update, delete, and query Segments in SendGrid. |
| SenderIdentities | Create, update, delete, and query Sender Identities in SendGrid. |
| Spam | Query and delete Spam reports in SendGrid. |
| Teammates | Query Teammates in SendGrid. |
| UnsubscribeGroups | Create, update, delete, and query Unsubscribe Groups in SendGrid. |
| Users | Query the available Users in SendGrid. |
Create, update, delete, and query Alerts in SendGrid.
このテーブルはId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM Alerts WHERE Id = '148825'
Stats Notification の挿入には、次のカラムが必須です:Type、EmailTo、Frequency。
INSERT INTO Alerts (Type, EmailTo, Frequency) VALUES ('stats_notification', '[email protected]', 'daily')
Usage Limit の挿入には、次のカラムが必須です:Type、EmailTo、Percentage。
INSERT INTO Alerts (Type, EmailTo, Percentage) VALUES ('usage_limit', '[email protected]', 20)
Id を指定することでEmailTo を更新できます。
UPDATE Alerts SET EmailTo = '[email protected]' WHERE Id = 1310789
Id を指定することでAlerts から削除できます。
DELETE FROM Alerts WHERE Id = 1310789
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The ID of the alert. | |
| CreatedAt | Datetime | True |
Date when the alert was created. | |
| UpdatedAt | Datetime | True |
Date when the alert was updated. | |
| EmailTo | String | False |
The email address that the alert will be sent to. | |
| Percentage | Integer | False |
The email address that the alert will be sent to. | |
| Type | String | False |
The type of alert. Allowed values (usage_limit, stats_notification). | |
| Frequency | String | False |
If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent.(daily, weekly, monthly). |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query, Create, Update and Delete the available ApiKeys in SendGrid.
すべてのApi Keys を取得します
SELECT * FROM ApiKeys
特定のApi Key に関する情報を取得します
SELECT * FROM Apikeys WHERE ApiKeyId = 'Dqdvdvdvdv4yLeuVQqO3rFxN5ktUxA'
挿入には、次のカラムが必須です:Name。
Scopes の値は次のとおりです:
alerts.create, alerts.read, alerts.update, alerts.delete, asm.groups.create, asm.groups.read, asm.groups.update, asm.groups.delete, ips.pools.ips.read, mail.send, mail_settings.bcc.read, mail_settings.bcc.update, mail_settings.address_whitelist.read, mail_settings.address_whitelist.update, mail_settings.footer.read,
mail_settings.footer.update, mail_settings.forward_spam.read, mail_settings.forward_spam.update, mail_settings.plain_content.read, mail_settings.plain_content.update, mail_settings.spam_check.read, mail_settings.spam_check.update, mail_settings.bounce_purge.read, mail_settings.bounce_purge.update, mail_settings.forward_bounce.read,
mail_settings.forward_bounce.update, partner_settings.new_relic.read, partner_settings.new_relic.update, partner_settings.sendwithus.read, partner_settings.sendwithus.update, tracking_settings.click.read, tracking_settings.click.update, tracking_settings.subscription.read, tracking_settings.subscription.update, tracking_settings.open.read,
tracking_settings.open.update, tracking_settings.google_analytics.read, tracking_settings.google_analytics.update, user.webhooks.event.settings.read, user.webhooks.event.settings.update, user.webhooks.event.test.create, user.webhooks.event.test.read, user.webhooks.event.test.update, user.webhooks.parse.settings.create, user.webhooks.parse.settings.read,
user.webhooks.parse.settings.update, user.webhooks.parse.settings.delete, stats.read, stats.global.read, categories.stats.read, categories.stats.sums.read, devices.stats.read, clients.stats.read, clients.phone.stats.read, clients.tablet.stats.read, clients.webmail.stats.read, clients.desktop.stats.read, geo.stats.read, mailbox_providers.stats.read,
browsers.stats.read, user.webhooks.parse.stats.read, templates.create, templates.read, templates.update, templates.delete, templates.versions.create, templates.versions.read, templates.versions.update, templates.versions.delete, templates.versions.activate.create, user.timezone.read, user.timezone.update, user.settings.enforced_tls.read, user.settings.enforced_tls.update,
api_keys.create, api_keys.read, api_keys.update, api_keys.delete, email_activity.read, categories.create, categories.read, categories.update, categories.delete, mail_settings.template.read, mail_settings.template.update, marketing_campaigns.create, marketing_campaigns.read, marketing_campaigns.update, marketing_campaigns.delete, mail.batch.create, mail.batch.read, mail.batch.update,
mail.batch.delete, user.scheduled_sends.create, user.scheduled_sends.read, user.scheduled_sends.update, user.scheduled_sends.delete, access_settings.whitelist.create, access_settings.whitelist.read, access_settings.whitelist.update, access_settings.whitelist.delete, access_settings.activity.read, whitelabel.create, whitelabel.read, whitelabel.update, whitelabel.delete, suppression.create,
suppression.read, suppression.update, suppression.delete, messages.read
INSERT INTO Apikeys (Name) VALUES ('apiname')
INSERT INTO Apikeys (Name, Scopes, Sample) VALUES ('apiname', 'alerts.create,alerts.read', 'test')
ApiKeyid を指定することでApiKeys を更新できます。更新を希望しない場合でも、UPDATE 中に名前とスコープの両方を指定する必要があります。
UPDATE Apikeys SET Name = 'apiname2', Scopes = 'alerts.create,alerts.read' WHERE apikeyid = 'Dqdvdvdvdv4yLeuVQqO3rFxN5kscsctUxA-P_Q'
ApiKeyid を指定してApiKeys を削除することができます。
DELETE FROM ApiKeys WHERE apikeyid = 'CMp4C8klscscscsQ0GxqvxtK2-P_Q'
| Name | Type | ReadOnly | References | Description |
| ApiKeyId [KEY] | String | False |
The ID of your API Key. | |
| Name | String | False |
The name of your API Key. | |
| Scopes | String | False |
The permissions this API Key has access to. This is populated only when Id is specified. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query and Delete the available Blocks in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。指定しない場合は、過去120日間のデフォルト期間が適用されます。CreatedAt カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM Blocks WHERE CreatedAt > '2016-01-01' AND CreatedAt < '2016-01-30'
Email を指定することでBlocks から削除できます。
DELETE FROM Blocks WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| CreatedAt | Datetime | True |
The time the block was created. | |
| Reason | String | False |
The reason for the block. | |
| Email [KEY] | String | False |
The email that blocked. | |
| Status | String | False |
The enhanced SMTP block response. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query and Delete the available Bounces in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。指定しない場合は、過去120日間のデフォルト期間が適用されます。CreatedAt カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM Bounces WHERE CreatedAt > '2016-01-01' AND CreatedAt < '2016-01-30'
Email を指定することでBounces から削除できます。
DELETE FROM Bounces WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| CreatedAt | Datetime | True |
The time the bounce was created. | |
| Reason | String | False |
The reason for the bounce. | |
| Email [KEY] | String | False |
The email that bounced. | |
| Status | String | False |
The enhanced SMTP bounce response. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Update, delete, and query Cancel Scheduled Sends in SendGrid.
このテーブルはBatchId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM CancelScheduledSends SELECT * FROM CancelScheduledSends WHERE BatchId = 148825
BatchId を指定してCancelScheduledSends を更新することができます。
使用できる値はcancel、pause です。
UPDATE CancelScheduledSends SET Status = 'cancel' WHERE BatchId = 1310789
BatchId を指定することでCancelScheduledSends から削除できます。
DELETE FROM CancelScheduledSends WHERE BatchId = 1310789
| Name | Type | ReadOnly | References | Description |
| BatchId [KEY] | String | False |
The Id of the batch. | |
| Status | String | False |
The status of the scheduled send.Allowed Values: cancel, pause |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, delete, and query Custom Fields in SendGrid.
カスタムフィールドは、ユーザーにより指定された受信者を分類するフィルタです。
すべてのCustomFields の取得、またはId でのフィルタが可能です。
SELECT * FROM CustomFields WHERE Id = '1'
タイプに関係なく、Custom Fields をフィルタするには引用符を使用します。
CustomFields に挿入するには、フィールド名とその種類の指定が必要です。タイプは、text、date、およびnumber が使用できます。
INSERT INTO CustomFields (name, type) VALUES ('age', 'number')
このテーブルは、アップデートをサポートしていません。
Id を指定することでCustomFields から削除できます。
DELETE FROM CustomFields WHERE Id = '1'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | False |
The Id of the custom field. | |
| Name | String | False |
The name of the custom field. | |
| Type | String | False |
The type of the custom field. Allowed values are number, text, or date. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query Global Unsubscribes in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。ただし、このフィルタは任意です。CreatedAt カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM GlobalUnsubscribes WHERE CreatedAt > '2016-01-01' AND CreatedAt < '2016-01-30'
このテーブルでInsert 操作を行うには、GlobalUnsubscribes リストに追加されるE メールを指定する必要があります。次に例を示します。
INSERT INTO GlobalUnsubscribes (Email) VALUES ('[email protected]')
このテーブルでDelete 操作を行うには、GlobalUnsubscribes リストから削除されるE メールを指定する必要があります。次に例を示します。
DELETE FROM GlobalUnsubscribes WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| Email [KEY] | String | False |
Email of the unsubscriber. | |
| CreatedAt | Datetime | True |
The time the unsubscriber was created. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query and Delete invalid emails in SendGrid.
このテーブルはEmail によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM InvalidEmails SELECT * FROM InvalidEmails WHERE Email = '[email protected]'
Email を指定することでInvalidEmails から削除できます。
DELETE FROM InvalidEmails WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| Created | Datetime | True |
The time the when the email address was added to the invalid emails list. | |
| Reason | String | False |
A reason explaining why the email address was marked as invalid.. | |
| Email [KEY] | String | False |
The email address that was marked as invalid. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, update, delete, and query the available Lists in SendGrid.
リストテーブルはId によってのみフィルタできます。
SELECT * FROM Lists WHERE Id = '123'
テーブルへの挿入には、リストの名前のみ必要です。
INSERT INTO Lists (Name) VALUES ('TestList')
Id を指定することでLists から更新できます。
UPDATE Lists SET Name = 'New Name' WHERE Id = '123'
Id を指定することでLists から削除できます。
DELETE FROM Lists WHERE Id = '123'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The Id of the list. | |
| Name | String | False |
The name of the list. | |
| RecipientCount | Integer | True |
The recipient count of the list. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, update, delete, and query Marketing Campaigns in SendGrid.
このテーブルはId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM MarketingCampaigns SELECT * FROM MarketingCampaigns WHERE Id = '1'
挿入は、次のカラムが必須です:Title、Subject、SenderId、ListIds、SegmentIds、Categories、SuppressionGroupId、HtmlContent、およびPlainContent。
CustomUnsubscribeUrl はSuppressionGroupId の代わりに使えます。ただし、SendGrid はSuppressionGroupId の使用を強く推奨しています。
以下のチェックポイントを使って、SenderId およびSuppressionGroupId のインプットを見つけてください。
INSERT INTO MarketingCampaigns (Title, Subject, SenderId, ListIds, Categories, SuppressionGroupId, HtmlContent, PlainContent) VALUES ('Test Campaign', 'March Newsletter', '123', '1,2', 'fruits, health', '12', '<b>Eat Healthy</b>', 'Eat healthy')
Id を指定することでMarketingCampaigns を更新できます。
UPDATE MarketingCampaigns SET PlainContent = 'Eat healthier' WHERE Id = '123'
Id を指定することでMarketingCampaigns から削除できます。
DELETE FROM MarketingCampaigns WHERE Id = '123'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the marketing campaign. | |
| Title | String | False |
The title of the marketing campaign. | |
| Subject | String | False |
The subject of the marketing campaign. | |
| SenderId | Integer | False |
The sender Ids of the marketing campaign, separated by a comma. | |
| ListIds | String | False |
The list of list Ids of the marketing campaign, separated by a comma. | |
| SegmentIds | String | False |
The list of segment Ids of the marketing campaign, separated by a comma. | |
| Categories | String | False |
The categories of the marketing campaign. | |
| SuppressionGroupId | Integer | False |
The suppression group Id of the marketing campaign. | |
| CustomUnsubscribeUrl | String | False |
The custom unsubscribe URL of the marketing campaign. | |
| IpPool | String | False |
The IP pool of the marketing campaign. | |
| HtmlContent | String | False |
The HTML content of the marketing campaign. | |
| PlainContent | String | False |
The content of the marketing campaign. | |
| Status | String | True |
The status of the marketing campaign. | |
| Editor | String | False |
The editor used in the UI. 使用できる値は次のとおりです。code, design |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
The SendGrid table Recipients.
SendGrid はユーザーにより定義されたフィルタでRecipients を分類できます。それに応じて、フィルタを使った検索やそれらのフィルタを挿入するためにRecipients テーブルにステートメントを実行します。しかし、これらのフィルタはカスタムフィールドテーブルの属性として記録されます。
以下のクエリはRecipients テーブルのデフォルトフィールドのみ取得します。作成したカスタムフィールドは取得できません。受信者のカスタムフィールドの値を取得するには、カスタムフィールドテーブルをクエリします。
特定のリスト内またはセグメント内のすべてのRecipients を取得することもできますが、両方でのフィルタはできません。代わりに複数のクエリを使用します:
SELECT * FROM Recipients WHERE SegmentId = '1' SELECT * FROM Recipients WHERE ListId = '2'
カスタムフィールドによって抽出条件を作成できます。タイプに関係なく、クエリでは引用符を使います。この種のフィルタリングはクライアント側で行われます。この場合、Age はユーザーによって作成されたカスタムフィールドです。
SELECT * FROM Recipients WHERE Age = '30'
Recipients に挿入するには、Email が必要です。
カスタムフィールドをRecipients テーブルに挿入できます。カスタムフィールドの作成に関する詳しい情報は、CustomFields セクションを参照してください。
INSERT INTO Recipients (Email, FirstName, LastName, Age, Department ... Other Custom Fields as necessary) VALUES ('[email protected]', 'name', 'surname', '30', 'Education' ... Other Custom Field values)
Id を指定することでこのテーブルから更新できます。また、E メールカラムは更新ができません。
UPDATE Recipients SET Age = '12' WHERE Id = '1'
Id を指定することでこのテーブルから削除できます。
DELETE FROM Recipients WHERE Id = '1'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | False |
This column is dynamic and maps to the corresponding field in the API. | |
| SegmentId | Int32 | False |
This column is dynamic and maps to the corresponding field in the API. | |
| ListId | Int32 | False |
This column is dynamic and maps to the corresponding field in the API. | |
| String | False |
This column is dynamic and maps to the corresponding field in the API. | ||
| FirstName | String | False |
This column is dynamic and maps to the corresponding field in the API. | |
| LastName | String | False |
This column is dynamic and maps to the corresponding field in the API. | |
| CreatedAt | Datetime | True |
This column is dynamic and maps to the corresponding field in the API. | |
| LastClicked | Datetime | True |
This column is dynamic and maps to the corresponding field in the API. | |
| LastEmailed | Datetime | False |
This column is dynamic and maps to the corresponding field in the API. | |
| LastOpened | Datetime | True |
This column is dynamic and maps to the corresponding field in the API. | |
| UpdatedAt | Datetime | True |
This column is dynamic and maps to the corresponding field in the API. | |
| Age | String | False |
This column is dynamic and maps to the corresponding field in the API. | |
| Department | String | False |
This column is dynamic and maps to the corresponding field in the API. | |
| University | String | False |
This column is dynamic and maps to the corresponding field in the API. |
Create, update, delete, and query Campaign Schedules in SendGrid.
以下は、Schedules テーブルをクエリする例です。
SELECT * FROM Schedules WHERE MarketingCampaignId = '123'
MarketingCampaignId とSendAt を指定すると、特定の時間にキャンペーンを設定できます。SendAt を指定するだけですぐにキャンペーンを送信できます。SendGrid でキャンペーンを送信するには、HTML とプレーンテキストの両コンテンツに [unsubscribe] タグが必要です。
INSERT INTO Schedules (MarketingCampaignId) VALUES (3091692)
INSERT INTO Schedules (MarketingCampaignId, SendAt) VALUES (1, '11/11/2018')
MarketingCampaignId を指定することでスケジュールを更新できます。
UPDATE Schedules SET SendAt = '01-01-2016' WHERE MarketingCampaignId = '123'
MarketingCampaignId を指定することでスケジュールを削除できます。
DELETE FROM Schedules WHERE MarketingCampaignId = '123'
| Name | Type | ReadOnly | References | Description |
| MarketingCampaignId [KEY] | Integer | False |
Id of the campaign. | |
| Status | String | True |
Status of the campaign. | |
| SendAt | Datetime | False |
Date to start the campaign. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, update, delete, and query Segments in SendGrid.
すべてのセグメントの取得、またはId でのフィルタが可能です。
SELECT * FROM Segments WHERE Id = '1'
特定の抽出条件によってセグメントは受信者を分割できます。抽出条件を指定するには、ConditionsField カラムと抽出条件を適用するリストのId を使います。
ConditionsAndOr カラムは与えられたフィールドと前のフィールドを接続します。
INSERT INTO Segments (Name, ListId, ConditionsField1, ConditionsValue1, ConditionsOperator1, ConditionsAndOr1, ConditionsField2, ConditionsValue2, ConditionsOperator2, ConditionsAndOr2) VALUES ("New Segment", 123, 'age', '20', '>', '', 'age', '30', '<', 'and')
上記のステートメントは20歳~30歳の受信者が含まれているセグメントを作成します。
名前またはコンディションを更新することができます。すべてのセットが上書きされるので、フルセットを指定してください。
UPDATE Segments SET Name = 'Name Updated', ConditionsField1 = 'age', ConditionsOperator1 = '<=', ConditionsAndOr1 = '', ConditionsValue1 = '30' WHERE Id = '123'
Id を指定することでセグメントを削除できます。
DELETE FROM Segments WHERE Id = '123'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The Id of the segment. | |
| Name | String | False |
The name of the segment. | |
| ListId | Integer | False |
The Id of the list associated with the segment. | |
| RecipientCount | Integer | True |
The recipient count of the segment. | |
| ConditionsField1 | String | False |
Field name for the first condition. | |
| ConditionsValue1 | String | False |
Field value for the first condition. | |
| ConditionsOperator1 | String | False |
Condition operator for the first condition. | |
| ConditionsAndOr1 | String | False |
How to connect to the previous condition. Allowed values are AND or OR. | |
| ConditionsField2 | String | False |
Field name for the second condition. | |
| ConditionsValue2 | String | False |
Field value for the second condition. | |
| ConditionsOperator2 | String | False |
Condition operator for the second condition. | |
| ConditionsAndOr2 | String | False |
How to connect to the previous condition. Allowed values are AND or OR. | |
| ConditionsField3 | String | False |
Field name for the third condition. | |
| ConditionsValue3 | String | False |
Field value for the third condition. | |
| ConditionsOperator3 | String | False |
Condition operator for the third condition. | |
| ConditionsAndOr3 | String | False |
How to connect to the previous condition. Allowed values are AND or OR. | |
| ConditionsField4 | String | False |
Field name for the fourth condition. | |
| ConditionsValue4 | String | False |
Field value for the fourth condition. | |
| ConditionsOperator4 | String | False |
Condition operator for the fourth condition. | |
| ConditionsAndOr4 | String | False |
How to connect to the previous condition. Allowed values are AND or OR. | |
| ConditionsField5 | String | False |
Field name for the fifth condition. | |
| ConditionsValue5 | String | False |
Field value for the fifth condition. | |
| ConditionsOperator5 | String | False |
Condition operator for the fifth condition. | |
| ConditionsAndOr5 | String | False |
How to connect to the previous condition. Allowed values are AND or OR. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, update, delete, and query Sender Identities in SendGrid.
このテーブルはId によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM SenderIdentities SELECT * FROM SenderIdentities WHERE Id = '148825'
挿入には、次のカラムが必須です:Nickname、FromEmail、FromName、ReplytoEmail、Address、City、Country。
INSERT INTO SenderIdentities (Nickname, FromEmail, FromName, ReplytoEmail, Address, City, Country) VALUES ('Nickname', 'FromEmail', 'FromName', 'ReplytoEmail', 'Address', 'City', 'Country')
Id を指定してSenderIdentities を更新することができます。
UPDATE SenderIdentities SET Nickname = 'Nickname', FromEmail = 'FromEmail', FromName = 'FromName', ReplytoEmail = 'ReplytoEmail', Address = 'Address', City = 'City', Country = 'Country' WHERE Id = 1310789
Id を指定することでAlerts から削除できます。
DELETE FROM SenderIdentities WHERE Id = 1310789
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | False |
The unique identifier of the sender identity. | |
| Nickname | String | False |
A nickname for the sender identity. Not used for sending.. | |
| FromEmail | String | False |
This is where the email will appear to originate from for your recipient. | |
| FromName | String | False |
This is the name appended to the from email field. IE - Your name or company name. | |
| ReplytoEmail | String | False |
This is the email that your recipient will reply to. | |
| ReplytoName | String | False |
This is the name appended to the reply to email field. IE - Your name or company name. | |
| Address | String | False |
The physical address of the sender identity. | |
| Address2 | String | False |
Additional sender identity address information. | |
| City | String | False |
The city of the sender identity. | |
| State | String | False |
The state of the sender identity. | |
| Zip | String | False |
The zipcode of the sender identity. | |
| Country | String | False |
The country of the sender identity. | |
| CreatedAt | Datetime | True |
The end of the time range when the bounce was created. | |
| UpdatedAt | Datetime | True |
The end of the time range when the bounce was created. | |
| Locked | Boolean | True |
A boolean flag that is true when the Sender is associated with a campaign in Draft, Scheduled, or In Progress status. You cannot update or delete a locked Sender. | |
| VerifiedReason | String | True |
The reason for verifying the sender | |
| VerifiedStatus | Boolean | True |
A boolean flag indicating whether the Sender is verified or not. Only verified Senders can be used to send email. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query and delete Spam reports in SendGrid.
このテーブルはEmail によるフィルタのみをサポートしています。唯一可能なSELECT クエリは次のとおりです。
SELECT * FROM Spam SELECT * FROM Spam WHERE Email = '[email protected]'
Delete from Spam
Email を指定することでSpam から削除できます。
DELETE FROM Spam WHERE Email = '[email protected]'
| Name | Type | ReadOnly | References | Description |
| CreatedAt | Datetime | True |
The time when the spam report was made. | |
| Email [KEY] | String | False |
The email address of the recipient who marked your message as spam. | |
| Ip | String | False |
The IP address that the message was sent on. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query Teammates in SendGrid.
例えば、次のクエリはサーバーサイドで処理されます。
SELECT * FROM Teammates WHERE Username = 'test'
SELECT * FROM Teammates WHERE Username IN ('test', 'test2')
挿入には、次のカラムが必須です:Email およびScopes。Scopes カラムは、値のカンマ区切りのリストを許容します。利用できる値は以下です:user.account.read, user.credits.read, user.email.create, user.email.read, user.email.update, user.email.delete, user.profile.create, user.profile.read, user.profile.update, user.profile.delete
IsAdmin は任意で、デフォルトではAPI からはfalse として受け取られます。
INSERT INTO Teammates (Email, Scopes) VALUES ('[email protected]', 'user.profile.read, user.profile.update')
INSERT INTO Teammates (Email, Scopes, IsAdmin) VALUES ('[email protected]', 'user.profile.read, user.profile.update', 'true')
更新には、次のカラムが必須です:Username およびScopes。Scopes カラムは、値のカンマ区切りのリストを許容します。利用できる値は以下です:user.account.read, user.credits.read, user.email.create, user.email.read, user.email.update, user.email.delete, user.profile.create, user.profile.read, user.profile.update, user.profile.delete
UPDATE Teammates SET Scopes = 'user.profile.read' WHERE Username = 'testuser'
Teammates テーブルからレコードを削除するには、username カラムのみが必要です。次に例を示します。
DELETE FROM Teammates WHERE Username = 'testuser'
| Name | Type | ReadOnly | References | Description |
| Username [KEY] | String | False |
The username of the teammate. | |
| String | False |
Email of the teammate. | ||
| FirstName | String | False |
First name of the teammate. | |
| LastName | String | False |
Last name of the teammate. | |
| UserType | String | False |
User type of the teammate. | |
| IsAdmin | Boolean | False |
Indicator if the teammate is admin. | |
| Phone | String | False |
Phone of the teammate. | |
| Website | String | False |
Website of the teammate. | |
| Company | String | False |
Company of the teammate. | |
| Address | String | False |
Address of the teammate. | |
| Address2 | String | False |
Address 2 of the teammate. | |
| City | String | False |
City of the teammate. | |
| State | String | False |
State of the teammate. | |
| Country | String | False |
Country of the teammate. | |
| Zip | String | False |
Zip of the teammate. | |
| Scopes | String | False |
Scope of the permissions for the new teammate. Multiple values are allowed and should be split by a comma symbol. Possible values are: user.account.read,user.credits.read,user.email.create,user.email.read,user.email.update,user.email.delete,user.profile.create,user.profile.read,user.profile.update,user.profile.delete | |
| IsPartnerSSO | Boolean | False |
Indicator if the teammate partner is SSO. | |
| IsSSO | Boolean | False |
Indicator if the teammate is SSO. | |
| IsUnified | Boolean | False |
Indicator if the teammate is unified. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Create, update, delete, and query Unsubscribe Groups in SendGrid.
UnsubscribeGroups はId によってのみフィルタできます。
SELECT * FROM UnsubscribeGroups WHERE Id = '1'
UnsubscribeGroups に挿入するには、名前と説明を指定します。
INSERT INTO UnsubscribeGroups (Name, Description, IsDefault) VALUES ('Unsubscribe1', 'General Unsubscribe', true)
Id を指定することでUnsubscribeGroups を更新できます。
UPDATE UnsubscribeGroups SET Name = 'New Name', Description = 'New Description' WHERE Id = '1'
Id を指定することでUnsubscribeGroups から削除できます。
DELETE FROM UnsubscribeGroups WHERE Id = '1'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
Id of the unsubscribe group. | |
| Name | String | False |
The name of the unsubscribe group. | |
| Description | String | False |
The description of the unsubscribe group. | |
| LastEmailSentAt | Datetime | True |
The last time an email was sent to the unsubscribe group. | |
| IsDefault | Boolean | False |
If the unsubscribe group is the default group or not. | |
| Unsubscribes | Integer | True |
The number of unsubscribes from this group. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
Query the available Users in SendGrid.
Query this table to retrieve your current profile details.
SELECT * FROM Users
You can update the all the columns marked as readonly false.
UPDATE Users Set Address='Milpitas', Address2='North Carolina' WHERE id='38713966'
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the user. | |
| Address | String | False |
The address of the user. | |
| Address2 | String | False |
The secondary address field for the user. | |
| City | String | False |
The city of the user. | |
| Company | String | False |
The company of the user. | |
| Country | String | False |
The country of the user. | |
| FirstName | String | False |
The first name of the user. | |
| LastName | String | False |
The last name of the user. | |
| Phone | String | False |
The phone number of the user. | |
| State | String | False |
The state the user is located in. | |
| Website | String | False |
The Web site URL of the user. | |
| Zip | String | False |
The ZIP code of the user. | |
| String | True |
The Email Address of the user. | ||
| Type | String | True |
The type of the user. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AccountId | String |
The ID of the account. |
| SubuserUsername | String |
The username of the subuser. |
ビューは、データを示すという点でテーブルに似ていますが、ビューは読み取り専用です。
クエリは、ビューに対して通常のテーブルと同様に実行することができます。
| Name | Description |
| Categories | Query the available Categories in SendGrid. |
| CategoryStats | Query the available Category Stats in SendGrid. |
| DynamicTemplates | Query Teammates in SendGrid. |
| GlobalStats | Query the available Global Stats in SendGrid. |
| GroupSuppressions | Query group suppressions in SendGrid. |
| IPAccessManagement | Query Global Unsubscribes in SendGrid. |
| MailSettings | Query all the mail settings in SendGrid. |
| MessageEvents | List of events related to email message in SendGrid. |
| Messages | Query Email Activities in SendGrid. |
| PartnerSettings | Query all the partner settings in SendGrid. |
| ReservedFields | Query the available Reserved Fields in SendGrid. |
| StatsByBrowser | Query Browser Statistics in SendGrid. |
| StatsByClient | Query Client Statistics in SendGrid. |
| StatsByDevice | Query Device Statistics in SendGrid. |
| StatsByLocation | Query Location Statistics in SendGrid. |
| StatsByMailboxProvider | Query Mailbox Provider Statistics in SendGrid. |
| Subusers | Query all the subusers in sendgrid. |
| SubuserStats | Query Subuser Statistics in SendGrid. |
Query the available Categories in SendGrid.
このテーブルをクエリして、SendGrid で使用可能なカテゴリを取得します。
SELECT * FROM Categories
| Name | Type | References | Description |
| Name | String | The name of the categories. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query the available Category Stats in SendGrid.
以下は、CategoryStats ビューをクエリする例です。
SELECT * FROM CategoryStats WHERE Name = 'news'
日付でフィルタをかけることもできます。指定しない場合は、過去1年間のデフォルト期間が適用されます。このカラムでは=、>=、<=、<、および> 演算子がサポートされています。
SELECT * FROM CategoryStats WHERE Name = 'news' AND Date > '2016-01-01' AND Date < '2016-01-30'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the category. | |
| Date | Date | The time the global statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| Drops | Integer | The number of emails automatically dropped by SendGrid because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails confirmed delivered. | |
| InvalidEmails | Integer | The number of emails with a malformed address or reported as invalid by the receiving server. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid. | |
| Requests | Integer | The number of emails you requested to send via SendGrid. | |
| SpamReportDrops | Integer | The number of emails automatically dropped because the emails were marked as spam by the recipients. | |
| SpamReports | Integer | The number of emails marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. | |
| UnsubscribeDrops | Integer | The number of emails in this category dropped by SendGrid because the recipient unsubscribed from your emails. | |
| Unsubscribes | Integer | The number of recipients who unsubscribed from your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Teammates in SendGrid.
| Name | Type | References | Description |
| Id [KEY] | String | The ID of the template. | |
| Name | String | Name of the template. | |
| Generation | String | Generation of the template. (dynamic) | |
| UpdatedAt | Datetime | The last time the template was updated. |
Query the available Global Stats in SendGrid.
このテーブルからデータを取得する期間を指定する必要があります。指定しない場合は、過去1年間のデフォルト期間が適用されます。Date カラムは、>、<、=、<=、および>= 演算子をサポートします。
SELECT * FROM GlobalStats
SELECT * FROM GlobalStats WHERE Date > '2016-01-01' AND Date < '2016-03-30'
| Name | Type | References | Description |
| Date | Date | The time the global statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| BounceDrops | Integer | The number of emails automatically dropped by SendGrid because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails confirmed delivered. | |
| InvalidEmails | Integer | The number of emails with a malformed address or reported as invalid by the receiving server. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid. | |
| Requests | Integer | The number of emails you requested to send via SendGrid. | |
| SpamReportDrops | Integer | The number of emails automatically dropped because the emails were marked as spam by the recipients. | |
| SpamReports | Integer | The number of emails marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. | |
| UnsubscribeDrops | Integer | The number of emails globally dropped by SendGrid because the recipient unsubscribed from your emails. | |
| Unsubscribes | Integer | The number of recipients who unsubscribed from your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query group suppressions in SendGrid.
以下は、GroupSuppressions テーブルをクエリする例です。
SELECT * FROM GroupSuppressions WHERE GroupId = 391 SELECT * FROM GroupSuppressions WHERE GroupId IN (391, 392, 393)
| Name | Type | References | Description |
| GroupId [KEY] | Integer | Email of the unsubscriber. | |
| Emails | String | The time the unsubscriber was created. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Global Unsubscribes in SendGrid.
次のクエリのみがサーバーサイドで処理されます。
SELECT * FROM IPAccessManagement
| Name | Type | References | Description |
| IP | String | IP Address. | |
| Allowed | Boolean | Indicator if this IP is allowed for access. | |
| AuthMethod | String | Authentication method. | |
| FirstAt | Timestamp | First time when IP has accessed the account. | |
| LastAt | Timestamp | Last time when IP has accessed the account. | |
| Location | String | Location of the IP. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query all the mail settings in SendGrid.
You can retrieve all the mail settings.
SELECT * FROM MailSettings
| Name | Type | References | Description |
| Title | String | The title of the mail setting. | |
| Enabled | String | Indicates if this mail setting is currently enabled. | |
| Name | String | The name of the mail setting. | |
| Description | String | A description of the mail setting. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
List of events related to email message in SendGrid.
NOTE: E メールイベントにアクセスする場合は、SendGrid のEmail Activity History アドインを購入する必要があります。Restricted Access のキーを使用する場合は、messages.read およびemail_activity.read スコープを与える必要があります。
SELECT * FROM MessageEvents WHERE MessageId = '1234'
NOTE: The query below will return message events only for the first 1000 message IDs retrieved from the messages endpoint.
SELECT * FROM MessageEvents;
| Name | Type | References | Description |
| MessageId | String | The Id of the message. | |
| EventName | String | Name of event.
使用できる値は次のとおりです。bounced, opened, clicked, processed, dropped, delivered, deferred, spam_report, unsubscribe, group_unsubscribe, group_resubscribe | |
| Processed | Datetime | The date when the event was processed. | |
| Reason | String | Explanation of what caused the message to be 'bounced', 'deferred', or 'blocked'. | |
| AttemptNum | Integer | Used with 'deferred' events to indicate the attempt number out of 10. | |
| Url | String | Used with 'clicked' event to indicate which url the user clicked. | |
| BounceType | String | Use to distinguish between types of bounces.
使用できる値は次のとおりです。soft, hard | |
| HttpUserAgent | String | Client recipient used to click or open message. | |
| MXServer | String | The MX server that received the email. | |
| ApiKeyId | String | Id of the API Key. | |
| AsmGroupId | String | ASM Group Id. | |
| Categories | String | Categories users associated to the message. | |
| UniqueArgs | String | JSON hash of key-value pairs associated with the message. | |
| 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. |
Query Email Activities in SendGrid.
NOTE: E メールアクティビティにアクセスする場合は、SendGrid のEmail Activity History アドインを購入する必要があります。Restricted Access のキーを使用する場合は、messages.read およびemail_activity.read スコープを与える必要があります。
Note:API は1000 レコードのみを返します。検索を制限するために、利用可能なフィルタから選択してください。
例えば、次のクエリはサーバーサイドで処理されます。
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.
| 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. |
Query all the partner settings in SendGrid.
You can retrieve all the partner settings.
SELECT * FROM PartnerSettings
| Name | Type | References | Description |
| Title | String | The title of the partner. | |
| Enabled | String | Indicates if this partner setting has been enabled. | |
| Name | String | The name of the partner setting. | |
| Description | String | A description of this partner setting. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query the available Reserved Fields in SendGrid.
このテーブルは、フィルタリングをサポートしていません。
SELECT * FROM ReservedFields
| Name | Type | References | Description |
| Name | String | The name of the reserved field. | |
| Type | String | The type of the reserved field. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Browser Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByBrowser WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Browser Statistics by name.
SELECT * FROM StatsByBrowser WHERE Name = 'Firefox'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Client Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByClient WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Client Statistics by name.
SELECT * FROM StatsByClient WHERE Name = 'Other'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Device Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByDevice WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Device Statistics by name.
SELECT * FROM StatsByDevice WHERE Name = 'Phone'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Location Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByLocation WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Location Statistics by name.
SELECT * FROM StatsByLocation WHERE Name = 'US'
To query Location Statistics by type.
SELECT * FROM StatsByLocation WHERE Type = 'country'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query Mailbox Provider Statistics in SendGrid.
You need to specify a time span to select from this table. If you do not specify one, a default span of the past 1 year is used. The Date column supports the >, <, =, <=, and >= operators.
If any date within the specified range has statistical data, the API will include that data in the resultset and return 0 for other dates. If no dates have non-zero stats within the specified date range, the API will return an empty result set.
SELECT * FROM StatsByMailboxProvider
SELECT * FROM StatsByMailboxProvider WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query Mailbox Provider Statistics by name.
SELECT * FROM StatsByMailboxProvider WHERE Name = 'Microsoft Outlook Live'
| Name | Type | References | Description |
| Type | String | The type of the statistic. | |
| Name | String | The name of the statistic. | |
| Date | Date | The time the global statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| Drops | Integer | The number of emails automatically dropped by SendGrid because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links clicked in your emails. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails confirmed delivered. | |
| Opens | Integer | The number of times your emails were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid. | |
| Requests | Integer | The number of emails you requested to send via SendGrid. | |
| SpamReports | Integer | The number of emails marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked links in your emails. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description | |
| AccountId | String | The ID of the account. | |
| SubuserUsername | String | The username of the subuser. |
Query all the subusers in sendgrid.
Query this table to retrieve all subusers.
SELECT * FROM Subusers
You can filter by Username to retrieve a specific subuser.
SELECT * FROM Subusers WHERE Username = 'Example'
| Name | Type | References | Description |
| Id | Integer | The Id of the subuser. | |
| String | The email of the subuser. | ||
| Username | String | The username of the subuser. | |
| Disabled | Boolean | Indicates whether the subuser is enabled or disabled. |
Query Subuser Statistics in SendGrid.
SubuserName でフィルタリングすると、特定のサブユーザーの統計情報を取得できます。
SELECT * FROM SubuserStats WHERE SubuserName = 'Example'
日付でフィルタをかけることもできます。このカラムでは=、>=、<=、<、および> 演算子がサポートされています。指定しない場合は、過去1年間のデフォルト期間が適用されます。
SELECT * FROM SubuserStats WHERE SubuserName = 'News' AND Date > '2016-01-01' AND Date < '2016-01-30'
| Name | Type | References | Description |
| Date | Date | The time the subuser statistic was created. | |
| Blocks | Integer | The number of emails that were not allowed to be delivered by ISPs. | |
| Drops | Integer | The number of emails automatically dropped because they appear on one of the suppression lists. | |
| Bounces | Integer | The number of emails that bounced instead of being delivered. | |
| Clicks | Integer | The number of links that were clicked in the emails from this subuser. | |
| Deferred | Integer | The number of emails temporarily refused by the receiving server. | |
| Delivered | Integer | The number of emails from this subsuer that were confirmed delivered. | |
| InvalidEmails | Integer | The number of emails with a malformed address or reported as invalid by the receiving server. | |
| Opens | Integer | The number of times emails from this subuser were opened by recipients. | |
| Processed | Integer | The number of emails pushed to SendGrid by this subuser. | |
| Requests | Integer | The number of emails that you requested to send via SendGrid from this subuser. | |
| SpamReportDrops | Integer | The number of emails automatically dropped because the emails were marked as spam by the recipients. | |
| SpamReports | Integer | The number of emails from this subuser that were marked as spam by recipients. | |
| UniqueClicks | Integer | The number of unique recipients who clicked on links in your emails from this subuser. | |
| UniqueOpens | Integer | The number of unique recipients who opened your emails from this subuser. | |
| UnsubscribeDrops | Integer | The number of emails from this subuser dropped by SendGrid because the recipients unsubscribed from your emails. | |
| Unsubscribes | Integer | The number of recipients who unsubscribed from your emails from this subuser. | |
| SubuserName | String | The name of the statistic. | |
| Type | String | The type of the statistic. |
ストアドプロシージャはファンクションライクなインターフェースで、SendGrid の単純なSELECT/INSERT/UPDATE/DELETE 処理にとどまらずCloud の機能を拡張します。
ストアドプロシージャは、パラメータのリストを受け取り、目的の機能を実行し、プロシージャが成功したか失敗したかを示すとともにSendGrid から関連するレスポンスデータを返します。
| Name | Description |
| AddRecipientToList | Adds a recipient to a list. |
| GetImportContactsStatus | Gets the Import contacts status |
| GetScopes | Returns a list of all scopes that this user has access to. |
| ImportMarketingContacts | Import contacts to sendgrid account from CSV file. |
| SendMail | Sends a mail. |
| SendMail2 | Sends a mail. This Stored Procedure is used to handle aggregates. |
| SendTestCampaign | Sends a test campaign. |
Adds a recipient to a list.
| Name | Type | Required | Description |
| ListId | String | True | The unique identifier for the list. |
| RecipientId | String | True | The Id of the recipient. |
| AccountId | String | False | The ID of the account. |
| SubuserUsername | String | False | The username of the subuser. |
| Name | Type | Description |
| Success | String | Whether or not the recipient was successfully added to the list. |
Gets the Import contacts status
GetImportContactsStatus ストアドプロシージャはImport Contacts のJobId が必要とし、これはImportMarketingContacts ストアドプロシージャを実行することで取得できます。
例:
EXEC GetImportContactsStatus JobId= '1234'
| Name | Type | Required | Description |
| JobId | String | True | The Id of the Import Contacts Job |
| Name | Type | Description |
| Success | String | The Staus of the corresponding Import Contacts Job. |
| RequestedCount | String | The Number of contacts requested to modify through API. |
| CreatedCount | String | The Number of contacts created. |
| UpdatedCount | String | The Number of Updated contacts. |
| DeletedCount | String | The Number of Deleted contacts. |
Returns a list of all scopes that this user has access to.
| Name | Type | Required | Description |
| AccountId | String | False | The Id of the account on whose behalf the call is made. |
| SubuserUsername | String | False | The username of the Subuser on whose behalf the call is made. |
| Name | Type | Description |
| Scopes | String | List of all scopes. |
Import contacts to sendgrid account from CSV file.
ImportMarketingContacts ストアドプロシージャは、Field Mapping Ids および連絡先データを含むFile のパスが必要です。
Field Mapping にはcustom_field ids またはreserved_field ids が使用できます。これらのId は"Get All Field Definitions" エンドポイントを使用して取得できます。
NOTE:
1. ファイルから連絡先をインポートするには、Email フィールドマッピングが必須です。
2. 現時点では、この操作にはcsv ファイル形式のみがサポートされています。
例:
EXEC ImportMarketingContacts FileType= 'csv' , FieldMappings= '_rf2_T,_rf9_T' , FilePath = 'C:\Dev\Tests\v20\ProviderSendgrid\example.csv'
| Name | Type | Required | Description |
| FileType | String | False | The type of the file
使用できる値は次のとおりです。csv |
| FieldMappings | String | True | Comma separated list of field_definition IDs |
| ListIds | String | False | Comma separated list of List id's |
| FilePath | String | False | The absolute path of the File to import contacts |
| Name | Type | Description |
| JobId | String | The Id of the Import Contacts Job |
Sends a mail.
DynamicTemplateData インプットはテンプレートの動的データに関する情報を必要とします。テンプレートに入れる各種変数の値。
例:{"fullname":"Test","paymenttotal":"Test","description":"Test"}
NOTE:TemplateId カラムは、Dynamics Templates を使用する場合に必須です。
SendMail では、リクエストボディに少なくとも1つのpersonalizations オブジェクトが必要で、集計関数を使用して追加できます。
例:
TEMP テーブルを使用。
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'abc')
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'xyz')
INSERT INTO To#TEMP (ToEmail) VALUES ('[email protected]')
INSERT INTO ToCC#TEMP (ToCCName, ToCCEmail) VALUES ('[email protected]', 'xyz')
INSERT INTO ToBCC#TEMP (ToBCCEmail, ToBCCName) VALUES ('[email protected]', 'abc')
INSERT INTO Content#TEMP (ContentValue, ContentType) VALUES ('[email protected]', 'text/plain')
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2', 'To#TEMP', 'ToCC#TEMP', 'ToBCC#TEMP')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content = 'Content#TEMP'
Aggregate 値を使用。
単一のメールアドレスにメールを送信。
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2',
'[
{
"ToEmail": "[email protected]",
"ToName": "abc"
}
]',
'[
{
"ToCCName": "xyz",
"ToCCEmail": "[email protected]"
}
]',
'[
{
"ToBCCEmail": "[email protected]",
"ToBCCName": "abcd"
}
]')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content =
'{
"ContentValue":"content",
"ContentType":"text/plain"
}'
複数のメールアドレスにメールを送信。
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2',
'[
{
"ToEmail": "[email protected]",
"ToName": "abc"
},
{
"ToEmail": "[email protected]",
"ToName": "xyz"
},
{
"ToEmail": "[email protected]"
}
]',
'[
{
"ToCCName": "sac",
"ToCCEmail": "[email protected]"
}
]',
'[
{
"ToBCCEmail": "xyz",
"ToBCCName": "[email protected]"
}
]')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content =
'{
"ContentValue":"content",
"ContentType":"text/html"
}'
Send Mail using attachment.
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'abc')
INSERT INTO To#TEMP (ToEmail, ToName) VALUES ('[email protected]', 'xyz')
INSERT INTO To#TEMP (ToEmail) VALUES ('[email protected]')
INSERT INTO ToCC#TEMP (ToCCName, ToCCEmail) VALUES ('[email protected]', 'xyz')
INSERT INTO ToBCC#TEMP (ToBCCEmail, ToBCCName) VALUES ('[email protected]', 'abc')
INSERT INTO Content#TEMP (ContentValue, ContentType) VALUES ('[email protected]', 'text/plain')
INSERT INTO Attachments#TEMP (AttachmentContent, AttachmentFilename) VALUES ('abcdefghijklmn', 'Test2.png')
INSERT INTO Personalizations#TEMP (FromEmail, SendAt, FromName, Subject, To, ToCC, ToBCC) VALUES ('[email protected]', '2017-10-30T10:57:00+01:00', 'hi', 'Test Subject2', 'To#TEMP', 'ToCC#TEMP', 'ToBCC#TEMP')
EXEC SendMail Personalizations = 'Personalizations#TEMP', FromEmail = '[email protected]', Subject = 'hello', Content = 'Content#TEMP', Attachments = 'Attachments#TEMP'
| Name | Type | Required | Description |
| Subject | String | True | The subject of the mail to be sent. |
| ContentValue | String | False | The content of the mail to be sent. |
| ContentType | String | False | The type of content to be sent. supported values are text/plain and text/html |
| Content | String | True | The aggregate for Content object |
| SendAt | String | False | The date and time when you want your email to be delivered. Scheduling more than 72 hours in advance is forbidden. |
| FromEmail | String | True | The email address of the sender. |
| FromName | String | False | The name of the sender. |
| ToEmail | String | False | Email address to send the mail to |
| ToName | String | False | Email's respective names to send the mail to. |
| To | String | False | The aggregate for To recipients |
| ToCCEmail | String | False | Email address of the recipients who will receive a copy of your email |
| ToCCName | String | False | Name of the recipients who will receive a copy of your email. |
| ToCC | String | False | The aggregate for ToCC recipients. |
| ToBCCEmail | String | False | Email address of the recipients who will receive a blind carbon copy of your email. |
| ToBCCName | String | False | Name of the recipients who will receive a blind carbon copy of your email. |
| ToBCC | String | False | The aggregate for ToBCC recipients. |
| ReplyToEmail | String | False | The email address of the person to whom you are replying to. |
| ReplyToName | String | False | The name of the person to whom you are replying to. |
| AttachmentPaths | String | False | Path of the file to attach to the mail to be sent |
| TemplateId | String | False | The Id of the template that you may want to send |
| DynamicTemplateData | String | False | The data of the dynamic template. |
| Personalizations | String | True | An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. |
| AttachmentFilename | String | False | The attachment's filename. Specify only when you don't specify the AttachmentPaths. |
| Attachments | String | False | An array of objects where you can specify any attachments you want to include. Specify only when you don't specify the AttachmentPaths. |
| Name | Type | Description |
| Success | String | Whether or not the mail was sent successfully. |
Sends a mail. This Stored Procedure is used to handle aggregates.
SendMail2 Stored Procedure is specifically made for handling the aggregates. User has to provide the whole json structure in order to execute this Stored Procedure.
For Example:
EXECUTE SendMail2 Personalizations = '[{"to": [{"email": "[email protected]", "name": "John Doe"}, {"email": "[email protected]", "name": "Julia Doe"}], "cc": [{"email": "[email protected]", "name": "Jane Doe"}], "bcc": [{"email": "[email protected]", "name": "Jim Doe"}]}, {"from": {"email": "[email protected]", "name": "Example Sales Team"}, "to": [{"email": "[email protected]", "name": "Janice Doe"}], "bcc": [{"email": "[email protected]", "name": "Jordan Doe"}]}]', FromEmail = '[email protected]', FromName = 'Example Order Confirmation', Subject = 'Test Subject', Content = '[{"type": "text/html", "value": "test value"}]', Categories = '["cake", "pie"]'
| Name | Type | Required | Description |
| Personalizations | String | True | An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. |
| FromEmail | String | True | The email address of the sender. |
| FromName | String | True | The name of the sender. |
| ReplyToEmail | String | False | The email address of the person to whom you are replying to. |
| ReplyToName | String | False | The name of the person to whom you are replying to. |
| Subject | String | True | The global or 'message level' subject of your email. |
| Content | String | True | An array where you can specify the content of your email. |
| Attachments | String | False | An array of objects where you can specify any attachments you want to include. |
| Categories | String | False | An array of category names for this message. Each category name may not exceed 255 characters. |
| SendAt | String | False | A unix timestamp allowing you to specify when you want your email to be delivered. |
| BatchId | String | False | An ID representing a batch of emails to be sent at the same time. |
| AsmGroupId | String | False | The unsubscribe group to associate with this email. |
| AsmGroupsToDisplay | String | False | An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page. |
| IpPoolName | String | False | The IP Pool that you would like to send this email from. |
| MailSettingsByPassListManagementEnable | String | False | A collection of different mail settings that you can use to specify how you would like this email to be handled. Indicates if this setting is enabled. |
| MailSettingsFooterEnable | String | False | The default footer that you would like included on every email. Indicates if this setting is enabled. |
| MailSettingsSandboxModeEnable | String | False | Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly. Indicates if this setting is enabled. |
| TrackingSettingsClickTrackingEnable | String | False | Allows you to track if a recipient clicked a link in your email. Indicates if this setting is enabled. |
| TrackingSettingsClickTrackingEnableText | String | False | Allows you to track if a recipient clicked a link in your email. Indicates if this setting should be included in the text/plain portion of your email. |
| TrackingSettingsOpenTrackingEnable | String | False | Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened. Indicates if this setting is enabled. |
| TrackingSettingsOpenTrackingSubstitutionTag | String | False | Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened. Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. |
| TrackingSettingsSubscriptionTrackingEnable | String | False | Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. Indicates if this setting is enabled. |
| TemplateId | String | False | The Id of the template that you may want to send |
| Name | Type | Description |
| Success | String | Whether or not the mail was sent successfully. |
Sends a test campaign.
| Name | Type | Required | Description |
| To | String | True | The email address to send the campaign to. |
| Campaign_ID | String | True | The Id of the campaign to send. |
| AccountId | String | False | The ID of the account. |
| SubuserUsername | String | False | The username of the subuser. |
| Name | Type | Description |
| Success | String | Whether or not the campaign was sent successfully. |
このセクションで説明されているシステムテーブルをクエリして、スキーマ情報、データソース機能に関する情報、およびバッチ操作の統計にアクセスできます。
以下のテーブルは、SendGrid のデータベースメタデータを返します。
以下のテーブルは、データソースへの接続方法およびクエリ方法についての情報を返します。
次のテーブルは、データ変更クエリ(バッチ処理を含む)のクエリ統計を返します。
利用可能なデータベースをリストします。
次のクエリは、接続文字列で決定されるすべてのデータベースを取得します。
SELECT * FROM sys_catalogs
| Name | Type | Description |
| CatalogName | String | データベース名。 |
利用可能なスキーマをリストします。
次のクエリは、すべての利用可能なスキーマを取得します。
SELECT * FROM sys_schemas
| Name | Type | Description |
| CatalogName | String | データベース名。 |
| SchemaName | String | スキーマ名。 |
利用可能なテーブルをリストします。
次のクエリは、利用可能なテーブルおよびビューを取得します。
SELECT * FROM sys_tables
| Name | Type | Description |
| CatalogName | String | テーブルまたはビューを含むデータベース。 |
| SchemaName | String | テーブルまたはビューを含むスキーマ。 |
| TableName | String | テーブル名またはビュー名。 |
| TableType | String | テーブルの種類(テーブルまたはビュー)。 |
| Description | String | テーブルまたはビューの説明。 |
| IsUpdateable | Boolean | テーブルが更新可能かどうか。 |
利用可能なテーブルおよびビューのカラムについて説明します。
次のクエリは、MarketingCampaigns テーブルのカラムとデータ型を返します。
SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='MarketingCampaigns'
| Name | Type | Description |
| CatalogName | String | テーブルまたはビューを含むデータベースの名前。 |
| SchemaName | String | テーブルまたはビューを含むスキーマ。 |
| TableName | String | カラムを含むテーブルまたはビューの名前。 |
| ColumnName | String | カラム名。 |
| DataTypeName | String | データ型の名前。 |
| DataType | Int32 | データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。 |
| Length | Int32 | カラムのストレージサイズ。 |
| DisplaySize | Int32 | 指定されたカラムの通常の最大幅(文字数)。 |
| NumericPrecision | Int32 | 数値データの最大桁数。文字データおよび日時データの場合は、カラムの長さ(文字数)。 |
| NumericScale | Int32 | カラムのスケール(小数点以下の桁数)。 |
| IsNullable | Boolean | カラムがNull を含められるかどうか。 |
| Description | String | カラムの簡単な説明。 |
| Ordinal | Int32 | カラムのシーケンスナンバー。 |
| IsAutoIncrement | String | カラムに固定増分値が割り当てられるかどうか。 |
| IsGeneratedColumn | String | 生成されたカラムであるかどうか。 |
| IsHidden | Boolean | カラムが非表示かどうか。 |
| IsArray | Boolean | カラムが配列かどうか。 |
| IsReadOnly | Boolean | カラムが読み取り専用かどうか。 |
| IsKey | Boolean | sys_tablecolumns から返されたフィールドがテーブルの主キーであるかどうか。 |
| ColumnType | String | スキーマ内のカラムの役割または分類。可能な値は、SYSTEM、LINKEDCOLUMN、NAVIGATIONKEY、REFERENCECOLUMN、およびNAVIGATIONPARENTCOLUMN が含まれます。 |
利用可能なストアドプロシージャをリストします。
次のクエリは、利用可能なストアドプロシージャを取得します。
SELECT * FROM sys_procedures
| Name | Type | Description |
| CatalogName | String | ストアドプロシージャを含むデータベース。 |
| SchemaName | String | ストアドプロシージャを含むスキーマ。 |
| ProcedureName | String | ストアドプロシージャの名前。 |
| Description | String | ストアドプロシージャの説明。 |
| ProcedureType | String | PROCEDURE やFUNCTION などのプロシージャのタイプ。 |
ストアドプロシージャパラメータについて説明します。
次のクエリは、AddRecipientToList ストアドプロシージャのすべての入力パラメータについての情報を返します。
SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'AddRecipientToList' AND Direction = 1 OR Direction = 2
パラメータに加えて結果セットのカラムを含めるには、IncludeResultColumns 擬似カラムをTrue に設定します。
SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'AddRecipientToList' AND IncludeResultColumns='True'
| Name | Type | Description |
| CatalogName | String | ストアドプロシージャを含むデータベースの名前。 |
| SchemaName | String | ストアドプロシージャを含むスキーマの名前。 |
| ProcedureName | String | パラメータを含むストアドプロシージャの名前。 |
| ColumnName | String | ストアドプロシージャパラメータの名前。 |
| Direction | Int32 | パラメータのタイプに対応する整数値:input (1)。input/output (2)、またはoutput(4)。input/output タイプパラメータは、入力パラメータと出力パラメータの両方になれます。 |
| DataType | Int32 | データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。 |
| DataTypeName | String | データ型の名前。 |
| NumericPrecision | Int32 | 数値データの場合は最大精度。文字データおよび日時データの場合は、カラムの長さ(文字数)。 |
| Length | Int32 | 文字データの場合は、許可される文字数。数値データの場合は、許可される桁数。 |
| NumericScale | Int32 | 数値データの小数点以下の桁数。 |
| IsNullable | Boolean | パラメータがNull を含められるかどうか。 |
| IsRequired | Boolean | プロシージャの実行にパラメータが必要かどうか。 |
| IsArray | Boolean | パラメータが配列かどうか。 |
| Description | String | パラメータの説明。 |
| Ordinal | Int32 | パラメータのインデックス。 |
| Values | String | このパラメータで設定できる値は、このカラムに表示されるものに限られます。指定できる値はカンマ区切りです。 |
| SupportsStreams | Boolean | パラメータがファイルを表すかどうか。ファイルは、ファイルパスとして渡すことも、ストリームとして渡すこともできます。 |
| IsPath | Boolean | パラメータがスキーマ作成操作のターゲットパスかどうか。 |
| Default | String | 何も値が指定されていない場合に、このパラメータで使用される値。 |
| SpecificName | String | 複数のストアドプロシージャが同じ名前を持つ場合、それぞれの同名のストアドプロシージャを一意に識別するラベル。特定の名前を持つプロシージャが1つだけの場合は、その名前がここに単純に反映されます。 |
| IsCDataProvided | Boolean | プロシージャがネイティブのSendGrid プロシージャではなく、CData によって追加 / 実装されているかどうか。 |
| Name | Type | Description |
| IncludeResultColumns | Boolean | 出力にパラメータに加えて結果セットのカラムを含めるかどうか。デフォルトはFalse です。 |
主キーおよび外部キーについて説明します。
次のクエリは、MarketingCampaigns テーブルの主キーを取得します。
SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='MarketingCampaigns'
| Name | Type | Description |
| CatalogName | String | キーを含むデータベースの名前。 |
| SchemaName | String | キーを含むスキーマの名前。 |
| TableName | String | キーを含むテーブルの名前。 |
| ColumnName | String | キーカラムの名前 |
| IsKey | Boolean | カラムがTableName フィールドで参照されるテーブル内の主キーかどうか。 |
| IsForeignKey | Boolean | カラムがTableName フィールドで参照される外部キーかどうか。 |
| PrimaryKeyName | String | 主キーの名前。 |
| ForeignKeyName | String | 外部キーの名前。 |
| ReferencedCatalogName | String | 主キーを含むデータベース。 |
| ReferencedSchemaName | String | 主キーを含むスキーマ。 |
| ReferencedTableName | String | 主キーを含むテーブル。 |
| ReferencedColumnName | String | 主キーのカラム名。 |
外部キーについて説明します。
次のクエリは、他のテーブルを参照するすべての外部キーを取得します。
SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
| 名前 | タイプ | 説明 |
| CatalogName | String | キーを含むデータベースの名前。 |
| SchemaName | String | キーを含むスキーマの名前。 |
| TableName | String | キーを含むテーブルの名前。 |
| ColumnName | String | キーカラムの名前 |
| PrimaryKeyName | String | 主キーの名前。 |
| ForeignKeyName | String | 外部キーの名前。 |
| ReferencedCatalogName | String | 主キーを含むデータベース。 |
| ReferencedSchemaName | String | 主キーを含むスキーマ。 |
| ReferencedTableName | String | 主キーを含むテーブル。 |
| ReferencedColumnName | String | 主キーのカラム名。 |
| ForeignKeyType | String | 外部キーがインポート(他のテーブルを指す)キーかエクスポート(他のテーブルから参照される)キーかを指定します。 |
主キーについて説明します。
次のクエリは、すべてのテーブルとビューから主キーを取得します。
SELECT * FROM sys_primarykeys
| Name | Type | Description |
| CatalogName | String | キーを含むデータベースの名前。 |
| SchemaName | String | キーを含むスキーマの名前。 |
| TableName | String | キーを含むテーブルの名前。 |
| ColumnName | String | キーカラムの名前。 |
| KeySeq | String | 主キーのシーケンス番号。 |
| KeyName | String | 主キーの名前。 |
利用可能なインデックスについて説明します。インデックスをフィルタリングすることで、より高速なクエリ応答時間でセレクティブクエリを記述できます。
次のクエリは、主キーでないすべてのインデックスを取得します。
SELECT * FROM sys_indexes WHERE IsPrimary='false'
| Name | Type | Description |
| CatalogName | String | インデックスを含むデータベースの名前。 |
| SchemaName | String | インデックスを含むスキーマの名前。 |
| TableName | String | インデックスを含むテーブルの名前。 |
| IndexName | String | インデックス名。 |
| ColumnName | String | インデックスに関連付けられたカラムの名前。 |
| IsUnique | Boolean | インデックスが固有の場合はTrue。そうでない場合はFalse。 |
| IsPrimary | Boolean | インデックスが主キーの場合はTrue。そうでない場合はFalse。 |
| Type | Int16 | インデックスタイプに対応する整数値:statistic (0)、clustered (1)、hashed (2)、またはother (3)。 |
| SortOrder | String | 並べ替え順序:A が昇順、D が降順。 |
| OrdinalPosition | Int16 | インデックスのカラムのシーケンスナンバー。 |
利用可能な接続プロパティと、接続文字列に設定されている接続プロパティに関する情報を返します。
次のクエリは、接続文字列に設定されている、あるいはデフォルト値で設定されているすべての接続プロパティを取得します。
SELECT * FROM sys_connection_props WHERE Value <> ''
| Name | Type | Description |
| Name | String | 接続プロパティ名。 |
| ShortDescription | String | 簡単な説明。 |
| Type | String | 接続プロパティのデータ型。 |
| Default | String | 明示的に設定されていない場合のデフォルト値。 |
| Values | String | 可能な値のカンマ区切りリスト。別な値が指定されていると、検証エラーがスローされます。 |
| Value | String | 設定した値またはあらかじめ設定されたデフォルト。 |
| Required | Boolean | プロパティが接続に必要かどうか。 |
| Category | String | 接続プロパティのカテゴリ。 |
| IsSessionProperty | String | プロパティが、現在の接続に関する情報を保存するために使用されるセッションプロパティかどうか。 |
| Sensitivity | String | プロパティの機密度。これは、プロパティがロギングおよび認証フォームで難読化されているかどうかを通知します。 |
| PropertyName | String | キャメルケースの短縮形の接続プロパティ名。 |
| Ordinal | Int32 | パラメータのインデックス。 |
| CatOrdinal | Int32 | パラメータカテゴリのインデックス。 |
| Hierarchy | String | このプロパティと一緒に設定する必要がある、関連のある依存プロパティを表示します。 |
| Visible | Boolean | プロパティが接続UI に表示されるかどうかを通知します。 |
| ETC | String | プロパティに関するその他のさまざまな情報。 |
Cloud がデータソースにオフロードできるSELECT クエリ処理について説明します。
SQL 構文の詳細については、SQL 準拠 を参照してください。
以下はSQL 機能のサンプルデータセットです。 SELECT 機能のいくつかの側面がサポートされている場合には、カンマ区切りのリストで返されます。サポートされていない場合、カラムにはNO が入ります。
| 名前 | 説明 | 有効な値 |
| AGGREGATE_FUNCTIONS | サポートされている集計関数。 | AVG, COUNT, MAX, MIN, SUM, DISTINCT |
| COUNT | COUNT 関数がサポートされているかどうか。 | YES, NO |
| IDENTIFIER_QUOTE_OPEN_CHAR | 識別子をエスケープするための開始文字。 | [ |
| IDENTIFIER_QUOTE_CLOSE_CHAR | 識別子をエスケープするための終了文字。 | ] |
| SUPPORTED_OPERATORS | サポートされているSQL 演算子。 | =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR |
| GROUP_BY | GROUP BY がサポートされているかどうか。サポートされている場合、どのレベルでサポートされているか。 | NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE |
| OJ_CAPABILITIES | サポートされている外部結合の種類。 | NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS |
| OUTER_JOINS | 外部結合がサポートされているかどうか。 | YES, NO |
| SUBQUERIES | サブクエリがサポートされているかどうか。サポートされていれば、どのレベルでサポートされているか。 | NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED |
| STRING_FUNCTIONS | サポートされている文字列関数。 | LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE |
| NUMERIC_FUNCTIONS | サポートされている数値関数。 | ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE |
| TIMEDATE_FUNCTIONS | サポートされている日付および時刻関数。 | NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT |
| REPLICATION_SKIP_TABLES | レプリケーション中にスキップされたテーブルを示します。 | |
| REPLICATION_TIMECHECK_COLUMNS | レプリケーション中に更新判断のカラムとして使用するかどうかを、(指定された順に)チェックするカラムのリストを含む文字列の配列。 | |
| IDENTIFIER_PATTERN | 識別子としてどの文字列が有効かを示す文字列値。 | |
| SUPPORT_TRANSACTION | プロバイダーが、コミットやロールバックなどのトランザクションをサポートしているかどうかを示します。 | YES, NO |
| DIALECT | 使用するSQL ダイアレクトを示します。 | |
| KEY_PROPERTIES | Uniform データベースを特定するプロパティを示します。 | |
| SUPPORTS_MULTIPLE_SCHEMAS | プロバイダー用に複数のスキームが存在するかどうかを示します。 | YES, NO |
| SUPPORTS_MULTIPLE_CATALOGS | プロバイダー用に複数のカタログが存在するかどうかを示します。 | YES, NO |
| DATASYNCVERSION | このドライバーにアクセスするために必要な、CData Sync のバージョン。 | Standard, Starter, Professional, Enterprise |
| DATASYNCCATEGORY | このドライバーのCData Sync カテゴリ。 | Source, Destination, Cloud Destination |
| SUPPORTSENHANCEDSQL | API で提供されている以上の、追加SQL 機能がサポートされているかどうか。 | TRUE, FALSE |
| SUPPORTS_BATCH_OPERATIONS | バッチ操作がサポートされているかどうか。 | YES, NO |
| SQL_CAP | このドライバーでサポートされているすべてのSQL 機能。 | SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX |
| PREFERRED_CACHE_OPTIONS | 使用したいcacheOptions を指定する文字列値。 | |
| ENABLE_EF_ADVANCED_QUERY | ドライバーがEntity Framework の高度なクエリをサポートしているかどうかを示します。サポートしていなければ、クエリはクライアントサイドで処理されます。 | YES, NO |
| PSEUDO_COLUMNS | 利用可能な疑似カラムを示す文字列の配列。 | |
| MERGE_ALWAYS | 値がtrue であれば、CData Sync 内でMerge Model が強制的に実行されます。 | TRUE, FALSE |
| REPLICATION_MIN_DATE_QUERY | レプリケート開始日時を返すSELECT クエリ。 | |
| REPLICATION_MIN_FUNCTION | サーバーサイドでmin を実行するために使用する式名を、プロバイダーが指定できるようになります。 | |
| REPLICATION_START_DATE | レプリケート開始日を、プロバイダーが指定できるようになります。 | |
| REPLICATION_MAX_DATE_QUERY | レプリケート終了日時を返すSELECT クエリ。 | |
| REPLICATION_MAX_FUNCTION | サーバーサイドでmax を実行するために使用する式名を、プロバイダーが指定できるようになります。 | |
| IGNORE_INTERVALS_ON_INITIAL_REPLICATE | 初回のレプリケートで、レプリケートをチャンクに分割しないテーブルのリスト。 | |
| CHECKCACHE_USE_PARENTID | CheckCache 構文を親キーカラムに対して実行するかどうかを示します。 | TRUE, FALSE |
| CREATE_SCHEMA_PROCEDURES | スキーマファイルの生成に使用できる、ストアドプロシージャを示します。 |
次のクエリは、WHERE 句で使用できる演算子を取得します。
SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
WHERE 句では、個々のテーブルの制限や要件が異なる場合がありますので注意してください。詳しくは、データモデル セクションを参照してください。
| Name | Type | Description |
| NAME | String | SQL 構文のコンポーネント、またはサーバー上で処理できる機能。 |
| VALUE | String | サポートされるSQL またはSQL 構文の詳細。 |
試行された変更に関する情報を返します。
次のクエリは、バッチ処理で変更された行のId を取得します。
SELECT * FROM sys_identity
| Name | Type | Description |
| Id | String | データ変更処理から返された、データベース生成Id。 |
| Batch | String | バッチの識別子。1 は単一処理。 |
| Operation | String | バッチ内の処理の結果:INSERTED、UPDATED、またはDELETED。 |
| Message | String | SUCCESS、またはバッチ内の更新が失敗した場合のエラーメッセージ。 |
利用可能なシステム情報を説明します。
次のクエリは、すべてのカラムを取得します。
SELECT * FROM sys_information
| Name | Type | Description |
| Product | String | 製品名。 |
| Version | String | 製品のバージョン番号。 |
| Datasource | String | 製品が接続するデータソースの名前。 |
| NodeId | String | 製品がインストールされているマシンの固有識別子。 |
| HelpURL | String | 製品のヘルプドキュメントのURL。 |
| License | String | 製品のライセンス情報。(この情報が利用できない場合、この項目は空白のままか「N/A」と表示されます。) |
| Location | String | 製品のライブラリが格納されているファイルパスの場所。 |
| Environment | String | 製品が現在稼働している環境またはランタイムのバージョン。 |
| DataSyncVersion | String | 本コネクタを使用するために必要なCData Sync のティア。 |
| DataSyncCategory | String | CData Sync 機能のカテゴリ(例:Source、Destination)。 |
| プロパティ | 説明 |
| APIKey | 現在の認証ユーザーのAPI キー。 |
| プロパティ | 説明 |
| SSLServerCert | TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。 |
| プロパティ | 説明 |
| Verbosity | ログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。 |
| プロパティ | 説明 |
| BrowsableSchemas | レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
| Schema | 使用するスキーマの種類。 |
| プロパティ | 説明 |
| IncludeCustomFields | A boolean indicating if you would like to include custom fields in the column listing. |
| MaxRows | 集計やGROUP BY を含まないクエリで返される最大行数を指定します。 |
| PseudoColumns | テーブルカラムとして公開する擬似カラムを、'TableName=ColumnName;TableName=ColumnName' の形式の文字列で指定します。 |
| Timeout | provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。 |
現在の認証ユーザーのAPI キー。
string
""
現在の認証ユーザーのAPI キー。これは、SendGrid Cloud を介して認証するために必須のパラメータです。
このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。
| プロパティ | 説明 |
| SSLServerCert | TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。 |
TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。
string
""
TLS/SSL 接続を使用している場合は、このプロパティを使用して、サーバーが受け入れるTLS/SSL 証明書を指定できます。このプロパティに値を指定すると、マシンによって信頼されていない他の証明書はすべて拒否されます。
このプロパティは、次のフォームを取ります:
| 説明 | 例 |
| フルPEM 証明書(例では省略されています) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
| 証明書を保有するローカルファイルへのパス。 | C:\cert.cer |
| 公開鍵(例では省略されています) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
| MD5 Thumbprint(hex 値はスペースまたはコロン区切り) | ecadbdda5a1529c58a1e9e09828d70e4 |
| SHA1 Thumbprint(hex 値はスペースまたはコロン区切り) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
Note:'*' を使用してすべての証明書を受け入れるように指定することも可能ですが、セキュリティ上の懸念があるため推奨されません。
このセクションでは、本プロバイダーの接続文字列で設定可能なLogging プロパティの全リストを提供します。
| プロパティ | 説明 |
| Verbosity | ログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。 |
ログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。
string
"1"
このプロパティは、Cloud がログファイルに含める詳細レベルを定義します。 Verbosity レベルを高くするとログに記録される情報の詳細が増えますが、ログファイルが大きくなり取り込まれるデータが増えるためパフォーマンスが低下する可能性があります。
デフォルトのVerbosity レベルは1で、通常の運用にはこれが推奨されます。 より高いVerbosity レベルは主にデバッグを目的としています。 各レベルの詳細については、ログ を参照してください。
LogModules プロパティと組み合わせることで、Verbosity は特定の情報カテゴリに対するログの詳細度を調整できます。
このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。
| プロパティ | 説明 |
| BrowsableSchemas | レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
| Schema | 使用するスキーマの種類。 |
レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
string
""
利用可能なデータベーススキーマをすべてリストすると余分な時間がかかり、パフォーマンスが低下します。 接続文字列にスキーマのリストを指定することで、時間を節約しパフォーマンスを向上させることができます。
使用するスキーマの種類。
string
"NMC"
利用可能なスキーマはNMC およびLegacy です。
このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。
| プロパティ | 説明 |
| IncludeCustomFields | A boolean indicating if you would like to include custom fields in the column listing. |
| MaxRows | 集計やGROUP BY を含まないクエリで返される最大行数を指定します。 |
| PseudoColumns | テーブルカラムとして公開する擬似カラムを、'TableName=ColumnName;TableName=ColumnName' の形式の文字列で指定します。 |
| Timeout | provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。 |
A boolean indicating if you would like to include custom fields in the column listing.
bool
true
Setting this to true will cause custom fields to be included in the column listing, but may cause poor performance when listing metadata.
集計やGROUP BY を含まないクエリで返される最大行数を指定します。
int
-1
このプロパティのデフォルト値である-1 は、クエリに明示的にLIMIT 句が含まれていない限り、行の制限が適用されないことを意味します。 (クエリにLIMIT 句が含まれている場合、クエリで指定された値がMaxRows 設定よりも優先されます。)
MaxRows を0より大きい整数に設定することで、クエリがデフォルトで過度に大きな結果セットを返さないようにします。
このプロパティは、非常に大きなデータセットを返す可能性のあるクエリを実行する際に、パフォーマンスを最適化し、過剰なリソース消費を防ぐのに役立ちます。
テーブルカラムとして公開する擬似カラムを、'TableName=ColumnName;TableName=ColumnName' の形式の文字列で指定します。
string
""
このプロパティを使用すると、Cloud がテーブルカラムとして公開する擬似カラムを定義できます。
個々の擬似カラムを指定するには、以下の形式を使用します。
Table1=Column1;Table1=Column2;Table2=Column3
すべてのテーブルのすべての擬似カラムを含めるには、次を使用してください:
*=*
provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。
int
60
タイムアウトは、クエリや操作全体ではなくサーバーとの個々の通信に適用されます。 例えば、各ページング呼び出しがタイムアウト制限内に完了する場合、クエリは60秒を超えて実行を続けることができます。
タイムアウトはデフォルトで60秒に設定されています。タイムアウトを無効にするには、このプロパティを0に設定します。
タイムアウトを無効にすると、操作が成功するか、サーバー側のタイムアウト、ネットワークの中断、またはサーバーのリソース制限などの他の条件で失敗するまで無期限に実行されます。
Note: このプロパティは慎重に使用してください。長時間実行される操作がパフォーマンスを低下させたり、応答しなくなる可能性があるためです。
LZMA from 7Zip LZMA SDK
LZMA SDK is placed in the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original LZMA SDK code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
LZMA2 from XZ SDK
Version 1.9 and older are in the public domain.
Xamarin.Forms
Xamarin SDK
The MIT License (MIT)
Copyright (c) .NET Foundation Contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
NSIS 3.10
Copyright (C) 1999-2025 Contributors THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.