---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# SNMPResponse - Global

# SNMPResponse - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

The SNMPResponse script include provides methods to wrap an SNMP payload response instance with methods to safely and easily retrieve SNMP singleton fields or tables.

Use this script include to retrieve SNMP singleton fields or tables.

## SNMPResponse - buildIndex(Object cur, String name, String extName) {#ariaid-title2}

Builds an index to all SNMP entities in the current object.
{#r_SRES-buildIndex_O_S_S__table_ipy_bvl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| cur | Object | The current object |
| name | String | The index name |
| extName | String | The index extension |
[Table 1. Parameters]

{#r_SRES-buildIndex_O_S_S__table_ipy_bvl_xt} {#r_SRES-buildIndex_O_S_S__table_jpy_bvl_xt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 2. Returns]

{#r_SRES-buildIndex_O_S_S__table_jpy_bvl_xt}

## SNMPResponse - buildReferences() {#ariaid-title3}

Builds references to actual instances for all identified indexes (in the
discovery_snmp_ref table) that can be resolved.
{#r_SRES-buildReferences__table_pvk_1tl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 3. Parameters]

{#r_SRES-buildReferences__table_pvk_1tl_xt} {#r_SRES-buildReferences__table_qvk_1tl_xt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 4. Returns]

{#r_SRES-buildReferences__table_qvk_1tl_xt}

## SNMPResponse - getAmbiguousOIDs(String refBase, String refLeaf) {#ariaid-title4}

Returns an array of OIDs that match the given ref_base and which have a defined,
non-null ref_leaf.
The last character of ref_base may be a question mark; in that case, if the parent node is
a table then all table entries are returned.
{#r_SRES-getAmbiguousOIDs_S_S__table_cp2_ptl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| refBase | String | The reference base |
| refLeaf | String | The reference leaf |
[Table 5. Parameters]

{#r_SRES-getAmbiguousOIDs_S_S__table_cp2_ptl_xt} {#r_SRES-getAmbiguousOIDs_S_S__table_dp2_ptl_xt__entry__2}

| Type | Description |
|-|-|
| Array | An array of OIDs that match the given ref_base and which have a defined, non-null ref_leaf. |
[Table 6. Returns]

{#r_SRES-getAmbiguousOIDs_S_S__table_dp2_ptl_xt}

## SNMPResponse - getOIDInt(String name) {#ariaid-title5}

Returns the integer contained in the OID object with the given MIB name.
{#r_SRES-getOIDInt_S__table_hb1_swl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | The MIB name |
[Table 7. Parameters]

{#r_SRES-getOIDInt_S__table_hb1_swl_xt} {#r_SRES-getOIDInt_S__table_ib1_swl_xt__entry__2}

| Type | Description |
|-|-|
| Number | The integer contained in the OID object, or zero if the object could not be found or is empty. |
[Table 8. Returns]

{#r_SRES-getOIDInt_S__table_ib1_swl_xt}

## SNMPResponse - getOIDObj(String name) {#ariaid-title6}

Retrieves the OID object with the given MIB name from the response.
This method does not work with numeric OID strings, only MIB names.
{#r_SRES-getOIDObj_S__table_trw_pxl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | The MIB name |
[Table 9. Parameters]

{#r_SRES-getOIDObj_S__table_trw_pxl_xt} {#r_SRES-getOIDObj_S__table_urw_pxl_xt__entry__2}

| Type | Description |
|-|-|
| OID object | The OID object with the given MIB name, or null if the object could not be found or if any table entries are encountered while walking down the named elements. |
[Table 10. Returns]

{#r_SRES-getOIDObj_S__table_urw_pxl_xt}

## SNMPResponse - getOIDTable(String parentName, String entryName) {#ariaid-title7}

Returns a hashmap of table entries under the given parent MIB name, with the given
entry MIB names.
{#r_SRES-getOIDTable_S_S__table_nvc_dxl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| parentName | String | The parent MIB name |
| entryName | String | The entry MIB name |
[Table 11. Parameters]

{#r_SRES-getOIDTable_S_S__table_nvc_dxl_xt} {#r_SRES-getOIDTable_S_S__table_ovc_dxl_xt__entry__2}

| Type | Description |
|-|-|
| Hashmap | A hashmap of table entries under the given parent MIB name, with the given entry MIB names, or null if the parent does not exist. |
[Table 12. Returns]

{#r_SRES-getOIDTable_S_S__table_ovc_dxl_xt}

## SNMPResponse - getOIDText(String name) {#ariaid-title8}

Returns the text contained in the OID object with the given MIB name.
{#r_SRES-getOIDText_S__table_p44_hwl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | The MIB name |
[Table 13. Parameters]

{#r_SRES-getOIDText_S__table_p44_hwl_xt} {#r_SRES-getOIDText_S__table_q44_hwl_xt__entry__2}

| Type | Description |
|-|-|
| String | The text contained in the OID object. Returns null if the object could not be found, or if it has no text. |
[Table 14. Returns]

{#r_SRES-getOIDText_S__table_q44_hwl_xt}

## SNMPResponse - normalize(Object cur) {#ariaid-title9}

Resolves SNMP tables into hashmaps and OID values into primitives.
All SNMP numeric types convert to a JavaScript number. An SNMP null type converts to a
JavaScript null. An SNMP IP Address value converts to a Java IPAddressV4 instance. All other
values convert to a JavaScript string.
{#r_SRES-normalize_O__table_ibf_qsl_xt__entry__3}

| Name | Type | Description |
|-|-|-|
| cur | Object | The SNMP table or OID value. |
[Table 15. Parameters]

{#r_SRES-normalize_O__table_ibf_qsl_xt} {#r_SRES-normalize_O__table_jbf_qsl_xt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 16. Returns]

{#r_SRES-normalize_O__table_jbf_qsl_xt}

