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


---

# UriMatcherResponse - 범위 지정됨

# UriMatcherResponse - 범위 지정됨 {#ariaid-title1}

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

URI가 체계, 호스트, 경로, 단편 및 쿼리 매개변수 존재 여부에 대해 지정된 기준과 일치하는지에 대한 정보를 반환하는 메서드를 제공합니다.

UriMatcher API와 함께 이 API를 사용합니다. 이 API에는 생성자가 없습니다. 대신 [UriMatcher - match()](https://servicenow-prod.fluidtopics.net/BsqCK0mcpsdgkZzbhHzEXA#UriMatcher-match_S_S_O_O_O_B "URI가 지정된 체계, 호스트, 경로, 단편 및 쿼리 매개변수 존재 여부 기준과 일치하는지 확인합니다.") 메서드를 사용하여 UriMatcherResponse 개체를 인스턴스화합니다.

UriMatcherResponse API에는 기본적으로 활성화되어 있는 REST API 제공자(com.glide.rest) 플러그인이 필요합니다.

이 API는 `sn_ws` 네임스페이스 내에서 제공됩니다.

## UriMatcherResponse - getErrorMessages() {#ariaid-title2}

지정된 기준에 따라 URI를 테스트할 때 발생한 오류에 대한 메시지를 반환합니다.
{#UriMatcherResp-getErrorMessages__table_ymw_1zt_rdc__entry__3}

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

{#UriMatcherResp-getErrorMessages__table_ymw_1zt_rdc} {#UriMatcherResp-getErrorMessages__table_zmw_1zt_rdc__entry__2}

| 유형 | 설명 |
|-|-|
| 문자열 | 발생한 오류에 대한 설명입니다. 오류가 발생하지 않으면 빈 문자열이 반환됩니다. |
[표 2. 반환]

{#UriMatcherResp-getErrorMessages__table_zmw_1zt_rdc}  
이 예시에서는 호스트가 일치 기준에 제공되지 않았기 때문에 오류를 반환합니다.

    var uri = "https://example.com";
    var scheme = "https";    
    var matcher = new sn_ws.UriMatcher();  
    var resp = matcher.match(uri, scheme);  

    gs.info("Error occurred: " + resp.isError());  
    gs.info("Error message: " + resp.getErrorMessages());

출력:

    Error occurred: true
    Error message: Hosts rule is null or empty.

## UriMatcherResponse - isError() {#ariaid-title3}

지정된 기준에 대해 URI를 테스트할 때 오류가 발생했는지 확인합니다.
{#UriMatcherResp-isError__table_mh3_xyt_rdc__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 3. 매개변수]

{#UriMatcherResp-isError__table_mh3_xyt_rdc} {#UriMatcherResp-isError__table_nh3_xyt_rdc__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | 오류가 발생했는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다. * true: 오류가 발생했습니다. * false: 오류가 발생하지 않았습니다. {#UriMatcherResp-isError__ul_wxh_2t4_sdc} |
[표 4. 반환]

{#UriMatcherResp-isError__table_nh3_xyt_rdc}  
이 예시에서는 URI에 쿼리 매개변수가 포함되어 있기 때문에 오류를 반환합니다. match () 에 전달 disallowQueryParameters 된 인수가 `true`이기 때문에 오류가 발생합니다.

    var uri = "https://example.com/path1/more?q=query";
    var scheme = "https";  
    var allowedHosts = ["example.com", "sample.com"];  
    var allowedPaths = ["/path1/more", "/path2/less"];  
    var allowedFragments = ["section1", "section2"];  
    var noQueryParams = true;
    var matcher = new sn_ws.UriMatcher();  
    var resp = matcher.match(uri, scheme, allowedHosts, allowedPaths, allowedFragments, noQueryParams);  

    gs.info("Error occurred: " + resp.isError());  
    gs.info("Error message: " + resp.getErrorMessages());

출력:

    Error occurred: true
    Error message: Query parameters are not allowed for matching.

## UriMatcherResponse - isFragmentMatches() {#ariaid-title4}

URI가 조각의 기준과 일치하는지 확인합니다.
{#UriMatcherResp-isFragmentMatches__table_vls_lzt_rdc__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 5. 매개변수]

{#UriMatcherResp-isFragmentMatches__table_vls_lzt_rdc} {#UriMatcherResp-isFragmentMatches__table_wls_lzt_rdc__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | URI가 조각의 기준과 일치하는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다. * true: URI가 조각의 기준과 일치합니다. * false: URI가 조각의 기준과 일치하지 않습니다. {#UriMatcherResp-isFragmentMatches__ul_mgr_ckp_sdc} |
[표 6. 반환]

{#UriMatcherResp-isFragmentMatches__table_wls_lzt_rdc}  
이 예는 허용된 조각 목록에 없는 조각이 포함되어 있기 때문에 URI가 기준과 일치하지 않음을 보여줍니다.

    var uri = "https://example.com/path1/more#section3";
    var scheme = "https";  
    var allowedHosts = ["example.com", "sample.com"];  
    var allowedPaths = ["/path1/more", "/path2/less"];  
    var allowedFragments = ["section1", "section2"];  
    var matcher = new sn_ws.UriMatcher();  
    var resp = matcher.match(uri, scheme, allowedHosts, allowedPaths, allowedFragments);  

    gs.info("Is URI a match: " + resp.isMatch());  
    gs.info("Is scheme a match: " + resp.isSchemeMatches());  
    gs.info("Is host a match: " + resp.isHostMatches());  
    gs.info("Is path a match: " + resp.isPathMatches());  
    gs.info("Is fragment a match: " + resp.isFragmentMatches());
    gs.info("Error occurred: " + resp.isError());

출력:

    Is URI a match: false
    Is scheme a match: true
    Is host a match: true
    Is path a match: true
    Is fragment a match: false
    Error occurred: false

## UriMatcherResponse - isHostMatches() {#ariaid-title5}

URI가 호스트의 기준과 일치하는지 확인합니다.
{#UriMatcherResp-isHostMatches__table_igl_hzt_rdc__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 7. 매개변수]

{#UriMatcherResp-isHostMatches__table_igl_hzt_rdc} {#UriMatcherResp-isHostMatches__table_jgl_hzt_rdc__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | URI가 호스트의 기준과 일치하는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다. * true: URI가 호스트의 기준과 일치합니다. * false: URI가 호스트의 기준과 일치하지 않습니다. {#UriMatcherResp-isHostMatches__ul_dks_slp_sdc} |
[표 8. 반환]

{#UriMatcherResp-isHostMatches__table_jgl_hzt_rdc}  
이 예시에서는 URI가 지정된 체계 및 호스트와 일치하는지 확인합니다.

    var uri = "https://example.com/path?q=query";
    var scheme = "https";  
    var allowedHosts = ["example.com"];  
    var matcher = new sn_ws.UriMatcher();  
    var resp = matcher.match(uri, scheme, allowedHosts);  

    gs.info("Is URI a match: " + resp.isMatch());
    gs.info("Is host a match: " + resp.isHostMatches());

출력:

    Is URI a match: true
    Is host a match: true

## UriMatcherResponse - isMatch() {#ariaid-title6}

URI가 지정된 기준과 모두 일치하는지 확인합니다.
{#UriMatcherResp-isMatch__table_gzs_tyt_rdc__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 9. 매개변수]

{#UriMatcherResp-isMatch__table_gzs_tyt_rdc} {#UriMatcherResp-isMatch__table_hzs_tyt_rdc__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | URI가 지정된 모든 기준과 일치하는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다. * true: URI가 모든 기준과 일치합니다. * false: URI가 모든 기준과 일치하지 않습니다. {#UriMatcherResp-isMatch__ul_dks_slp_sdc} |
[표 10. 반환]

{#UriMatcherResp-isMatch__table_hzs_tyt_rdc}  
이 예시에서는 URI가 지정된 체계 및 호스트와 일치하는지 확인합니다.

    var uri = "https://example.com/path?q=query";
    var scheme = "https";  
    var allowedHosts = ["example.com"];  
    var matcher = new sn_ws.UriMatcher();  
    var resp = matcher.match(uri, scheme, allowedHosts);  

    gs.info("Is URI a match: " + resp.isMatch());

출력:

    Is URI a match: true

## UriMatcherResponse - isPathMatches() {#ariaid-title7}

URI가 경로의 기준과 일치하는지 확인합니다.
{#UriMatcherResp-isPathMatches__table_a5x_3zt_rdc__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 11. 매개변수]

{#UriMatcherResp-isPathMatches__table_a5x_3zt_rdc} {#UriMatcherResp-isPathMatches__table_b5x_3zt_rdc__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | URI가 경로의 기준과 일치하는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다. * true: URI가 경로의 기준과 일치합니다. * false: URI가 경로의 기준과 일치하지 않습니다. {#UriMatcherResp-isPathMatches__ul_dks_slp_sdc} |
[표 12. 반환]

{#UriMatcherResp-isPathMatches__table_b5x_3zt_rdc}  
이 예시에서는 URI가 지정된 체계, 호스트 및 경로와 일치하는지 확인합니다.

    var uri = "https://example.com/path1/more";
    var scheme = "https";  
    var allowedHosts = ["example.com", "sample.com"];  
    var allowedPaths = ["/path1/more", "/path2/less"];  
    var matcher = new sn_ws.UriMatcher();  
    var resp = matcher.match(uri, scheme, allowedHosts, allowedPaths);  

    gs.info("Is URI a match: " + resp.isMatch());  
    gs.info("Is scheme a match: " + resp.isSchemeMatches());  
    gs.info("Is host a match: " + resp.isHostMatches());  
    gs.info("Is path a match: " + resp.isPathMatches());  
    gs.info("Is fragment a match: " + resp.isFragmentMatches());
    gs.info("Error occurred: " + resp.isError());

출력:

    Is URI a match: true
    Is scheme a match: true
    Is host a match: true
    Is path a match: true
    Is fragment a match: true
    Error occurred: false

## UriMatcherResponse - isSchemeMatches() {#ariaid-title8}

URI가 구성표의 기준과 일치하는지 확인합니다.
{#UriMatcherResp-isSchemeMatches__table_p54_dzt_rdc__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 13. 매개변수]

{#UriMatcherResp-isSchemeMatches__table_p54_dzt_rdc} {#UriMatcherResp-isSchemeMatches__table_q54_dzt_rdc__entry__2}

| 유형 | 설명 |
|-|-|
| 부울 | URI가 구성표의 기준과 일치하는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다. * true: URI가 체계의 기준과 일치합니다. * false: URI가 구성표의 기준과 일치하지 않습니다. {#UriMatcherResp-isSchemeMatches__ul_dks_slp_sdc} |
[표 14. 반환]

{#UriMatcherResp-isSchemeMatches__table_q54_dzt_rdc}  
이 예시에서는 URI가 지정된 체계 및 호스트와 일치하는지 확인합니다.

    var uri = "https://example.com/path?q=query";
    var scheme = "https";  
    var allowedHosts = ["example.com"];  
    var matcher = new sn_ws.UriMatcher();  
    var resp = matcher.match(uri, scheme, allowedHosts);  

    gs.info("Is URI a match: " + resp.isMatch());
    gs.info("Is scheme a match: " + resp.isSchemeMatches());

출력:

    Is URI a match: true
    Is scheme a match: true


