Hello, I need to migrate hundreds of customers from another help desk system. I would prefer to avoid telling them to re-register on the new Jira Service Desk portal.
I have learned that I can create a new customer without sending the invitation mail and then set his password, but I'm dealing with hundreds of them, is there a way to do this by using a CSV file?
My approach is to use the rest api for this
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/user-createUser
I use excel to load the csv. Then I use formulas i.e. concatenate to stitch together data and fixed snippets into a ‘curl’ command to call the REST API for each row of data.
the results are just pasted into a command window.
Thank you @Tom Lister,
I am totally new to REST and curl. Should this be the shape of the resulting command?
curl --request POST \ --url 'https://my-domain.atlassian.net/rest/api/2/user' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '"{\"name\":\"Fred\",\"email\":\"fred@example.com\",\"displayName\":\"Fred F. User\",\"password\":\"1234\"}"'
But then, how could I create multiple customers at once?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what format do you have your user data in?
i’ve used SQL in some cases e.g. for adding a user to a group
SELECT *,
concat(
'curl -insecure -u admin:password -X POST --data "{\\"name\\": \\”',newval,'\\"}" -H "Content-Type: application/json" https://localhost:8080/rest/api/2/group/user?groupname=', parent_name
) as curl
FROM jiradb.groupmap
where user_name != newval
I’ve used excel by putting the fixed parts of the curl statement in static cells and creating a formula to turn each line of a sheet into a runnable command. Do you need more detail on that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If you open your csv data in excel so that your user data is in cols A,B,C,D for values of name, email, display-name, password
Put the surrounding clauses required in other cells
e.g. E1 contains
curl --request POST \ --url 'https://my-domain.atlassian.net/rest/api/2/user' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '"{\"name\":\"
F1 contains
\",\"email\":\"
etc for all the surrounding snippets
then in the next free cell on row 1 add a formula
=concatenate($E$1, A1, $F$1, A2 etc)
and so on to join all parts to form one command. The dollar values are fixed in place, the other values will change as you copy the formula down for the number of rows you have. This formula column can then be cut and pasted into a command window
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "/rest/api/2/user" API is not what I need, it creates (just as the name implies) users, not customers. I guess that what I need to use is the "/rest/servicedeskapi/customer" API, altough it does not seem to accept a 'password' field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
There a free REST API Browser available from the marketplace that you can use to experiment with REST calls to figure out the functionality you'll get from each call
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm learning the hard way through PHP/Unirest calls. If I try to add a 'password' to the "Create customer" API, I get a huge series of Java exceptions.
I have read the documentation and it seems there is no way to create a customer along with his password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But wait, there's more.
Customers created with the "/rest/servicedeskapi/customer" API appear into the "https://softing.atlassian.net/admin/jira-service-desk/portal-only-customers" page, but when they log in, they are not tied to any JSD project!
...And now the "https://softing.atlassian.net/admin/jira-service-desk/portal-only-customers" page shows the following error: "An unknown error has occurred trying to contact our servers, please try again. If the issue persists please raise a ticket with support."
...And it looks like I am not able to raise that ticket, probably because I'm still in the 7-days evaluating period.
Not at all a great experience until now...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.