Hitachi

JP1 Version 12 JP1/Operations Analytics REST API Reference Guide


2.1.1 Obtaining Authentication

This API acquires a list of authentication information to be used by JP1/OA for connections to monitored resources.

Execution permission

Admin

API version

v1

Request format

GET http[s]://host:port/Analytics/version/objects/Credentials

Request body

Not applicable.

Response body

The structure of the response body and the object attributes are as follows:
{
        "data":[{
            "instanceID":"...",
            "name":"...",
            "credentialType":"...",
            "userId":"...",
            "passwordNotRequired":"...",
            "portNumber":"...",
            "ssl":"...",
            "domainname":"...",
            "namespace":"...",
            "community":"...",
            "snmpVersion":"...",
            "userName":"...",
            "authenticationEnabled":"...",
            "authenticationProtocol":"...",
            "privacyEnabled":"...",
            "privacyProtocol":"...",
            "numOfRelatedResources":"..."
        },
        :
        ],
        "pagination":{
            "page":"...",
            "pageSize":"...",
            "numPages":"...",
            "totalCount":"..."
        },
        "count":"..."
}

Collections (Type: Collections)

Attribute

Type

Description

data

Credential[]

A list of Credential objects. For details about Credential, see the table below.

pagination

Pagination

Page information. This parameter is displayed only when the relevant resource exists.

count

int

Number of data items that meet the conditions.

data (Type: Credential)

Attribute

Type

Description

instanceID

long

ID for identifying instances.

name

string

Name of authentication information

credentialType

enum

Protocol used for connections to monitoring targets.

(For details about the specifiable values, see the table ProtocolType in List of enumerators.)

The specifiable values are as follows:

  • WMI
  • SSH
  • WBEM
  • SNMP

userId

string

Use 64 or fewer characters. If you use SNMP v3 for connections to monitoring targets, the value of the username member is set.

passwordNotRequired

boolean

Whether a password is needed for authentication. If this member is omitted, false is set. This setting takes effect only if WMI is used for connection to the monitoring target.

・true: A password is not needed

・false: A password is needed

portNumber

int

Port number. This member is only set when the protocol used for connections to monitoring targets is SSH, SMI-S WBEM, or SNMP.

ssl

boolean

Whether to use SSL (HTTPS) for connections to monitoring targets.

・true: SSL is used

・false: SSL is not used

If this member is omitted, false is set. This member is only enabled when SMI-S WBEM is used for connections to monitoring targets.

domainname

string

Domain name. This member is only enabled when WMI is used for connections to monitoring targets.

namespace

string

Name space. This member is only enabled when SMI-S WBEM is used for connections to monitoring targets.

community

string

Community name. This member is only enabled when SNMP is used for connections to monitoring targets.

snmpVersion

enum

SNMP version. This member is only enabled when SNMP is used for connections to monitoring targets.

(For details about the specifiable values, see the table SnmpVersion in List of enumerators.)

The specifiable values are as follows:

  • V1_V2C
  • V3

userName

string

User name used for authentication. Use 64 or fewer characters. Only specify this member when using SNMP v3 for connections to monitoring targets.

authenticationEnabled

boolean

Whether to perform SMTP authentication.

・true: SMTP authentication is enabled

・false: SMTP authentication is disabled

If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets.

authenticationProtocol

enum

Protocol for authentication. Only specify this member when using SNMP v3 for connections to monitoring targets.

(For details about the specifiable values, see the table AuthenticationProtocol in List of enumerators.)

The specifiable values are as follows:

  • MD5
  • SHA1

privacyEnabled

boolean

Whether to enable privacy.

・true: Privacy is enabled

・false: Privacy is disabled

If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets.

privacyProtocol

enum

Protocol for privacy. Only specify this member when using SNMP v3 for connections to monitoring targets.

(For details about the specifiable values, see the table PrivacyProtocol in List of enumerators.)

The specifiable values are as follows:

  • DES
  • AES128

numOfRelatedResources

int

Number of resources found by using authentication information.

pagination (Type: Pagination)

Attribute

Type

Description

page

integer

page

pageSize

integer

Size of the pages

numPages

integer

Number of the pages

totalCount

integer

Number of the objects

Status codes

Status code

Reason phrase

Description

200

OK

Success.

401

Unauthorized

No login privilege.

403

Forbidden

No reference privilege.

412

Precondition Failed

The server is not available.

500

Internal Server Error

Server processing error.

Example code

[Request Header]
GET /Analytics/v1/objects/Credentials HTTP/1.1
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: curl/7.33.0
Host: localhost:22015
Accept: application/json
Accept-Language: ja


[Response Header]
HTTP/1.1 200 OK
Date: Fri, 27 Nov 2015 05:21:49 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO 1d392a3baad40eab4e3a05ad6e71e3a1fcd577_Vlo8Y30Idn8EY0BdB3IEfwgabiA=_V0810
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked
Content-Type: application/json


[Response Body]
{
  "data" : [ {
    "instanceID" : 5,
    "name" : "smis",
    "credentialType" : "WBEM",
    "userId" : "smis",
    "portNumber" : 5989,
    "ssl" : true,
    "namespace" : "root/smis/current",
    "numOfRelatedResources" : 0
  }, {
    "instanceID" : 4,
    "name" : "snmpv3",
    "credentialType" : "SNMP",
    "userId" : "snmp",
    "portNumber" : 161,
    "community" : "",
    "snmpVersion" : "V3",
    "userName" : "snmp",
    "authenticationEnabled" : true,
    "authenticationProtocol" : "MD5",
    "privacyEnabled" : true,
    "privacyProtocol" : "DES",
    "numOfRelatedResources" : 0
  }, {
    "instanceID" : 3,
    "name" : "snmpv1",
    "credentialType" : "SNMP",
    "portNumber" : 161,
    "community" : "public",
    "snmpVersion" : "V1_V2C",
    "numOfRelatedResources" : 0
  }, {
    "instanceID" : 2,
    "name" : "ssh",
    "credentialType" : "SSH",
    "userId" : "ssh",
    "portNumber" : 22,
    "numOfRelatedResources" : 0
  }, {
    "instanceID" : 1,
    "name" : "wmi",
    "credentialType" : "WMI",
    "userId" : "wmi",
    "domainname" : "workspace",
    "numOfRelatedResources" : 0
  } ],
  "count" : 5
}