Migrating JIRA User Names/Keys to Atlassian Account ID
A special REST API (v1) end-point: /jira/users/{matrix}/accountId, is provided to migrate the old JIRA username/key for users that were imported from JIRA Cloud into the appropriate Atlassian account ID. It also associate Codebeamer users that were not imported from JIRA Cloud, with an Atlassian account ID for export to JIRA© Cloud.
The following table describes the endpoint parameters.
Parameter
Required
Meaning
server
Yes
URL of the JIRA Cloud instance, for example, https://<my-instance>.atlassian.net
username
Yes
The Atlassian account email address of an JIRA Cloud instance administrator.
password
Yes
The API token of the specified JIRA Cloud instance administrator.
When accessing this end point using a GET request, for example, by entering the URL into a Web browser address field, the parameters must be provided in the request URL, For example:
http://localhost:8080/cb/rest/jira/users/*=JIRA/accountId?server=https://<my-instance>.atlassian.net&username=<admin email>&password=<admin api token>
You can also use a POST request, for example using a tool such as Postman,:
http://localhost:8080/cb/rest/jira/users/*=JIRA/accountId
and provide the parameters as a JSON object in the request body:


{

"server" : "<my-instance>.atlassian.net",

"username" : "<admin email>",

"password" : "<admin api token>"

}

Replace http://localhost:8080/cb/rest in the preceding examples with the appropriate REST API (v1) URL of your Codebeamer instance, and replace <my-instance>, <admin email> and <admin api token> with the appropriate values for your JIRA Cloud instance.
The {matrix} variable in the request path specifies which Codebeamer users should be processed. In the form of a semicolon-seperated list of <CB user id/name> = <JIRA user name/key> pairs.
You can use the special pair *=JIRA, to refer to all Codebeamer users, that were imported from JIRA and that do not already have an Atlassian account ID.
* 
If you had manually created Codebeamer users, to represent JIRA users, in order to avoid the extra work, that is required to activate imported users, then these users do not have an associated JIRA username and key and as result are not matched by /jira/users/*=JIRA.
In order to associate these users with an Atlassian account ID, you must specify them explicitly, using bond=Admin, which reads as:"Associate the Codebeamer user bond with the Atlassian account ID of the JIRA Cloud user, whose name or key is Admin".
If the Codebeamer user has a JIRA user name and key or its name is the same than the JIRA user name/key. Then you can simply say: <CB user id/name> =* for example bond=*
You can also explicitly provide JIRA user names and keys, when migrating users that were previously imported from JIRA an earlier Codebeamer releases , where you know that the stored JIRA user name and key is no longer valid.
For example, *=JIRA;Klaus=klaus.mehling[; …]
A similar situation can also occur if you have trackers that are synchronized with JIRA Cloud, and you assign items in these trackers to users that do not have an Atlassian account ID. In this case, the issue assignee will be lost when exported to JIRA.
Was this helpful?