Creating a user

Ops Center Analyzer REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99ANA003-18

You can create a new user by specifying information such as the user ID and permissions. If you use an external authorization server to perform user authentication, you have to manage users on an external authorization server.

Execution permission

User Management

Request line

POST baseURL/v1/objects/Users

Request body

The structure of the request body and the object attributes are as follows:

UserInfo

{
        "userId":"...",
        "analyticsPermissions":["...", ...],
        "userManagementPermissions":["...", ...],
        "fullName":"...",
        "description":"...",
        "email":"...",
        "password":"...",
        "customGuiProperties":[{
            "key":"...",
            "value":"..."
        },
        :
        ]
}

UserInfo (Type: UserInfo)

Attribute

Type

Description

userId

string

User ID used for authentication.

analyticsPermissions

string[]

User permission for Ops Center Analyzer operations. "Admin" and "Modify" are set.

userManagementPermissions

string[]

User permission for manipulating user information. "Admin" can be set.

fullName

string

Name of the user (full name). Two consecutive dollar signs ($$) are converted into a single space.

description

string

Description.

email

string

Mail Address.

password

string

Password. Specify a string encoded in Base64.

customGuiProperties

KeyValue[]

Acquires the properties used to customize the GUI (for example, the dashboard). The contents of the properties change with each version. Do not specify the properties in the body of the request because these properties are only used with the Ops Center Analyzer GUI.

customGuiProperties (Type: KeyValue)

Attribute

Type

Description

key

string

Key of a property

value

string

Value of a property

Response body

The structure of the response body and the object attributes is as follows:

UserInfo

{
        "instanceID":"...",
        "userId":"...",
        "analyticsPermissions":["...", ...],
        "userManagementPermissions":["...", ...],
        "fullName":"...",
        "description":"...",
        "email":"...",
        "customGuiProperties":[{
            "key":"...",
            "value":"..."
        },
        :
        ],
        "defaultGuiProperties":[{
            "key":"...",
            "value":"..."
        },
        :
        ]
}

UserInfo (Type: UserInfo)

Attribute

Type

Description

instanceID

string

Instance ID.

userId

string

User ID used for authentication.

analyticsPermissions

string[]

User permission for Ops Center Analyzer operations. "Admin" and "Modify" are set.

userManagementPermissions

string[]

User permission for manipulating user information. "Admin" can be set.

fullName

string

Name of the user (full name). Two consecutive dollar signs ($$) are converted into a single space.

description

string

Description.

email

string

Mail Address.

customGuiProperties

KeyValue[]

Acquires the properties used to customize the GUI (for example, the dashboard). The contents of the properties change with each version. Do not specify the properties in the body of the request because these properties are only used with the Ops Center Analyzer GUI.

defaultGuiProperties

KeyValue[]

Specifies the data that is acquired from the server in order to customize the Ops Center Analyzer GUI (for example, the dashboard). The contents of the properties change with the version.

customGuiProperties (Type: KeyValue)

Attribute

Type

Description

key

string

Key of a property

value

string

Value of a property

defaultGuiProperties (Type: KeyValue)

Attribute

Type

Description

key

string

Key of a property

value

string

Value of a property

Status codes

Status code

Reason phrase

Description

201

Created

Success.

400

Bad Request

The format of the request body is invalid.

401

Unauthorized

No login privilege.

403

Forbidden

No update privilege.

409

Conflict

A resource with the same userId exists.

412

Precondition Failed

The server is not available.

500

Internal Server Error

Server processing error.

Example code

[Request Header]
POST /Analytics/v1/objects/Users
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
Host: localhost:22015
Accept: application/json
Content-Type: application/json

[Request Body]
{
 "userId":"Test_UserId",
 "analyticsPermissions":[ "Admin", "Modify" ],
 "userManagementPermissions":[ "Admin" ],
 "fullName":"FullFull",
 "description":"template",
 "email":"admin@example.com",
 "password":"YWJjZGVm"
}

[Response Header]
HTTP/1.1 201 Created
Date: Wed, 20 Jul 2016 02:10:42 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO 33659a74fcee4358dc272b34eca6ded1bf1131ec_YXZvNFIMehp3UB4jbmVyPGUgT3Q=_V0810
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Content-Type: application/json


[Response Body]
{
  "instanceID" : "USER_146898064241918",
  "userId" : "Test_UserId",
  "analyticsPermissions" : [ "Admin", "Modify" ],
  "userManagementPermissions" : [ "Admin" ],
  "fullName" : "FullFull",
  "description" : "template",
  "email" : "admin@example.com"
}