This endpoint can be used to anonymize the data of one or multiple selected Alfabet users.

Data anonymization is an irreversible action!

Endpoint name: anonymizeuser

HTTP method: PUT

Service call: ServerAdress/api/v2/anonymizeuser

Authorization Header Field: Authorization:TypeValue

Click for details about authorization.

Additional Header Fields: Content-Type: application/json; charset=utf-8

Body: The body is a JSON object with the following structure:

  • {
  • 'Refs': ['RefStrOfObject','RefStrOfObject']
  • }
Field Mandatory/Optional Required Value
'Refs':['RefstrOfObject','RefstrOfObject'] Mandatory An array containing one or multiple values of the REFSTR property of objects of the object class Person with the stereotype User in the Alfabet database. All users included in the array will be anonymized.

Return value: The return value is a JSON object with three fields:

  • Count: The number of users that have been anonymized.
  • RejectedObjects: A JSON list of users that were not anonymized (for example, because the user is excluded from anonymization). The field contains a JSON list of users with one JSON object for each user that was not anonymized. The object has a RefStr field that returns the REFSTR of the user and a Message field that gives information about the rejection.

RESTful Service call:

Service call: https://AlfabetCloud/AlfabetAPIServer/api/v2/anonymizeuser

HTTP method: PUT

Headers:

  • Authorization: bearer eyJ0eXAiOiJKVxMiJ9.eyJpc3MiOiJhbGZhYmV0IiwiaWF0IjoiMTU3MzAzMjA0NiIsImV4cCI6IjE1NzMwMzMyNDYiLCJxc2giOm51bGwsInN1YiI6IkFwaSBBdXRoZW50aWNhdGlvbiIsImNvbnRleHQiOnsidXNlciI6eyJVc2VyS2V5IjoiQUxGQUJFRDRUNGNc1R5cGUiOjB9fX0.PJC0EWtlUETbraV7NckVkRTFVm356y6K9JyhFR245hXp-2ApttryATZ_dAL0bi_GZpeJx7iqr_lRIA
  • Content-Type: application/json; charset=utf-8

Body:

  • {
  • 'Refs': ['421-5-0','421-9-0','421-12-0','421-999-0']
  • }

A user with the last specified REFSTR does not exist.

Response of the service call:

  • {
    • 'Count': 3,
    • 'RejectedObjects':{
      • 'RefStr': '421-999-0',
      • 'Message': 'Cannot find instance'
      • }
  • }