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


---

# DCManager - Global

# DCManager - Global {#ariaid-title1}

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

The DCManager API enables you to group data by type.  
Using this API you can:

* Assign data classifications to existing dictionary entries.
* Look up the data classifications for specific dictionary entries.
* Remove all data classifications associated with specific dictionary entries.
* Retrieve a list of all data classifications available in the current domain.
{#DCManagerAPIGlobal__ul_fnm_qrm_xnb}

This API requires the Data Classification \[com.glide.data_classification\]
plugin.

For more information, see [Data Classification](https://www.servicenow.com/docs/access?context=data-classification&version=xanadu&pubname=xanadu-platform-security&ft:locale=en-US).

## DCManager - classify(String dictEntries, String dataClasses) {#ariaid-title2}

Assigns pre-defined or user-defined data classifications to existing dictionary entries.
Requires the admin or data_classification_admin role.
{#DCM-classify_S_S__table_wkc_j5c_snb__entry__3}

| Name | Type | Description |
|-|-|-|
| dictEntries | String | The sys_ids of the records you want to classify. The sys_ids are from the Dictionary \[sys_dictionary\] table. Entered as a comma-separated list enclosed in a string. |
| dataClasses | String | The sys_ids of the data classifications you want to assign. The sys_ids are from the Data Classification \[data_classification\] table. Entered as a comma-separated list enclosed in a string. |
[Table 1. Parameters]

{#DCM-classify_S_S__table_wkc_j5c_snb} {#DCM-classify_S_S__table_xkc_j5c_snb__entry__2}

| Type | Description |
|-|-|
| String | Message describing the result of the operation. |
[Table 2. Returns]

{#DCM-classify_S_S__table_xkc_j5c_snb}  
This example finds records containing social security numbers and classifies the records as confidential.

    var dcm = new SNC.DCManager();
    var confidentialClass = {};
    var ssnFields = [];
    var dataClasses = JSON.parse(dcm.getAllDataClasses());

    // Get the Confidential data class record
    dataClasses.forEach(function (dataClass) {
      if (dataClass.name == "Confidential")
        confidentialClass = dataClass;
    });

    // Find fields that seem to be strong social security numbers
    var dictionaryGR = new GlideRecord("sys_dictionary");
    dictionaryGR.addQuery("element", "ssn").addOrCondition("element", "social_security_number");
    dictionaryGR.query();
    while (dictionaryGR.next())
      ssnFields.push(dictionaryGR.getUniqueValue());

    // Classify any found entries as Confidential
    if (ssnFields.length > 0)
      dcm.classify(ssnFields.join(), confidentialClass.sys_id);

Output:

    "Successfully stored the data classification configurations"

## DCManager - clearClassification(String dictEntries) {#ariaid-title3}

Removes all data classifications for the specified dictionary entries.
Requires the admin or data_classification_admin role.
{#DCM-clearClassification_S__table_jls_l5c_snb__entry__3}

| Name | Type | Description |
|-|-|-|
| dictEntries | String | The sys_ids of the records you want to remove classifications from. The sys_ids are from the Dictionary \[sys_dictionary\] table. Entered as a comma-separated list enclosed in a string. |
[Table 3. Parameters]

{#DCM-clearClassification_S__table_jls_l5c_snb} {#DCM-clearClassification_S__table_kls_l5c_snb__entry__2}

| Type | Description |
|-|-|
| String | Message describing the result of the operation. |
[Table 4. Returns]

{#DCM-clearClassification_S__table_kls_l5c_snb}  
This example removes the data classification for a dictionary entry.

    var dcm = new SNC.DCManager();
    gs.info(dcm.clearClassification("445de0a6dba30300efc57416bf9619b0"));

Output:

    "Classifications removed for the specified dictionary entries"

## DCManager - getAllDataClasses() {#ariaid-title4}

Returns a list of all data classifications available in the current domain.
Requires the admin, data_classification_admin, or data_classification_auditor role.
{#DCM-getAllDataClasses__table_qyt_m5c_snb__entry__3}

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

{#DCM-getAllDataClasses__table_qyt_m5c_snb} {#DCM-getAllDataClasses__table_ryt_m5c_snb__entry__2}

| Type | Description |
|-|-|
| \<Array\> | Result of the request. Returns the sys_id and name for each available data classification. If there are no data classifications, it returns an empty array. Data classifications can be organized into parent-child relationships. If there are parent data classifications, they are identified in the result. Data type: Array [ { "parent": {Object}, "sys_id": "String", "name": "String" } ] |
| \<Array\>.parent | Entry for a parent data classification. Data type: Object "parent": { "sys_id": "String", "name": "String" } |
| \<Array\>.parent.sys_id | Sys_id of the parent data classification from the Data Classification \[data_classification\] table. Data type: String |
| \<Array\>.parent.name | Name of the parent data classification. Data type: String |
| \<Array\>.sys_id | Sys_id of the data classification from the Data Classification \[data_classification\] table. Data type: String |
| \<Array\>.name | Name of the data classification. Data type: String |
[Table 6. Returns]

{#DCM-getAllDataClasses__table_ryt_m5c_snb}  
This example retrieves a list of all available data classifications.

    var dcm = new SNC.DCManager();
    gs.info(dcm.getAllDataClasses());

Output:

    [
      {
        "parent": {
          "sys_id": "a9670fc773fc1010ae8dd21efaf6a735",
          "name": "Confidential"
        },
        "sys_id": "348107b951d71010f877f3f178e7dd0d",
        "name": "Personally identifiable information"
      },
      {
        "sys_id": "a9670fc773fc1010ae8dd21efaf6a735",
        "name": "Confidential"
      },
      {
        "sys_id": "59b7070b73fc1010ae8dd21efaf6a764",
        "name": "Restricted"
      },
      {
        "sys_id": "11d60fc773fc1010ae8dd21efaf6a744",
        "name": "Internal"
      },
      {
        "sys_id": "f5b4cf4773fc1010ae8dd21efaf6a766",
        "name": "Public"
      }
    ]

## DCManager - getClassification(String dictEntries) {#ariaid-title5}

Retrieves all data classifications for the specified dictionary entries.
{#DCM-getClassification_S__table_mfh_k5c_snb__entry__3}

| Name | Type | Description |
|-|-|-|
| dictEntries | String | The sys_ids of the records you want to retrieve classifications for. The sys_ids are from the Dictionary \[sys_dictionary\] table. Entered as a comma-separated list enclosed in a string. |
[Table 7. Parameters]

{#DCM-getClassification_S__table_mfh_k5c_snb} {#DCM-getClassification_S__table_nfh_k5c_snb__entry__2}

| Type | Description |
|-|-|
| \<Object\> | JSON object containing each dictionary entry's sys_id with an array of its associated data classes. If there are no associated data classifications, it returns a message describing the result of the operation. Data classifications can be organized into parent-child relationships. If there are parent data classifications, they are identified in the result. Data type: Object { <sys_dictionary_sys_id>: [ { "parent": {Object}, "sys_id": "String", "name": "String" } ] } |
| \<Object\>.parent | Entry for a parent data classification. Data type: Object "parent": { "sys_id": "String", "name": "String" } |
| \<Object\>.parent.sys_id | Sys_id of the parent data classification from the Data Classification \[data_classification\] table. Data type: String |
| \<Object\>.parent.name | Name of the parent data classification. Data type: String |
| \<Object\>.sys_id | Sys_id of the data classification from the Data Classification \[data_classification\] table. Data type: String |
| \<Object\>.name | Name of the data classification. Data type: String |
[Table 8. Returns]

{#DCM-getClassification_S__table_nfh_k5c_snb}  
This example retrieves the data classifications for a dictionary entry.

    var dcm = new SNC.DCManager();
    gs.info(dcm.getClassification("445de0a6dba30300efc57416bf9619b0"));

Output:

    {
      "445de0a6dba30300efc57416bf9619b0": [
        {
          "parent": {
            "sys_id": "a9670fc773fc1010ae8dd21efaf6a735",
            "name": "Confidential"
          },
          "sys_id": "348107b951d71010f877f3f178e7dd0d",
          "name": "Personally identifiable information"
        }
      ]
    }


