Registering a user

Ops Center Common Services REST API Reference Guide

Version
10.9.x
File Size
533 KB
Audience
anonymous
Part Number
MK-99OPS003-06
The following request registers a user.

Execution permission

You must be a system administrator or a security administrator.

Request line

POST base-URL/security/v1/users

Request message

Object ID
None.
Query parameters
None.
Body
{
    "username": "John_Smith",
    "firstName": "John",
    "lastName": "Smith",
    "email": "john_smith@example.com",
    "description": "John's account",
    "enabled": true
}

Attribute

Type

Description

username

string

(Required) Username

Specify a character string that is no more than 255 characters.

You can use the following characters:

0-9 A-Z a-z ! # $ % & ' ( ) * + - . = @ ^ _ | $

firstName

string

(Optional) First name of the user

Specify a character string that is no more than 64 characters.

lastName

string

(Optional) Last name of the user

Specify a character string that is no more than 64 characters.

email

string

(Optional) Email address

Specify a character string that is no more than 254 characters.

description

string

(Optional) Description of the user account

Specify a character string that is no more than 128 characters.

enabled

boolean

(Required) Whether to enable the user account

  • true: Enables the user account.
  • false: Disables the user account.

Response message

Body
None.

Coding example

curl -v -X POST -H "Content-Type:application/json" -s "https://example.com:443/portal/security/v1/users" -d @./request.json  -H "Authorization:Bearer eyJhbxxx"
Tip: Because this request uses SSL communication, you must either run the curl command with the root certificate of the Common Services server certificate specified for the --cacert option, or run the command with the -k option specified. (The -k option runs the command by ignoring SSL errors.)