Set User Property with API

Thomas Radl May 15, 2018

Hi all,

 

we want store some information along with our customer/user accounts. (phone numbers, etc..)

I have tried to use the api i can't get it work - maybe someone could help me.

 

According to the rest documentation (Set User Properties) i have to send the property i want to add like that:

curl -D- -u api:mypass -X PUT -k https://jira.domain.local:8443/rest/api/2/user/properties/phonetest?username=username

 

this gives me an error: {"errorMessages":["The property value can not be empty."],"errors":{}}

i have tried to add &value=myvalue but that doesn't work...

also the rest documentation do not say how to submit the value for the new property, the only parameter which documented are userkey and username

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2018

Hello,

you should provide JSON with your REST call, in which you pass the value:

{"value":"your value"}

Thomas Radl May 16, 2018

Thank You!

That works!

Suggest an answer

Log in or Sign up to answer