Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to send JSON/String back to change the original data?

Tzim October 16, 2019

I set up Jira and now want to start by changing some of the details about my own profile. Right now I have the code to get the JSON with my profile information, can I somehow send that back and actually change the information with it?

$username = 'test';$password = 'test123';$curl_handle=curl_init();curl_setopt($curl_handle, CURLOPT_URL,'http://localhost:8080/rest/api/2/user?username=test');curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");curl_setopt($curl_handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);$query = curl_exec($curl_handle);$wantedString = json_decode($query);print_r($wantedString->name);$wantedString->name = 'test1';print_r($wantedString);

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events