Skip to main content
Question

Creating an assyst User via API

  • October 17, 2022
  • 2 replies
  • 386 views

Forum|alt.badge.img+8
  • Hero (Customer)
  • 44 replies

Hi All, 

Wondering if anyone has been able to set up an API that creates an assyst User. We’re looking to get the correct JSON code syntax to create an assystUser, however we keep hitting the following error: 

“Invoke-RestMethod : roleJob Title is required.server.validation.errors.mandatoryUserRolecom.axiossystems.assyst.dto.userConfiguration.AssystUserDtomandatoryUserRoleshortCodeShortcode is 
required.server.validation.errors.mandatoryShortCodecom.axiossystems.assyst.dto.userConfiguration.AssystUserDtomandatoryShortCodeservDeptService Department is 
required.server.validation.errors.mandatoryServDeptcom.axiossystems.assyst.dto.userConfiguration.AssystUserDtomandatoryServDeptnameName is 
required.server.validation.errors.mandatoryNamecom.axiossystems.assyst.dto.userConfiguration.AssystUserDtomandatoryNameA complex validation error has been detected by the 
application.rest.exceptions.ComplexValidationExceptionComplexValidationException”

 

Our current JSON code is set out as such: 

{

        "assystUser":{

            "resolvingParameters" : [{

                "parameterName" : "shortCode",

                "parameterValue" : "kevin.test@test.com"

            }],

            "resolvingParameters" : [{

                "parameterName" : "Name",

                "parameterValue" : "Kevin Test"

            }]

            "userRole":{

                "resolvingParameters" : [{

                    "parameterName" : shortCode,

                    "parameterValue" : "NOT USED"

                }],

                    "resolvingParameters" : [{

                    "parameterName" : "shortCode",

                    "parameterValue" : "NOT USED"

                }]

            },                        

            "servDept":{

                "resolvingParameters" : [{

                    "parameterName" : "ID",

                    "parameterValue" : 187

                }],

                    "resolvingParameters" : [{

                    "parameterName" : "Name",

                    "parameterValue" : "ACL"

                }]

 

Any suggestions gratefully received! 

2 replies

morevalueit
Do Gooder (Customer)
Forum|alt.badge.img+1
  • Do Gooder (Customer)
  • 10 replies
  • October 28, 2022

Yes it is possible. We are using it for synchronizing assyst-User with activeDirectories.

Try using “role” insted of “userRole”.

And for creating are Shortcode and Name-Field are required.


Forum|alt.badge.img+12
  • Hero (Customer)
  • 141 replies
  • January 9, 2023

Just an update on this one. We managed to get to the bottom of it. We needed to remove the surrounding “assystUser”:{}. I believe this was implied in the uri 

POST http://[SERVER IP]:[PORT]/assystREST/v2/assystUsers

{
    "shortCode" : "kevin.test@test.com",
    "name" : "Kevin Test",           
    "role": {
        "resolvingParameters" : [
            {
                "parameterName" : "shortCode",
                "parameterValue" : "TEST"
            },
            {
                "parameterName" : "name",
                "parameterValue" : "TEST"
            }
        ]
    },      
    "servDept": {
        "resolvingParameters" : [
            {
                "parameterName" : "shortCode",
                "parameterValue" : "TESTERS"
            },
            {
                "parameterName" : "name",
                "parameterValue" : "Testers"
            }
        ]
    }
}

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings