Data instances

Overview

Organize data targeted to be protected by creating a model using classes and properties. One pair of classes and property defines one data instance.

The data you are going to transform are numbers, texts, dates, images, etc. They are called data entities. Data entities are values of {class, properties} data instances you will send to RPS Engine APIs in order to be transformed (encrypt, decrypt, anonymize, tokenize, ...)

Examples of data instances and their values (data entities) are:

{customer, name}Laura, John, ...
{transaction, amount}12'450 CHF, 230 EUR, ...
{address, city}Rome, Paris, ...
{account, IBAN}ES7921000813610123456789, ...

JSON instantiation (API request)

Data instances are instantiated using JSON in order to use them in the Transform API requests.

"instances": [
    {
      "loggingContext": {
        "guid": "[string]",
        "evidences": [
          {
            "name": "[string]",
            "value": "[string]"
          },
          ...
        ]
      },
      "dependencyContext": {
        "guid": "[string]",
        "evidences": [
          {
            "name": "[string]",
            "value": "[string]"
          },
          ...
        ]
      },
      "className": "[string]",
      "propertyName": "[string]",
      "value": "[string]"
    },
    ...
]
JSON attributeTypeDescriptionRequired
[i].loggingContextobjectthe logging context object of the data instance i.
[i].dependencyContextobjectthe dependency context object of the data instance i.
[i].classNamestringthe name of the class defining the data instance i.
[i].propertyNamestringthe name of the property defining the data instance i.
[i].valuestring

the value of the data instance i which will be transformed.

The rights context, processing context, className and propertyName are used to find the transformers sequences transformation sequence needed to transform the data instance values.

If no className and if propertyName are specified then the Transform API extracts them from the data instance's value by using the first extract type transformer found amongst the mapped transformers sequences.

Example of JSON instantiation (API response)

"instances": [
  {
    "loggingContext": {
      "guid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "evidences": [
        {
          "name": "status",
          "value": "READY"
        }
      ]
    },
    "dependencyContext": {
      "guid": "38d891de-7bd5-42ef-8150-d0d44ce9316f",
      "evidences": [
        {
          "name": "city",
          "value": "Rome"
        },
        {
          "name": "length",
          "value": "37"
        }
      ]
    },
    "className": "account",
    "propertyName": "IBAN",
    "value": "ES7921000813610123456789"
  },
  {
    "loggingContext": {
      "guid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "evidences": [
        {
          "name": "source",
          "value": "in country"
        }
      ]
    },
    "value": "Example of single value for transformation without Class & Property name"
  },
  {
    "className": "customer",
    "propertyName": "name",
    "value": "Albert"
  }
]

JSON instantiation (API response)

Data instances are instantiated using JSON in the responses to Transform API requests.

"instances": [
    {
      "className": "[string]",
      "propertyName": "[string]",
      "value": "[string]",
      "error": {
        "code": "[string]",
        "message": "[string]"
      }
    },
    ...
]
JSON attributeTypeDescriptionRequired
[i].classNamestringthe name of the class defining the data instance i, if it was specified in the the request.
[i].propertyNamestringthe name of the property defining the data instance i, if it was specified in the the request.
[i].valuestring

the transformed value of the data instance i. It will be "null" in case of error.

errorobjectthe eventual error object in case of failure of transforming the value of the data instance i.

Example of JSON instantiation (API response)

"instances": [
  {
    "className": "account",
    "propertyName": "IBAN",
    "value": "AA0034534058930459304593"
  },
  {
    "value": "@__asds33df23qaasdasd"
  },
  {
    "className": "customer",
    "propertyName": "name",
    "value": "null",
    "error": {
      "code": "8d39bc4c-8698-4f7b-a4f8-ba74b593f86e",
      "message": "Processing context not found"
    }
  }
]

Access

In order to create and modify data instances you must belong to the Configuration user group