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

CROWD REST API - adjusting the active property

Andrew_Sheedy December 9, 2012

Has anyone had any success with manipulating the user's active property via REST?

As the active property is not an attribute, it is unclear as to how to toggle this state from the Crowd REST API documentation.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Andrew_Sheedy December 9, 2012

I've gotten a little further with this adventure.

By using IntelliJ's REST client, if I perform a PUT request to:

http://CROWD_URL:8095/crowd/rest/usermanagement/1/user?username=USERNAME

With the following body:

{"name":"USERNAME", "active": true}

Then I meet the requirements of this issue - it'd be great to get this into the documentation as the name property of the JSON is required by crowd (even though the username is specified in the request parameters.

1 vote
ddesign June 11, 2014

Just in case anyone else stumbles across this like I did. Here's some additional IMPORTANT information, followed by some tags to help out google's web crawler.

So, when you run this query, it expects ALL parameters. If you do as Andrew stated above, all other properties for the user are completely reset. So the correct post fields in the curl request body should be:

{
	"name": "the_username",
	"first-name": "John",
	"last-name": "Doe",
	"display-name": "Crowd API needs better documentation, i mean... John Doe",
	"email": "johndoe@thankgodforgoogle.com",
	"password": {
		"value": "password"
	},
	"active": true,

	"attributes": {
		"attributes": []
	}
}

Yes indeed, if you don't include these values, they are reset to NOTHING. Password too, even though it has it's own REST url. The attributes, luckily for me, are not custom. So I needn't worry about specifying them, as seen above (empty array value). If they would have just put this on the documentation website, it would have saved me an hour of wasted time. good luck to whoever finds this. I'm sure you and I have a plethora of additional issues to encounter regarding this under-documented api.

Tags:

"Crowd api update user active"

"Crowd api set user active"

"Crowd api PUT active"

"Crowd api disable user account"

"null for user"

"username must match"

TAGS
AUG Leaders

Atlassian Community Events