Hitachi

JP1 Version 12 JP1/Automatic Operation Command and API Reference 


2.9.6 Batch update of property values

Function

Updates the following property values in a batch:

Execution permissions

Admin role, Develop role, Modify role

API version

v1

Request format

PUT http://host:port/Automation/version/objects/PropertyValues

The following shows the structure of the request body.

{
  "pagination" : {  },
  "data" : [...],
  "count" : X#
}
#

X is replaced with a number.

The following table describes the object that can be specified as data (member) in the schema of a request.

Table 2‒77: Object that can be specified as data (member)

Function

Resource name

Number

Description

Property value

PropertyValue

1

PropertyValue resource to be updated

The following table describes the properties that must be specified for this object.

Resource name

Member name

Number

PropertyValue

instanceID

0 to n

value

readOnly

hidden

If you do not specify query parameters, service share properties are updated in a batch.

By specifying the serviceID query parameter, you can filter the property values to be updated in a batch. The attributes readOnly and hidden can be updated when you specify query parameters. Specify query parameters in the following format:

?query-parameter=value[&query-parameter=value...] 
Table 2‒78: Query parameter that can be set for the API function Batch update of property values

Query parameter

Filter condition

serviceID

Equal to the specified value

For details about other query parameters that can be specified, see 2.2.9 Query parameter.

Status code

The following table describes the various status codes that can be returned as the response to a request.

Status code

Message

Description

200

OK

Processing has been successfully completed.

400

Bad Request

The property value is invalid, or the resource cannot be edited.

401

Unauthorized

The user does not have login permission.

403

Forbidden

The user does not have update permission.

404

Not found

The permission is invalid, or the resource does not exist.

412

Precondition failed

The server is not available.

500

Server-side error

A server processing error occurred.

Response schema

The following shows the structure of the response body for a request.

{
  "data" : [ {"member-of-the-resources-for-property-value-functionality(PropertyValues)" : value ... }, ... ],
  "count" : number-of-data-items-that-match-the-conditions-specified-by-query-parameters(0-to-n)
}

Usage example

In the following example, the API function updates service share properties in a batch.

Request header:

PUT /Automation/v1/objects/PropertyValues HTTP/1.1
Host: 10.196.184.238:22015
Accept: application/json
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: useragent1
Accept-Language: ja

Response header:

HTTP/1.1 200 OK
Date: Mon, 14 Jul 2014 12:40:16 GMT
Server: Cosminexus HTTP Server
Access-Control-Expose-Headers: WWW-Authenticate
WWW-Authenticate: HSSO 1aa95d66e62d885b5583da3620bd166fd3a3_Vlo8Y30JBWoKHUYTEXAMXx5iHgQ=_V0810
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, HEAD, OPTIONS
Access-Control-Allow-Credentials: true
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: application/json

Response body:

{
  "data" : [ {
    "instanceID" : 25,
    "type" : "boolean",
    "keyName" : "com.hitachi.software.dna.sys.mail.notify",
    "value" : "false",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 24,
    "type" : "string",
    "keyName" : "com.hitachi.software.dna.sys.mail.smtp.server",
    "value" : "",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 18,
    "type" : "integer",
    "keyName" : "com.hitachi.software.dna.sys.mail.smtp.port",
    "value" : "25",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 5,
    "type" : "string",
    "keyName" : "com.hitachi.software.dna.sys.mail.smtp.userid",
    "value" : "",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 14,
    "type" : "password",
    "keyName" : "com.hitachi.software.dna.sys.mail.smtp.password",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 9,
    "type" : "string",
    "keyName" : "com.hitachi.software.dna.sys.mail.from",
    "value" : "",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 20,
    "type" : "string",
    "keyName" : "com.hitachi.software.dna.sys.mail.to",
    "value" : "",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 28,
    "type" : "string",
    "keyName" : "com.hitachi.software.dna.sys.mail.cc",
    "value" : "",
    "readOnly" : false,
    "hidden" : false
  }, {
    "instanceID" : 21,
    "type" : "string",
    "keyName" : "com.hitachi.software.dna.sys.mail.bcc",
    "value" : "",
    "readOnly" : false,
    "hidden" : false
  } ],
  "count" : 9
}