Remove classification fields or keys

You can remove classification fields or keys from the server with the following methods:

Remove a single field from a key

To remove a single field from a key, include the the following object data list for each removal in your POST import json dataset ID request:

            {
            "key": "<KEY>",
            "action": "delete-field",
            "data": {
                "<Column Name>": ""
            }

This action results in the following value for the cell: ~empty~.

Make sure to include action in the data list above. Leaving it out will result in updating the entire column with the ~empty~ value.

Remove cell value example

The following example shows a request payload to remove both the Brand and Channel values:

{
    "dataFormat": "json",
    "encoding": "UTF8",
    "jobName": "prod report suite tracking code classification",
    "notifications": [
        {
            "method": "email",
            "state": "completed",
            "recipients": [
                "test_email@example.com"
            ]
        }
    ],
    "listDelimiter": ",",
    "source": "Direct API Upload",
    "keyOptions": {
        "byte_length": 0,
        "type": "string"
    },
    "data": [
        {
            "key": "xxxffxxxxxx",
            "action": "delete-field",
            "data": {
                "Brand": ""
            }
        },
        {
            "key": "xxxffxxxxxx",
            "action": "delete-field",
            "data": {
                "Channel": ""
            }
        },
       
...
]
}

Delete a key

To remove one key and all the classification values for this key, include the the following with your *POST import json dataset ID request:

        {
            "key": "<KEY>",
            "action": "delete-key"
        }

This action results in the following value for the key: ~deletekey~.

Delete a key by uploading a file

To delete a column value in an uploaded file, use the POST import upload file endpoint. The following shows a section of an uploaded .tsv file with an example change:

Key ColA ColB
key1 ~empty~

Delete a dataset

To remove an entire classification dataset, use the DELETE dataset ID endpoint.