/
CreateUser RESTified API

CreateUser RESTified API

5.4.0

A pass-through API  to Scheduling (when configured) which allows the Scheduling's CreateUserRequest API to be called.

The sp:CreateUserRequest API method can be used to add new users to the Scheduling system, as an alternative to the ServiceManager UI for adding users.

On this page:

Related pages:

Resource URL Summary


Pass Through Call to Scheduling's "CreateUserRequest" API

PUT /up/v5/rest/scheduling/CreateUser  

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.


API Specifics


Pass Through Call to Scheduling's "CreateUserRequest" API

This RESTified API will perform a pass-through call to the Scheduling sub-system's "CreateUserRequest" API (when configured).

URL

PUT /up/v5/rest/scheduling/CreateUser

HTTP Request Body

This request requires a JSON object supplied in the HTTP request body, which defines the parameters that will be passed through to the Scheduling "CreateUserRequest" API.

CreateUser Object Format

EmpCreate
{
  "userId": "",
  "user:" {
	"name": "",
	"enabled": "",
	"profile": "",
	"authentication": "",
	"password": "",
	"unitType": "",
	"respUnit": "",
  }
}



CreateUser Object Properties (Bold property name indicates required field)

PropertyTypeLengthDescriptionReq?
userId

string

SS: 50

A new User ID for the user to be created. The User ID must not already exist in the ServiceOptimizer database.

SS Field: empID

Yes

userobjectN/A

Required section containing the details of the new user to be added.


PropertyTypeLengthDescriptionReq?
namestringSS: 50

A new User ID for the user to be created. The User ID must not already exist in the ServiceOptimizer database.

SS Field: user.name

Yes

enabledboolean

If true, the new user is permitted to use ServiceManager.

SS Field: user.enabled

Yes

profilestringSS: 10

The user profile for the user to be created. The user profile must exist in the ServiceOptimizer database.

SS Field: user.profile

Yes

authentication

string

SS: AuthType (string)

SS: See Valid Values

Either SECURED or LDAP.

If LDAP, then the new user's login will be authenticated using the configured external LDAP server; otherwise, authentication will be performed by Scheduling. See password below.

SS Field: user.authentication

SS Valid Values: "INTERNAL", "LDAP", "SECURED"

Yes

passwordstringSS: 50

The new user's password. Ignored if authentication is LDAP.

SS Field: user.password


unitType

string

SS: UserUnitType (string)

SS: See Valid Values

The values can be ROOT,BRU,DRU or FRU. Defaults to ROOT if omitted during creation.

SS Field: user.unitType

SS Valid Values: "ROOT", "BRU", "DRU", "FRU", 

 

respUnitstringSS: 8

If unitType is ROOT, respUnit must be the top level RU, and will default to this if omitted.

If unitType is BRU, respUnit must be an BRU reference.

If unitType is DRUrespUnit must be an DRU reference.

If unitType is FRU, respUnit must be an FRU reference.

SS Field: user.respUnit

Yes

Yes


HTTP Response

Success

On success, a JSON-formatted version of the Scheduling "CreateUserRequest" API response will be returned.

{
    "Success": true,
    "Code": 0,
    "Message": "OK",
    "Payload": {
        "result": {
            "type": "OK",
            "code": "0"
        }
    }
}

Error

On error, a JSON-formatted version of the Scheduling "CreateUserRequest" API response will be returned.

{
    "Success": false,
    "Code": 9,
    "Payload": {
        "returnCode": {
            "type": "Error",
            "code": "SCH Error Code"
        }
    }
}

Return Codes

In addition to the  Standard Return Codes, and the Scheduling Error codes, the possible Return Codes from this API are:

 Click here to expand...
  • SP_USERID_EXISTS (702)
  • SP_PROFILE_DOES_NOT_EXIST (704)
  • SP_UNIT_REF_INVALID (705)





Related content

Create User SOAP API
Create User SOAP API
More like this
Create User SOAP API
Create User SOAP API
More like this
Integration ServiceOptimizer Create User SOAP API
Integration ServiceOptimizer Create User SOAP API
More like this
UpdateUser RESTified API
UpdateUser RESTified API
More like this