Hi,
Is it possible to get the user properties with the JIRA API.
I try to custom the customer portal with some javascript and I need this informations
Can you help me ?
Best regards
Community moderators have prevented the ability to post new answers.
If you want to get user properties using Java Script, then you should use REST API. You can use GET /rest/api/2/user/properties
You can find more info here:
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/user/properties
Hi
thanks for your answer I finally get the informations.
I saw that I have to create the properties with a PUT /rest/api/latest/user/properties/ but when I try this method I had a 405 error .
I try with the post method and it's not work.
Don't you know where it comes from?
For information: this is the code I use :
var user = getCurrentUserData(); var userCredentials = "userCredentials" AJS.$.ajax({ url: `/rest/api/latest/user/properties/`, type: "PUT", dataType: "json", async: false, headers: { "Authorization": "Basic " + userCredentials, "Content-Type": "application/json", 'X-Atlassian-Token': 'nocheck' } data: { valideRGPD: "false", userKey: `${user}` } }).done(function (data) { alert("Success"); }).fail(function () { alert("Failed"); });
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your rest call is not correct. You should use
PUT /rest/api/2/user/properties/{propertyKey}
but you use
/rest/api/2/user/properties/ which is the GET method and you get the error, that the PUT method does not exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So if I understood what you say I need to use the following url:
/rest/api/latest/user/properties/valideRGPDto create the properties valideRGPD and set the value in the data field ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is right.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok thank you for your reply, I will test this
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.