Office.MailboxEnums.RestVersion enum

REST 形式のアイテム ID に対応する REST API のバージョンを指定します。

注釈

API セット: メールボックス 1.3

適用可能な Outlook モード: Composeまたは読み取り

重要: Outlook REST v2.0 およびベータ エンドポイントは非推奨になりました。 ただし、プライベート リリースおよび AppSource でホストされているアドインは、Outlook 2019 の延長サポートが 2025 年 10 月 14 日に終了するまで、REST サービスを使用できます。 これらのアドインからのトラフィックは、自動的に除外対象として識別されます。 この例外は、2024 年 3 月 31 日以降に開発された新しいアドインにも適用されます。 アドインは 2025 年まで REST サービスを使用できますが、 Microsoft Graph を使用するようにアドインを移行することを強くお勧めします。 ガイダンスについては、「 Microsoft Graph と Outlook REST API エンドポイントの比較」を参照してください。

使用元

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-for-exchange-on-premises/ids-and-urls.yaml

// Get the EWS URL and EWS item ID.
console.log("EWS URL: " + Office.context.mailbox.ewsUrl);
const ewsId = Office.context.mailbox.item.itemId;
console.log("EWS item ID: " + Office.context.mailbox.item.itemId);

// Convert the EWS item ID to a REST-formatted ID.
const restId = Office.context.mailbox.convertToRestId(ewsId, Office.MailboxEnums.RestVersion.v2_0);
console.log("REST item ID: " + restId);

// Convert the REST-formatted ID back to an EWS-formatted ID.
const ewsId2 = Office.context.mailbox.convertToEwsId(restId, Office.MailboxEnums.RestVersion.v2_0);
console.log("EWS ID (from REST ID): " + ewsId2);

フィールド

v1_0 = "v1.0"

バージョン 1.0。

v2_0 = "v2.0"

バージョン 2.0。

Beta = "beta"

ベータ版。