---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# 인스턴스의 테이블 데이터 ServiceNow 와 상호작용

# 인스턴스의 테이블 데이터 ServiceNow 와 상호작용 {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 6분

을 통해 Mobile SDK 인스턴스에 있는 테이블의 데이터와 상호 작용할 수 있습니다 ServiceNow . REST 인터페이스를 직접 호출하는 NowTableService() API를 사용하는 REST 테이블 API 또는 REST GraphQL API에 대해 지정된 GraphQL 쿼리를 실행하는 NowGraphQLService() API를 통해 이 데이터 ServiceNow 와 상호 작용할 수 있습니다.
단일 호출 내에서 여러 테이블에서 데이터를 반환하려면 NowGraphQLService() API를 사용해야 합니다. 테이블 API 이외의 REST API와 ServiceNow 상호작용해야 하는 경우 다음 문서를 참조하십시오[인스턴스에서 공용 REST API ServiceNow 와 상호작용](https://servicenow-prod.fluidtopics.net/Zl6cVaEEpqAg_UmPs13dmA "애플리케이션이 Mobile SDK 인스턴스에서 ServiceNow 공용 REST API를 호출할 수 있는 Android 기능을 제공합니다.").

## NowGraphQLService를 사용하여 테이블과 ServiceNow 상호작용 {#mobsdk-and-interact_data_instance__section_kxm_wdf_hqb}

[NowGraphQLService](https://servicenow-prod.fluidtopics.net/0X7q_N~qA74mLn~nOkTJyg#NowGQLServiceAndroidInterface "NowGraphQLService 인터페이스는 GraphQL API를 통해 GraphQL 요청을 ServiceNow 할 수 있는 함수를 제공합니다.") 클래스는 로그인한 사용자에게 적절한 권한이 있는 경우 인스턴스 내 ServiceNow 의 지정된 테이블에서 GraphQL 쿼리를 구성하고 실행할 수 있는 메서드를 제공합니다. GraphQL 쿼리 내에서 모든 CRUD 작업을 정의할 수 있습니다.  
다음 예제에서는 NowData 프레임워크를 임포트한 다음 인스턴스의 테이블 ServiceNow 과 상호 작용하는 데 사용할 수 있는 NowGraphQLService 객체를 초기화하는 방법을 보여줍니다.

    /**
     * Helper class used to handle different Now service instances.
     */
    @Singleton
    class SdkManager @Inject constructor() {

        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 }
        }
    }

이 예시에서는 GraphQL 쿼리를 사용하여 게시된 KB 문서를 가져오는 방법을 보여줍니다.

    suspend fun loadList() = withContext(Dispatchers.IO) {
        val kbArticlesQuery = """
        { 
            GlideRecord_Query {
                kb_knowledge(queryConditions: "active=true^ORDERBYpublishedDESC"
                pagination:{ limit: 10, offset: 0 }) {
                    _results {
                        sys_id { value },
                        number { displayValue },
                        short_description { displayValue },
                        author { displayValue }
                        published { displayValue }
                    }
                }
            }
         }
     """
        val graphQLService = sdkManager.getNowGraphQLService()

        //graphQLService?.graphQLRequest(kbArticlesQuery)?.execute() can also be used
        graphQLService?.graphQLRequest(kbArticlesQuery)?.enqueue(
            { response ->
                response.body?.let {
                    val resultString = String(it)
                }

            }, { nowDataError ->
                //handle error
            })
    }

## NowTableService를 사용하여 테이블과 상 ServiceNow 호작용 {#mobsdk-and-interact_data_instance__section_fgn_gy2_hqb}

[NowTableService](https://servicenow-prod.fluidtopics.net/eSfJbLajxYgYrfa9qkazkA#NowTableServiceAndroidInterface "NowTableService 인터페이스는 인스턴스의 ServiceNow 테이블 내에서 기록을 생성, 읽기, 삭제 및 업데이트할 수 있는 기능을 제공합니다.") 클래스는 인스턴스에 있는 테이블의 레코드에 대해 CRUD 작업을 수행하는 메서드를 ServiceNow 제공합니다. 이 인터페이스를 통해 로그인한 사용자에게 권한이 있는 테이블 내 ServiceNow 의 모든 기록에 직접 액세스할 수 있습니다. NowTableService 는 참조 필드에 대한 닷워킹을 지원합니다. 예를 들어 테이블에 사용자 테이블에 대한 참조가 포함되어 있는 경우 닷워킹 값은 사용자 이름을 반환 `user.name` .

요청된 데이터를 반환할 때 적용 가능한 모든 ACL(접근 제어 목록)이 데이터에 적용되며, 이로 인해 예상보다 적은 결과가 발생할 수 있으며, 인증된 사용자에게 지정된 테이블에 대한 액세스 권한이 없는 경우 인증 오류가 발생할 수 있습니다.  
다음 예제에서는 NowData 프레임워크를 임포트한 다음 인스턴스 테이블과 ServiceNow 상호 작용하는 데 사용할 수 있는 NowTableServce 객체를 초기화하는 방법을 보여줍니다.

    /**
     * Helper class used to handle different Now service instances. It has an application scope or is Singleton
     */
    @Singleton
    class SdkManager @Inject constructor() {

        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 }
        }
     }    


    suspend fun loadCases() = withContext(Dispatchers.IO) {
        val tableService = sdkManager.getNowTableService()

        //configure what data to pass back
        val fetchConfiguration =  FetchConfiguration(Filter("active=true"), 10)

        val response = runCatching {
            tableService?.records(
                "sn_customerservice_case",
                fetchConfiguration
            )?.execute()
        }

        if (response.isSuccess) {
            val resultString = response.getOrNull()?.body?.let { String(it) }
        } else {
            //handle unsuccessful result
        }
    }

사용 가능한 NowTableService 메서드를 사용하는 추가 코드 예제는 [NowTableService](https://servicenow-prod.fluidtopics.net/eSfJbLajxYgYrfa9qkazkA#NowTableServiceAndroidInterface "NowTableService 인터페이스는 인스턴스의 ServiceNow 테이블 내에서 기록을 생성, 읽기, 삭제 및 업데이트할 수 있는 기능을 제공합니다.") API 설명서를 참조하세요.

