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


---

# DocumentReferenceService - 범위 지정됨, 전역

# DocumentReferenceService - 범위 지정됨, 전역 {#ariaid-title1}

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

DocumentReferenceService API는 인시던트 \[incident\] 또는 Knowledge \[kb_knowledge\] 테이블과 같은 대상 테이블 내에서 문서 참조를 관리하기 위한 메서드를 제공합니다. 문서 참조를 사용하여 정보를 기록과 연결할 수 있습니다.

이 API에는 플러그인(com.snc.platform_document_management)이 문서 관리 필요하며 `sn_doc_services` 네임스페이스 내에서 제공됩니다. 자세한 내용은 [문서 서비스를](https://www.servicenow.com/docs/access?context=document-services-landing-page&version=australia&pubname=australia-servicenow-platform&ft:locale=en-US) 참조하세요.  
다음 API를 사용하여 문서를 정의하고 관리할 수 있습니다.

* [SystemDocument](https://servicenow-prod.fluidtopics.net/reZNZT8Ui7E5wcvlJaQn1g#SystemDocumentBothAPI "SystemDocument API는 문서 [ds_document] 테이블에서 기록의 필드를 설정하는 메서드를 제공합니다.") -- 문서 객체를 정의합니다.
* [DocumentService](https://servicenow-prod.fluidtopics.net/1MgobtqeeRleFdkS5DkxGQ#DocumentServiceBothAPI "DocumentService API는 문서를 만들고, 삭제하고, 업데이트하는 메서드를 제공합니다.") -- 문서를 추가, 업데이트 또는 삭제합니다.
{#DocumentReferenceServiceBothAPI__ul_krc_vmf_vpb}

## DocumentReferenceService - DocumentReferenceService() {#ariaid-title2}

DocumentReferenceService 개체를 인스턴스화합니다.
{#DRS-DocumentReferenceService__table_zw5_mcg_tpb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 없음 |   |   |
[표 1. 매개변수]

{#DRS-DocumentReferenceService__table_zw5_mcg_tpb}  
다음 예제에서는 DocumentReferenceService 개체를 인스턴스화하는 방법을 보여 줍니다.

    var result = new sn_doc_services.DocumentReferenceService();

## DocumentReferenceService - addDocumentReference(문자열 docSysId, 문자열 targetTable, 문자열 tableSysId) {#ariaid-title3}

대상 테이블 기록에 문서 참조를 추가합니다.
{#DRS-addDocumentReference_S_S_S__table_w4z_2cg_tpb__entry__3}{#DRS-addDocumentReference_S_S_S__ph_docserv_parm_docID}

| 이름 | 유형 | 설명 |
|-|-|-|
| docSysId | 문자열 | 문서 \[ds_document\] 테이블에 있는 문서 기록의 Sys_id입니다. |
| targetTable | 문자열 | 문서 참조를 제공할 대상 테이블의 이름입니다. |
| tableSysId | 문자열 | 문서 참조를 추가할 대상 테이블 기록의 Sys_id입니다. |
[표 2. 매개변수]

{#DRS-addDocumentReference_S_S_S__table_w4z_2cg_tpb} {#DRS-addDocumentReference_S_S_S__table_x4z_2cg_tpb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 문서 참조 \[ds_document_reference\] 테이블에서 성공 메시지가 있는 새 기록 Sys_id. 그렇지 않은 경우 오류 메시지입니다. { "message": "String", "status": "String" } {#DRS-addDocumentReference_S_S_S__api_docserv_codeblock_dets} |
| \<Object\>.메시지 | 성공 또는 오류를 확인하는 메시지입니다. 성공인 경우 문서 참조가 추가된 기록의 sys_id 포함됩니다. 데이터 유형: 문자열 |
| \<Object\>.status | 운영의 성공 여부를 나타내는 상태입니다. 가능한 값: * 성공 - 운영이 성공했습니다. * 실패 -- 운영이 성공하지 못했습니다. 에서는 message 상세 정보를 제공합니다. {#DRS-addDocumentReference_S_S_S__ul_rlv_5cv_j4b} 데이터 유형: 문자열 |
[표 3. 반환]

{#DRS-addDocumentReference_S_S_S__table_x4z_2cg_tpb}  
다음 예는 인시던트 \[incident\] 테이블의 기록에 문서 참조를 추가하는 방법을 보여줍니다.

    var docReference = new sn_doc_services.DocumentReferenceService();

    var result = docReference.addDocumentReference("<docSysId>", "incident", "<tableSysId>");

    gs.info(JSON.stringify(result, null, 2));

출력:

    {
      "message": "Adding an entry to DocumentReference for the given docId to target table : incident, sysId : <tableSysId> is successful.",
      "status": "success"
    }

## DocumentReferenceService - removeDocumentReference(String docSysId, String targetTable, String tableSysId) {#ariaid-title4}

문서 참조 \[ds_document_reference\] 테이블에서 문서 참조를 제거합니다.
{#DRS-removeDocumentReference_S_S_S__table_w4z_2cg_tpb__entry__3}{#DRS-removeDocumentReference_S_S_S__ph_docserv_parm_docID}

| 이름 | 유형 | 설명 |
|-|-|-|
| docSysId | 문자열 | 문서 \[ds_document\] 테이블에 있는 문서 기록의 Sys_id입니다. |
| targetTable | 문자열 | 문서 참조가 포함된 테이블의 이름입니다. 이 정보는 문서 참조 \[ds_document_reference\] 테이블에 문서와 함께 나열됩니다. |
| tableSysId | 문자열 | 문서를 참조하는 레코드의 Sys_id입니다. 문서 참조 \[ds_document_reference\] 테이블에서 문서와 함께 나열된 관련 정보를 찾을 수 있습니다. |
[표 4. 매개변수]

{#DRS-removeDocumentReference_S_S_S__table_w4z_2cg_tpb} {#DRS-removeDocumentReference_S_S_S__table_x4z_2cg_tpb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 성공 메시지. 그렇지 않은 경우 오류 메시지입니다. { "message": "String", "status": "String" } {#DRS-removeDocumentReference_S_S_S__api_docserv_codeblock_dets} |
| \<Object\>.메시지 | 성공 또는 오류를 확인하는 메시지입니다. 성공인 경우 문서 참조가 제거된 기록의 sys_id 포함됩니다. 데이터 유형: 문자열 |
| \<Object\>.status | 운영의 성공 여부를 나타내는 상태입니다. 가능한 값: * 성공 - 운영이 성공했습니다. * 실패 -- 운영이 성공하지 못했습니다. 에서는 message 상세 정보를 제공합니다. {#DRS-removeDocumentReference_S_S_S__ul_rlv_5cv_j4b} 데이터 유형: 문자열 |
[표 5. 반환]

{#DRS-removeDocumentReference_S_S_S__table_x4z_2cg_tpb}  
다음 예는 인시던트 \[incident\] 테이블의 기록에서 문서 참조를 제거하는 방법을 보여줍니다.

    var docReference = new sn_doc_services.DocumentReferenceService();

    var result = docReference.removeDocumentReference("<docSysId>", "incident", "<tableSysId>");

    gs.info(JSON.stringify(result, null, 2));

출력:

    {
      "message": "Deleting an entry to DocumentReference for the given docId to target table : incident, sysId : <tableSysId> is successful.",
      "status": "success"
    }


