Change user data mapping

Wednesday, March 15, 2023


I need some advice on the following topic: we use SpiraTest with a synchronisation to Jira. Now the jira-usernames are changed. I can enter them via the web-UI (edit user/data mapping), but this is not a feasible way due to the amount of users to change (>1000).

I thought I could use the REST api to do this. But if I do a POST to data-mappings/{data_sync_system_id}/users with the updated values (only the ExternalKey is changed) nothing is changed though I get an http 200 status (checked with the web UI and via a GET to data-mappings/{data_sync_system_id}/users).

The documentation also says that the POST is used to "Add new user data mapping entries". I want to update them.

So what is the preferred way to achieve this?

Best regards

3 Replies
Wednesday, March 15, 2023
re: stwacker Wednesday, March 15, 2023

Hi Stephan

You probably need to use the DELETE API method to first remove the mapping, then POST to add the new mapping (external key).

Alternatively, if you are on premise, there is direct access to the data in the TST_DATA_SYNC_USER_MAPPING table



Friday, March 17, 2023
re: inflectra.david Wednesday, March 15, 2023

Hi David,

thanks for the hint.

The DELETE-method is undocumented. Where can I find the correct call/parameters?

Currently I do a DELETE data-mappings/{data_sync_system_id}/users with the body

      "ProjectId": null,
      "InternalId": x,
      "ExternalKey": "xyz",
      "Primary": true

With this call I get the error "Method not allowed".

Best regards


Tuesday, March 21, 2023
re: stwacker Friday, March 17, 2023

I could also write a selenium script, but thats not a very elegant solution...


Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885


  • Started: Wednesday, March 15, 2023
  • Last Reply: Tuesday, March 21, 2023
  • Replies: 3
  • Views: 1525