---
sourceDocument: オーストラリア API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/api-reference

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリア API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NowDataSDK クラス : Android

# NowDataSDK クラス : Android {#ariaid-title1}

* リリースバージョン: Australia
* 
* 更新日 2026年03月12日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：7分

NowDataSDK クラスは、NowGraphQLService、NowAttachmentService、NowTableService、NowAPIService などのさまざまな機能サービスの作成と初期化を可能にする関数を提供します。

## NowDataSDK:makeGraphQLService(instanceURL: URL) {#ariaid-title2}

NowGraphQLService 機能のインスタンスを作成して初期化します。このサービスにより、ServiceNow インスタンスで GraphQL API にアクセスできるようになります。
ServiceNow GraphQL API の詳細については、「[GraphQL API フレームワークを使用したレコードデータのクエリ](https://servicenow-prod.fluidtopics.net/pvMJxlDC7aInS0uXKgmGXg "コンポーネントまたはサードパーティシステムからレコードデータをクエリするためのカスタム GraphQL API を作成します。")」を参照してください。
{#NDataSDK-makeGraphQLService_S_O_O__table_nvx_zbt_4pb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| instanceurl | [URL](https://developer.android.com/reference/kotlin/java/net/URL.html) | アクセスする ServiceNow インスタンスの URL。例 `:「https://instance.servicenow.com」` |
[表 : 1. パラメーター]

{#NDataSDK-makeGraphQLService_S_O_O__table_nvx_zbt_4pb} {#NDataSDK-makeGraphQLService_S_O_O__table_ovx_zbt_4pb__entry__2}

| タイプ | 説明 |
|-|-|
| 結果\<NowGraphQLService\> | NowGraphQLService オブジェクトが [Kotlin Result オブジェクト](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/)にラップされています。 |
[表 : 2. 返される内容]

{#NDataSDK-makeGraphQLService_S_O_O__table_ovx_zbt_4pb}  
次のコード例は、この関数を呼び出す方法を示しています。

    private var nowGraphQLService: NowGraphQLService? = null

    /**
      * Create the NowGraphQLService once in the lifetime of the application, inside the Application class
      * or another manager class that will be injected into other classes via dagger/hilt.
      * NowGraphQLService should be created after initializing the NowSDK.
      */
    suspend fun getNowGraphQLService(): NowGraphQLService? {
      if (nowGraphQLService != null) return nowGraphQLService

      return NowDataSDK.makeGraphQLService(URL("https://instance-name.service-now.com")).getOrThrow()
        .also { this.nowGraphQLService = it }
    }

## NowDataSDK:makeNowAPIService(instanceURL: URL) {#ariaid-title3}

NowAPIService サービスのインスタンスを作成して初期化します。このサービスを使用すると、 ServiceNow インスタンスによって公開されているパブリック REST API にアクセスできます。
さらに、ServiceNow インスタンス内でカスタムスクリプト REST API を開発し、[NowAPIService](https://servicenow-prod.fluidtopics.net/Ji0OkzojFrD4aUiGF3aWjQ#NowAPIServiceAndroidInterface "NowAPIService インターフェイスは、指定された ServiceNow REST API で要求を実行する機能を提供します。") API を使用して Android アプリケーション内でアクセスできます。ServiceNow REST API の詳細については、「[スクリプト化 REST API](https://servicenow-prod.fluidtopics.net/I8AGM_146DeZDBTS~H_J8g "スクリプト化された REST API 機能を使用すると、アプリケーション開発者はカスタム Web サービス API をビルドできます。")」を参照してください。
{#NDataSDK-makeNowAPIService_S_O_O__table_rjf_lft_4pb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| instanceurl | [URL](https://developer.android.com/reference/kotlin/java/net/URL.html) | アクセスする ServiceNow インスタンスの URL。例 `:「https://instance.servicenow.com」` |
[表 : 3. パラメーター]

{#NDataSDK-makeNowAPIService_S_O_O__table_rjf_lft_4pb} {#NDataSDK-makeNowAPIService_S_O_O__table_sjf_lft_4pb__entry__2}

| タイプ | 説明 |
|-|-|
| 結果\<NowAPIService\> | [Kotlin Result オブジェクト](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/)にラップされた NowAPIService。 |
[表 : 4. 返される内容]

{#NDataSDK-makeNowAPIService_S_O_O__table_sjf_lft_4pb}  
次のコード例は、この関数を呼び出す方法を示しています。

    private var nowApiService: NowAPIService? = null

    /**
      * Create the NowAPIService once in the lifetime of the application inside the Application class
      * or another manager class that will be injected into other classes via dagger/hilt.
      * NowAPIService should be created after initializing the NowSDK
      */
    suspend fun getNowApiService(): NowAPIService? {
      if (nowApiService != null) return nowApiService

      return NowDataSDK.makeAPIService(URL("https://instance-name.service-now.com")).getOrThrow()
        .also { this.nowApiService = it }
    }

## NowDataSDK:makeNowAttachmentService(instanceURL: URL) {#ariaid-title4}

NowAttachmentService 機能のインスタンスを作成して初期化します。
このサービスを使用すると、 ServiceNow インスタンスから添付ファイルをアップロード、ダウンロード、および削除できます。添付ファイルをインスタンスにアップロードすると、添付ファイルのメタデータが生成され、それを Android アプリケーションにダウンロードできます。

ServiceNow添付ファイルの詳細については、「[添付ファイル API](https://servicenow-prod.fluidtopics.net/1H5ZQbcRxmGejfjCqt80xA#c_AttachmentAPI "添付ファイル API は、添付ファイルをアップロードしてクエリできるようにするエンドポイントを提供します。")」を参照してください。
{#NDataSDK-makeNowAttachService_S_O_O__table_bnd_qgt_4pb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| instanceurl | [URL](https://developer.android.com/reference/kotlin/java/net/URL.html) | アクセスする ServiceNow インスタンスの URL。例 `:「https://instance.servicenow.com」` |
[表 : 5. パラメーター]

{#NDataSDK-makeNowAttachService_S_O_O__table_bnd_qgt_4pb} {#NDataSDK-makeNowAttachService_S_O_O__table_cnd_qgt_4pb__entry__2}

| タイプ | 説明 |
|-|-|
| 結果\<NowAttachmentService\> | [Kotlin Result オブジェクト](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/)にラップされた NowAttachmentService オブジェクト。 |
[表 : 6. 返される内容]

{#NDataSDK-makeNowAttachService_S_O_O__table_cnd_qgt_4pb}  
次のコード例は、このメソッドを呼び出す方法を示しています。

    private var nowAttachmentService: NowAttachmentService? = null

    /**
      * Create the NowAttachmentService once in the lifetime of the application inside the Application
      * class or another manager class that will be injected into other classes via dagger/hilt.
      * NowAttachmentService should be created after initializing the NowSDK.
      */
    suspend fun getNowAttachmentService(): NowAttachmentService? {
      if (nowAttachmentService != null) return nowAttachmentService

      return NowDataSDK.makeAttachmentService(URL("https://instance-name.service-now.com"))
        .getOrThrow()
        .also { this.nowAttachmentService = it }
    }

## NowDataSDK:makeTableService(instanceURL: URL) {#ariaid-title5}

NowTableService 機能のインスタンスを作成して初期化します。
このサービスを使用すると、ServiceNow インスタンスの REST テーブル API にアクセスできるようになります。REST テーブル API の詳細については、「 [テーブル API](https://servicenow-prod.fluidtopics.net/PGmiQS3PYaFpQEwlEzsYfg#c_TableAPI "テーブル API には、既存のテーブルで作成、読み取り、更新、および削除 (CRUD) 操作を実行できるエンドポイントが用意されています。")」を参照してください。
{#NDataSDK-makeTableService_S_O_O__table_jxh_vht_4pb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| instanceurl | [URL](https://developer.android.com/reference/kotlin/java/net/URL.html) | アクセスする ServiceNow インスタンスの URL。例 `:「https://instance.servicenow.com」` |
[表 : 7. パラメーター]

{#NDataSDK-makeTableService_S_O_O__table_jxh_vht_4pb} {#NDataSDK-makeTableService_S_O_O__table_kxh_vht_4pb__entry__2}

| タイプ | 説明 |
|-|-|
| 結果\<NowTableService\> | [Kotlin Result オブジェクト](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/)にラップされた NowTableService オブジェクト。 |
[表 : 8. 返される内容]

{#NDataSDK-makeTableService_S_O_O__table_kxh_vht_4pb}  
次のコード例は、この関数を呼び出す方法を示しています。

    private var nowTableService: NowTableService? = null

    /**
      * Create the NowTableService once in the lifetime of the application inside the Application
      * class or another manager class that will be injected into other classes via dagger/hilt.
      * NowTableService should be created after initializing the NowSDK.
      */
    suspend fun getNowTableService(): NowTableService? {
      if (nowTableService != null) return nowTableService

      return NowDataSDK.makeTableService(URL("https://instance-name.service-now.com")).getOrThrow()
        .also { this.nowTableService = it }
    }


