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: 

Creating user using REST API

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
465 Views, 2 Replies

Creating user using REST API

Hi,

 

I am trying to create a user using REST API.

I am using POSTMAN app.

 

I am using following

https://xxxdev.autodeskplm360.net/api/rest/v1/users

Content-Type = application/json

 

{
  "user":[
         {
                            "firstName": "PLM",
                            "lastName": "User02",
                            "licenseType": {
                                "value": "S",
                                "label": "Standard"
                            },
                            "userStatus": {
                                "value": "Y",
                                "label": "ACTIVE"
                            },
                            "resetPasswordOnNextLogin": false,
                            "email": "plmuser02@xxx.com",
                            "organization": "",
                            "address1": "",
                            "address2": "",
                            "city": "",
                            "state_prov": "",
                            "country": "",
                            "postal": "",
                            "userTimeZone": {
                                "value": "America/Los_Angeles",
                                "label": "Pacific Standard Time"
                            },
                            "showThumbnailPreference": "Y",
                            "uomPreference": {
                                "value": "metric",
                                "label": "Metric"
                            }
                                            
                        }
        
 ]
}

 

I keep getting following:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errors
    xmlns:ns2="http://ns.autodesk.com/storage/v1">
    <httpStatusCode>400</httpStatusCode>
    <error>
        <message>Invalid request {0}</message>
    </error>
</errors>

 

Can someone please guide me to correct payload format.

 

Regards,

Ravi

2 REPLIES 2
Message 2 of 3
dahalb
in reply to: Anonymous

Hi ravidalli:

 

Missing in your request are some required fields: loginName, password

The required fields are: loginName, password, firstName, lastName, email and licenseType

These fields should also be unique: loginName, email

 

Please try your request as follows:

POST rest/v1/users

Content-Type: application/json

 

Data&colon;

{
   "loginName":"MyLoginName",
   "password":"secret?",
   "firstName":"plm",
   "lastName":"360",
   "licenseType":{
      "value":"S"
   },
   "userStatus":{
      "value":"Y"
   },
   "email":"plm360@email.com",
   "userTimeZone":{
      "value":"Canada/Eastern"
   },
   "showThumbnailPreference":"N",
   "uomPreference":{
      "value":"metric"
   }
}

 

A successful response, if your loginName and email is unique would be an HTTP status code of 201, with a header value "Location" pointing to the URL of the newly created user.

 

 

 

 

 

Tags (2)
Message 3 of 3
Anonymous
in reply to: dahalb

Thank you, I was able to create using the payload, it also works well with our single sign on integration.

 

Regards,

Ravi

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

Post to forums  

Autodesk Design & Make Report