Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

User deactivation using Rest API

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
rdalli
505 Views, 2 Replies

User deactivation using Rest API

Hi,

 

I am trying to deactivate a user using REST API. I am usting the following API

 

https://inphitraining.autodeskplm360.net/api/rest/v1/users/xxxx?Content-Type=application/json&Accept=application/json

{
"userStatus":{"value":"Y"}
}

 

I get "HTTP Status 415 - Unsupported Media Type"

 

Has anyone attempted doing this? If yes please provide the JSON payload.

 

 

Regards,

Ravi

Tags (2)
2 REPLIES 2
Message 2 of 3
gasevsm
in reply to: rdalli

Hi Ravi,

 

To update (PUT) a user, use similar payload as when used to create (POST) a user.

The major difference is you need to provide the userID at the end of the endpoint.

 

  POST /api/rest/v1/users : Create a new user

  PUT /api/rest/v1/users/<userID> : Update user matching userID

 

Hope this helps,


Martin Gasevski | Fusion 360 Team Product Manager
Message 3 of 3
rdalli
in reply to: gasevsm

Thank you Martin,

 

I was able to use the APIs and deactivate a user.

 

For othher who want to update users using REST, below is what I used.

 

PUT https://inphitraining.autodeskplm360.net/api/rest/v1/users/usedid

Header=> Content-Type = application/json

Payload:

{
"loginName":"JohnDoe",
"password":"Password1",
"firstName":"John",
"lastName":"Doe",
"licenseType":{"value":"S"},
"userStatus":{"value":"N"},
"email":"jdoe@abc.com",
"userTimeZone":{"value":"America/Los_Angeles"},
"showThumbnailPreference":"N",
"uomPreference":{"value":"metric"}
}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report