Hitachi

JP1 Version 12 JP1/Automatic Operation Command and API Reference 


1.6.8 listservices (outputting the list of services or service templates)

Description

This command outputs the CSV-formatted list of the services or service templates registered in JP1/AO.

You can output the list of the services, including the vendor name and version number, or of the service templates. Note that debug services are not output.

Syntax

listservices
     /output {services | servicetemplates}
     /file output-file-path
     [/encoding {UTF-8 | Shift_JIS}]
     /user user-ID
     {/password password | /passwordfile password-file-path}

Arguments

/output {services | servicetemplates}

This option specifies which information is output in the list.

  • services

    Outputs the list of services.

  • servicetemplates

    Outputs the list of service templates.

/file output-file-path

This option specifies the absolute or relative path to the output file. An error occurs if the specified file exists.

/encoding {UTF-8 | Shift_JIS}

This option specifies the encoding of the output file. If this option is omitted, the default encoding of the OS is used.

/user user-ID

This option specifies the user ID for JP1/AO.

The number of possible characters is in the range from 1 to 256 characters.

The possible characters are half-width alphanumeric characters, !, #, $, %, &, ', (, ), *, +, -, ., =, @, \, ^, _, and |.

This option is not case sensitive.

/password password

This option specifies the password of the user indicated by the user option.

You must specify either this option or the passwordfile option. If both options are specified, or if neither are specified, then you will get an error.

The number of possible characters is in the range from 1 to 256 characters.

The possible characters are the same as those for the user option.

/passwordfile password-file-path

This option specifies the absolute or relative path to the password file for the user specified in the user option. You can create a password file by using the encryptpassword command.

You must specify either this option or the password option. If both options are specified, or if neither are specified, then you will get an error.

Output format

The output items are output in CSV format in a single line per service or service template.

The values for each output item are enclosed in double quotation marks ("). Any double quotation mark (") contained in the value is escaped with another one added in front of the mark.

Table 1‒7: Output format of the list of services or service templates

Type of output information

Output item

Content

List of services

Name

Service name

Favorite

Favorite-setting state

Description

Description

Service Group

Service group name

Service Template

Service template name

Vendor Name

Vendor name

Version

Service version

Tags

Tags set for the service

Status

Status

Create Date

Creation date and time

Modify Date

Date and time of the last modification

Submit Date

Date and time of the last submission

Reset Date

Reset date and time

Executed Count

Number of task executions

Completed Count

Number of successful terminations

Last Failed Date

Date and time of the last failure

Failed Count

Number of failed attempts

Submit Count

Number of service executions

ID

Service ID

Latest

Whether the service template is the latest version

Supported Schedule Type

Selectable schedule types

Supported Action Type

Operations that can be performed for the task

List of service templates

Name

Service template name

Vendor

Vendor name

Version

Service template version

Description

Description

Service Template Key Name

Service template ID

Vendor ID

Vendor ID

Tags

Tags set for the service template

Registered

Creation time

Updated

Time of the last update

Latest Version

Whether the service template is the latest version

Used Services

Number of services that use the service template

Used Service Templates

Number of service templates that use this service template as a component

Outdated Services

Whether any services are using an outdated version of the service template

Outdated Component

Whether an outdated component is being used

Supported Schedule Type

Selectable schedule types

Supported Action Type

Operations that can be performed for tasks that use this service template

Release State

Release state

The following list shows some examples of file outputs.

Located in

In Windows:

JP1/AO-installation-folder\bin

In Linux:

/opt/jp1ao/bin

Execute permission

Execute the command as a user with Administrator permissions for the OS.

To output a list of services, the Admin, Develop, Modify, or Submit role must be set for the target service groups from the user group that the user who executes the command belongs to. The command does not output a list of services for any service groups for which none of these roles are set.

To output a list of service templates, the Admin, Develop, or Modify role must be set for the target service groups from the user group that the user who executes the command belongs to.

Return code

The following table lists the return codes from the command.

Return code

Description

0

The command succeeded.

1

The argument is invalid.

2

The command execution has been interrupted.

3

The service status is invalid.

4

One of the other commands is running.

5

Communication failed.

6

Authentication failed.

7

An invalid path is specified.

8

The file with the same name already exists in the output path.

9

The specified path does not exist.

10

The specified path is not accessible.

12

An invalid encoding is specified.

13

Outputting the file failed.

14

You do not have permission to execute the command.

160

Obtaining the list of services failed.

161

Obtaining the list of service templates failed.

255

The command execution has been interrupted due to an error other than the above.

Example

The following examples show how to use the command for each case.