ServiceNow® API を使用すると、カスタムアプリケーションとエクスペリエンスをビルドできます。Xanadu リリースでは API の拡張と更新が行われています。
Xanadu リリースでの API の特長
- スクリプトでサーバー側の JavaScript API を使用して、アプリケーションの機能を変更します。
- フォームのロード時、フォームの送信時、フィールド値の変更時など、クライアントベースのイベントが発生するたびにクライアント API を実行します。
- インバウンド REST API を使用して、アプリケーション内のさまざまな ServiceNow 機能とやり取りします。
詳細については、「API implementation and reference」を参照してください。
Xanadu リリースの新機能
表 : 4. Xanadu の新しい REST API
| クラス |
メソッド |
| Cloud Services Catalog API |
- GET /now/cmp_catalog_api/itemsbyciclass
- GET /now/cmp_catalog_api/itemsbyrb
- GET /now/cmp_catalog_api/services
- GET /now/cmp_catalog_api/stacks
- GET /now/cmp_catalog_api/status
- POST /now/cmp_catalog_api/submitoprequest
- POST /now/cmp_catalog_api/submitrequest
|
| Proactive Engagement API |
CREATE /api/sn_pren/self_remediation/experience_issue/create |
表 : 5. ServiceNow ストアでの新しいクライアントクラスと、 既存のクライアントクラスへの追加メソッド
| クラス |
メソッド |
| openFrameAPI - Client |
getAWAAgentPresence() |
表 : 6. ServiceNow ストアでの新しいスコープ対象クラスと既存のスコープ対象クラスへの追加メソッド
| クラス |
メソッド |
| sb - Scoped, Global |
- archive()
- checkout()
- publish()
- retire()
|
表 : 7. ServiceNow ストアでの新しいグローバルクラスと既存のグローバルクラスへの追加メソッド
| クラス |
メソッド |
| sb - Scoped, Global |
- archive()
- checkout()
- publish()
- retire()
|
表 : 8. ServiceNow ストアの新しい REST API
| クラス |
メソッド |
| Proactive Engagement API |
CREATE /sn_pren/self_remediation/experience_issue/create |
| Product Catalog Open API |
- DELETE /sn_tmf_api/catalogmanagement/productOffering/{id}
- DELETE /sn_tmf_api/catalogmanagement/productSpecification/{id}
- PATCH /sn_tmf_api/catalogmanagement/productOffering/{id}
- PATCH /sn_tmf_api/catalogmanagement/productSpecification/{id}
|
| Resource Inventory Open API |
ケーブル、ストランド、トポロジの各テーブルのサポートが追加されました。この変更は、@type、id、および resourceRelationship.resource プロパティの説明に反映されます。
- DELETE /sn_ni_core/resource/{id}
- GET /sn_ni_core/resource
- GET /sn_ni_core/resource/{id}
- PATCH /sn_ni_core/resource/{id}
- POST /sn_ni_core/resource
- POST /sn_ni_core/resourceinventoryviatemplate
|
| Service Test Management Open API |
- GET /sn_sprb_mgmt/servicetestmanagement/serviceTest
- GET /sn_sprb_mgmt/servicetestmanagement/serviceTest/{id}
- GET /sn_sprb_mgmt/servicetestmanagement/serviceTestSpecification
- GET /sn_sprb_mgmt/servicetestmanagement/serviceTestSpecification/{id}
- PATCH /sn_sprb_mgmt/servicetestmanagement/serviceTest/{id}
- PATCH /sn_sprb_mgmt/servicetestmanagement/serviceTestSpecification/{id}
- POST /sn_sprb_mgmt/servicetestmanagement/serviceTest
- POST /sn_sprb_mgmt/servicetestmanagement/serviceTestSpecification
|
| TISC API |
POST /sn_sec_tisc/threat_intel_data/add_observables |
このリリースでの変更
表 : 10. Xanadu で変更されたグローバルクラス
| クラス |
メソッド |
| GlideAggregate - Global |
動的スキーマのサポートが追加されました。
- addAggregate()
- addHaving()
- getValue()
- groupBy()
- orderBy()
- orderByAggregate()
|
| GlideRecord - Global |
動的スキーマのサポートが追加されました。
- addQuery()
- getDisplayValue()
- getValue()
- orderBy()
- orderByDesc()
- setDisplayValue()
- setValue()
|
| HistoryWalker - Scoped, Global |
使用する History Walker 実装のタイプを指定するためのパラメーターが追加されました。 HistoryWalker() |
表 : 12. ServiceNow ストアの変更されたスコープ対象クラス
| クラス |
メソッド |
| LeadtoCashCore - Scoped |
LeadtoCashCore スクリプトインクルードは、再構成のユースケースをサポートするように拡張されています。
- createInstance() - エンティティレコードがアクティブか非アクティブかを識別する _state を返します。
- delta() - additionalParams では、ソースと dirtyJSON で比較する属性を無視する機能がサポートされるようになりました。
- effect() - additionalParams では、辞書フィールド名の代わりにコンテキスト変数キーを提供する機能がサポートされるようになりました。さらに、effect() は、エンティティレコードがアクティブまたは非アクティブな状態のどちらであるかを識別する _state パラメーターを返します。
|
表 : 13. ServiceNow ストアの変更されたクライアント API
| クラス |
メソッド |
| openFrameAPI - Client |
workitem_rejected および workitem_accepted 応答ペイロードが追加されました。 subscribe() |
表 : 14. ServiceNow ストアの変更された REST API
| クラス |
メソッド |
| Service Order Open API |
- すべてのエンドポイントで、名前空間とエンドポイントのパスが sn_ind_tmt_ord から sn_tmf_api に変更されました。
- 次のメソッドは、href と orderDate の 2 つの新しいパラメーターを返します。
- GET /sn_tmf_api/order/serviceOrder
- POST /sn_tmf_api/order/serviceOrder/cancelserviceorder
- サービスオーダーオープン API – POST /sn_tmf_api/order/serviceOrder
- POST /sn_tmf_api/order/serviceOrder/outboundresponse
|
| Product Catalog Open API |
- すべてのエンドポイントで、名前空間とエンドポイントのパスが sn_ind_tmt_ord から sn_tmf_api に変更されました。
- productOffering メソッドは、2 つの新しいオプションパラメーター href と lifecycleStatus を返します。
- GET /sn_tmf_api/catalogmanagement/productOffering
- GET /sn_tmf_api/catalogmanagement/productOffering/{id}
- PATCH /sn_tmf_api/catalogmanagement/productOffering/{id}
- POST /sn_tmf_api/catalogmanagement/productOffering
- productSpecification メソッドは、3 つの新しいオプションパラメーター、isBundle、 href、 lifecycleStatus を返します。
- GET /sn_tmf_api/catalogmanagement/productSpecification
- GET /sn_tmf_api/catalogmanagement/productSpecification/{id}
- PATCH /sn_tmf_api/catalogmanagement/productSpecification/{id}
- POST /sn_tmf_api/catalogmanagement/productSpecification
|
| WSD Extra Service Request API |
新しい要求本文パラメーター reservationDateTimeChanged が追加されました。 GET /sn_wsd_rsv/reservable/list_reservables/{sys_ids} |
| WSD Reservable API |
新しいクエリパラメーター reservation_start_time が追加されました。 GET /sn_wsd_rsv/reservable/list_reservables/{sys_ids} |
| WSD Reservable V2 API |
新しいクエリパラメーター reservation_start_time が追加されました。 POST /sn_wsd_rsv/v2/reservable/list_reservables |
アクティベーション情報
デフォルトでは、次の API が利用可能です。
- クラウドサービスカタログ API
- DynamicSchemaAPI
- GlideAggregate
- GlideDate
- GlideDynamicAttributeStore
- GlideElementAttributeStore
- GlideRecord
- HistoryWalker
- NumberFormatter
- openFrameAPI
- PDAutomationProvider
- PDFGenerationAPI
- PlaybookExperience
- 製品カタログオープン API
- サービス注文オープン API
次の API はプラグインのアクティブ化が必要です。
- AWA Manual Assignment API を使用するには、高度な作業アサイン (com.glide.awa) プラグインをアクティブ化する必要があります。
- PersonalAuthAPI を使用するには、個人認証 (com.snc.sn_ihub_personal_auth) プラグインをアクティブ化する必要があります。
- プロアクティブエンゲージメント API を使用するには、プロアクティブエンゲージメント (proactive-engagement) プラグインをアクティブ化する必要があります。
- PSBPublicAPIUtil を使用するには、サービスブリッジ for Providers アプリケーション (sn_sb_pro) と サービスブリッジ Base (sn_sb) プラグインをアクティブ化する必要があります。
- Resource Inventory Open API を使用するには、Customer Network Inventory Core アプリケーション (com.app-ni-core) プラグインをアクティブ化する必要があります。
- Service Test Management Open API を使用するには、Customer Service Problem Management (com.sn_sprb_mgmt) プラグインをアクティブ化する必要があります。
- WSD Extra Service Request API を使用するには、ワークプレイス予約管理 (com.sn_wsd_rsv) プラグインをアクティブ化する必要があります。
- WSD 予約可能 API を使用するには、ワークプレイス予約管理 (com.sn_wsd_rsv) プラグインをアクティブ化する必要があります。
- WSD 予約可能 V2 API を使用するには、ワークプレイス予約管理 (com.sn_wsd_rsv) プラグインをアクティブ化する必要があります。