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


---

# Data Classification API

# Data Classification API {#ariaid-title1}

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

The Data Classification API provides endpoints to group data by
type.
With the Data Classification 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.
{#data-classification-api__ul_hy2_srm_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).

## Data Classification - GET /data_classification/getAllDataClasses {#ariaid-title2}

Returns a list of all data classifications available in the current domain.
Requires the admin, data_classification_admin, or data_classification_auditor role.

### URL format

Default URL:
/api/now/data_classification/getAllDataClasses

### Supported request parameters

{#data_class-GET-getAllDataClasses__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 1. Path parameters]

{#data_class-GET-getAllDataClasses__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 2. Query parameters]

{#data_class-GET-getAllDataClasses__entry__10}

| Name | Description |
|-|-|
| None |   |
[Table 3. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-GET-getAllDataClasses__entry__14}{#data_class-GET-getAllDataClasses__accept-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Table 4. Request headers]

{#data_class-GET-getAllDataClasses__entry__18}

| Header | Description |
|-|-|
| None |   |
[Table 5. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-GET-getAllDataClasses__entry__22}{#data_class-GET-getAllDataClasses__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
[Table 6. Status codes]

### Response body parameters (JSON or XML)

{#data_class-GET-getAllDataClasses__entry__26}

| Name | Description |
|-|-|
| result | 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 "result": [ { "parent": {Object}, "sys_id": "String", "name": "String" } ] |
| result.parent | Entry for a parent data classification. Data type: Object "parent": { "sys_id": "String", "name": "String" } |
| result.parent.sys_id | Sys_id of the parent data classification from the Data Classification \[data_classification\] table. Data type: String |
| result.parent.name | Name of the parent data classification. Data type: String |
| result.sys_id | Sys_id of the data classification from the Data Classification \[data_classification\] table. Data type: String |
| result.name | Name of the data classification. Data type: String |
[ ]

### cURL request

Retrieves a list of all the available data classifications.

    curl "https://instance.servicenow.com/api/now/data_classification/getAllDataClasses" \
    --request GET \
    --header "Accept:application/json" \
    --user 'username':'password'

    {
      "result": [
        {
          "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"
        }
      ]
    }

## Data Classification - POST /data_classification/classify {#ariaid-title3}

Assigns pre-defined or user-defined data classifications to existing dictionary entries.
Requires the admin or data_classification_admin role.

### URL format

Default URL:
/api/now/data_classification/classify

### Supported request parameters

{#data_class-POST-classify__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 7. Path parameters]

{#data_class-POST-classify__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 8. Query parameters]

{#data_class-POST-classify__entry__10}

| Name | Description |
|-|-|
| dictionary_entries | Required. 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. Data type: String |
| data_classes | Required. 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. Data type: String |
[Table 9. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-POST-classify__entry__16}{#data_class-POST-classify__accept-RESTAPI}{#data_class-POST-classify__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Table 10. Request headers]

{#data_class-POST-classify__entry__22}

| Header | Description |
|-|-|
| None |   |
[Table 11. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-POST-classify__entry__26}{#data_class-POST-classify__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 12. Status codes]

### Response body parameters (JSON or XML)

{#data_class-POST-classify__entry__32}

| Name | Description |
|-|-|
| result | Message describing the result of the operation. Data type: String |
[ ]

### cURL request

Assigns a data classification to a dictionary entry.

    curl "https://instance.servicenow.com/api/now/data_classification/classify" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
        \"dictionary_entries\": \"445de0a6dba30300efc57416bf9619b0\",
        \"data_classes\": \"40edb1f51bbcec50b92a10a61a4bcb8a\"
    }" \
    --user 'username':'password'

    {
      "result": "Successfully stored the data classification configurations"
    }

## Data Classification - POST /data_classification/clear {#ariaid-title4}

Removes all data classifications for the specified dictionary entries.
Requires the admin or data_classification_admin role.

### URL format

Default URL:
/api/now/data_classification/clear

### Supported request parameters

{#data_class-POST-clear__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 13. Path parameters]

{#data_class-POST-clear__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 14. Query parameters]

{#data_class-POST-clear__entry__10}

| Name | Description |
|-|-|
| dictionary_entries | Required. 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. Data type: String |
[Table 15. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-POST-clear__entry__14}{#data_class-POST-clear__accept-RESTAPI}{#data_class-POST-clear__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Table 16. Request headers]

{#data_class-POST-clear__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 17. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-POST-clear__entry__24}{#data_class-POST-clear__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 18. Status codes]

### Response body parameters (JSON or XML)

{#data_class-POST-clear__entry__30}

| Name | Description |
|-|-|
| result | Message describing the result of the operation. Data type: String |
[ ]

### cURL request

Clears the data classifications for a dictionary entry.

    curl "https://instance.servicenow.com/api/now/data_classification/clear" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
        \"dictionary_entries\": \"445de0a6dba30300efc57416bf9619b0\"
    }" \
    --user 'username':'password'

    {
      "result": "Classifications removed for the specified dictionary entries"
    }

## Data Classification - POST /data_classification/getClassification {#ariaid-title5}

Retrieves all data classifications for the specified dictionary entries.
Requires the admin, data_classification_admin, or data_classification_auditor role.

### URL format

Default URL:
/api/now/data_classification/getClassification

### Supported request parameters

{#data_class-POST-getClassification__entry__2}

| Name | Description |
|-|-|
| None |   |
[Table 19. Path parameters]

{#data_class-POST-getClassification__entry__6}

| Name | Description |
|-|-|
| None |   |
[Table 20. Query parameters]

{#data_class-POST-getClassification__entry__10}

| Name | Description |
|-|-|
| dictionary_entries | Required. 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. Data type: String |
[Table 21. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-POST-getClassification__entry__14}{#data_class-POST-getClassification__accept-RESTAPI}{#data_class-POST-getClassification__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Table 22. Request headers]

{#data_class-POST-getClassification__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 23. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#data_class-POST-getClassification__entry__24}{#data_class-POST-getClassification__entry-200-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 24. Status codes]

### Response body parameters (JSON or XML)

{#data_class-POST-getClassification__entry__30}

| Name | Description |
|-|-|
| result | Result of the request. Returns a JSON object containing each dictionary entry's sys_id with an array of its associated data classifications. 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 "result": { <sys_dictionary_sys_id>: [ { "parent": {Object}, "sys_id": "String", "name": "String" } ] } |
| result.name | Name of the data classification. Data type: String |
| result.parent | Entry for a parent data classification. Data type: Object "parent": { "sys_id": "String", "name": "String" } |
| result.parent.name | Name of the parent data classification. Data type: String |
| result.parent.sys_id | Sys_id of the parent data classification from the Data Classification \[data_classification\] table. Data type: String |
| result.sys_id | Sys_id of the data classification from the Data Classification \[data_classification\] table. Data type: String |
[ ]

### cURL request

Get the data classifications associated with a specific dictionary entry.

    curl "https://instance.servicenow.com/api/now/data_classification/getClassification" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{
        \"dictionary_entries\": \"445de0a6dba30300efc57416bf9619b0\"
    }" \
    --user 'username':'password'

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


