/
User anonymization. REST API

User anonymization. REST API

REST API

Method, path

Query parameters

Body

Response

Notes

Method, path

Query parameters

Body

Response

Notes

POST

/rest/actonic-gdpr/1.0/data-cleaner-template/:id

Template ID to update

{ "id":, // template id (long) "name":"", // template name (string) "jql":"", // scope, JQL expression (string) "objects":[], // field names (array of strings) "notificationType":"" // notification type (string) }

 

200:

{ "id":, - template id (long) "enabled":, - template state (boolean) "isDraft":, - is the template is draft (boolean) "name":"", - template name (string) "jql":"", - scope, JQL expression (string) "objects":[], - field names (array of strings) "dataRulesCount":, - number of rules (long) "notificationType":"", - notification type (string) "notificationParameters":{}, - notification parameters (object) "issueCount":, - number of issues (long) "isDeleting":, - is the template is deleted (boolean) }

Update template for new anonymization process

PUT

/rest/actonic-gdpr/1.0/data-cleaner-template/rules

none

{ "templateId":, // template id (long) "enabled":, // rule state (boolean) "name":"", // rule name (string) "searchType":"", // search type (string) "searchString":"", // search string, what to search (string) "replaceType":"", // replace type (string) "replaceString":"" // replace string, what to replace (string) }

200:

{ "id":, - rule id (long) "templateId":, - template id (long) "enabled":, - rule state (boolean) "name":"", - rule name (string) "searchType":"", - search type (string) "searchString":"", - search string, what to search (string) "replaceType":"", - replace type (string) "replaceString":"" - replace string, what to replace (string) }

 

Add a new rule for quick user anonymization template

GET 

/rest/actonic-gdpr/1.0/data-cleaner-template/anonymizer/custom-anonymizers

none

none

200:

[ { "id":, - anonymizer id (long) "pluginName":"", - Jira plugin name (string) "name":"" - anonymizer name (string) }, ... ]

Get a list of registered anonymizers, provided by Actonic or 3rd party apps

POST 

/rest/actonic-gdpr/1.0/data-cleaner-template/post-function

none

{ "name":"", - post-function name (string) "rules":"", - rules (string) "functionType":"", - post-function type (string) "anyRuleEnabled":, - rules state (boolean) "parameters": - post-function parameters (object) { "sourceUsers":"", - source users, comma separated (string) "targetUser":"", - target user (string) "anonymizerIds":""- anonymizer identifiers, comma separated (string) }, "templateId": - template id (long) }

200:

Empty response

Add post-function to launch selected anonymizers after the main anonymization process

PUT 

/rest/actonic-gdpr/1.0/data-cleaner-template/task

none

{ "templateId":"", - template id (long) "type": - task type (int): 0 - search, 1 - anonymize }

 

200:

{ "id":, - task id (long) "templateId":, - template id (long) "creator":"", - creator name (string) "createDate":"", - date of creation (date) "duration":, - duration (long) "startDateLabel":"", - start date in custom format (string) "status":, - task status (int): 0 - not started, 1 - in progress, 2 - aborted, 3 - finished, 5 - failed "taskType":, - task type (int): 0 - search, 1 - anonymize "meta": - task meta (object) { "rules":{}, - task rules (object) "users":{}, - source and target users "other": - other (object) { "numberOfRules":, - number of rules (int) "numberOfFields": - number of fields (int) } }, "taskCurrentNum":, - number of processed tasks (int) "taskTotalNum":, - total number of tasks (int) "taskAffectedNum":, - number of affected tasks (int) "foundObjectsCount":, - total number of found objects (int) "taskMessage":"" - task message (string) }

Add a task to start a search or anonymization by a given template

Usage Example

For anonymization of “User A” by replacing them to “User B”

 

Method, path

Query parameters

Body

Response

Notes

 

Method, path

Query parameters

Body

Response

Notes

POST

/rest/actonic-gdpr/1.0/data-cleaner-template/-1

"-1" template ID, always static for quick user anonymization template

{ "id":-1, "name":"User Anonymization template (user1→user2)", "jql":"", "objects":["summary", "description", "comment","history", "creator","reporter", "assignee","comment-author", "attachment-author", "worklog-author", "watcher", "vote", "customfield_10107", "customfield_10216", "customfield_10612", "customfield_10401", "customfield_10613", "customfield_10204", "customfield_10203", "customfield_10403", "customfield_10402"], "notificationType":"none" }

 

200:

{ "id":-1, "enabled":false, "isDraft":false, "name":"User Anonymization template (user1→user2)", "jql":"", "objects":["summary", "description", "comment","history", "creator","reporter", "assignee","comment-author", "attachment-author", "worklog-author", "watcher", "vote", "customfield_10107", "customfield_10216", "customfield_10612", "customfield_10401", "customfield_10613", "customfield_10204", "customfield_10203", "customfield_10403", "customfield_10402"], "dataRulesCount":0, "notificationType":"none", "notificationParameters":{}, "issueCount":0, "isDeleting":false }

Update template for new anonymization process.

Use :id "-1" for quick user anonymization template

PUT

/rest/actonic-gdpr/1.0/data-cleaner-template/rules

none

{ "templateId":-1, "enabled":true, "name":"User Name replacement", "searchType":"user", "searchString":"user1", "replaceType":"user", "replaceString":"user2" }

200:

{ "id":1, "templateId":-1, "enabled":true, "name":"User Name replacement", "searchType":"user", "searchString":"user1", "replaceType":"user", "replaceString":"user2" }

Add a rule for user name replacement from “user1” to “user2”. It should be repeated for all the anonymized users.

PUT

/rest/actonic-gdpr/1.0/data-cleaner-template/rules

none

{ "templateId":-1, "enabled":true, "name":"User Display Name replacement", "searchType":"plain", "searchString":"User A", "replaceType":"plain-text", "replaceString":"User B" }

200:

{ "id":2, "templateId":-1, "enabled":true, "name":"User Display Name replacement", "searchType":"plain", "searchString":"User A", "replaceType":"plain-text", "replaceString":"User B" }

Add a rule for display name replacement from “User A” to “User B”. It should be repeated for all the anonymized users.

PUT

/rest/actonic-gdpr/1.0/data-cleaner-template/rules

none

{ "templateId":-1, "enabled":true, "name":"User Email replacement", "searchType":"plain", "searchString":"user1@users.com", "replaceType":"plain-text", "replaceString":"user2@users.com" }

200:

{ "id":3, "templateId":-1, "enabled":true, "name":"User Email replacement", "searchType":"plain", "searchString":"user1@admin.com", "replaceType":"plain-text", "replaceString":"user2@users.com" }

Add a rule for email replacement from “user1@users.com” to “user2@users.com”. It should be repeated for all the anonymized users.

PUT

/rest/actonic-gdpr/1.0/data-cleaner-template/rules

none

{ "templateId":-1, "enabled":true, "name":"User mention replacement", "searchType":"plain", "searchString":"[~user1]", "replaceType":"plain-text", "replaceString":"[~user2]" }

 

200:

{ "id":24, "templateId":-1, "enabled":true, "name":"User mention replacement", "searchType":"plain", "searchString":"[~user1]", "replaceType":"plain-text", "replaceString":"[~user2@users.com]" }

Add a rule for user mention replacement in text fields from “[~user1]” to “[~user2]”. It should be repeated for all the anonymized users.

GET 

/rest/actonic-gdpr/1.0/data-cleaner-template/anonymizer/custom-anonymizers

none

none

200:

[ { "id":1932425934, "pluginName":"GDPR (DSGVO) and Security for Jira", "name":"Shared Objects (dashboards owners, filter owners, projects leads, component leads)" } ]

Get a list of registered anonymizers, provided by Actonic or 3rd party apps. We will use it for built-in anpnymization post functions which process shared objects, like filters, dashboards, etc.

POST 

/rest/actonic-gdpr/1.0/data-cleaner-template/post-function

none

{ "name":"Custom anonymizer", "rules":"", "functionType":"custom-anonymizer", "anyRuleEnabled":true, "parameters":{"sourceUsers":"user1","targetUser":"user2","anonymizerIds":"1932425934"}, "templateId":-1 }

200:

Empty response

Add post-function to launch shared object anonymization after the main anonymization process

PUT 

/rest/actonic-gdpr/1.0/data-cleaner-template/task

none

{ "templateId":"-1", "type":1 }

 

200:

{ "id":1, "templateId":-1, "creator":"admin", "createDate":"Aug 19, 2020 7:06:09 PM", "duration":0, "startDateLabel":"", "status":0, "taskType":0, "meta": { "rules":{"25":"User Name replacement","26":"User Display Name replacement","27":"User Email replacement","28":"User mention replacement"}, "users":{"sourceUsers":"user1","targetUser":"user2"}, "other":{"numberOfRules":4.0,"numberOfFields":12.0} }, "taskCurrentNum":0, "taskTotalNum":0, "taskAffectedNum":0, "foundObjectsCount":0, "taskMessage":"Task queued" }

 

Add a task to start a search or anonymization by a given template