create_data_classification

DatasetsApi.create_data_classification(role_id, data_classification, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Create data classification

Creates a new data classification.DataClassificationName must not contain whitespace and must be unique. DisplayName defaults to DataClassificationName if omitted. Description defaults to “-” if not provided.

Parameters:
  • role_id (str) – The active Amorphic role ID of the caller. (required)

  • data_classification (DataClassification) – (required)

  • content_type (str)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

Status

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /datasets/dataclassifications

Request

Request / response example

{
  "DataClassificationName": "confidential",
  "DisplayName": "Confidential",
  "Description": "Sensitive business data requiring restricted access"
}

Success (HTTP 200)

Data classification created successfully.

Request / response example

{
  "Message": "Successfully created data classification",
  "DataClassificationName": "confidential"
}

Errors

Documented error codes: IPV-1007, IPV-1001, IPV-1003.

HTTP 400

Invalid input. Name contains whitespace (IPV-1007), required field is empty (IPV-1001).

Name contains whitespace. User tries to create “confidential class”

{
  "Message": "IPV-1007 - Invalid parameter - confidential class, cannot contain white spaces"
}

Required field is empty

{
  "Message": "IPV-1001 - Parameter DataClassificationName is a required value."
}

HTTP 500

Backend failure. Includes IPV-1003 when a classification with the same name already exists.

Request / response example

{
  "Message": "IPV-1003 - Invalid parameter - testclassification, this field must be a unique value across the platform"
}