Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

19.9.1 Connection information file

File Name

nnnnn.json

Note: nnnn is any character

Usage

This connection information file contains the parameters required for a REST execution job to connect to a cloud service. Required when using REST execution jobs. Specify this file as a full path when registering a REST execution job.

File Location

Anywhere

File Format

This file is written in JSON format and the character encoding is written in UTF-8.

Parameters

The parameters of the request object

The request object must be specified.

Parameters

Key Name, Type, Default Value

Description

Connection URL (*)

Key name

url

Specify the URL of the connection destination in the following format.

  • When using https:

    https://host[:port number]/resource path

  • When using http:

    http://host[:port number]/resource path

The URL cannot exceed 2083 bytes. For the characters that can be used in the URL, follow the rules of the cloud service at the connection destination.

Type

string

Default value

None

HTTP Methods (*)

Key name

method

Specify the HTTP method.

Specify either GET/PUT/POST/DELETE.

Type

string

Default value

None

Credential Name

Key name

authName

Specifies the credential name of the request set by the jobschsetauthinfo command. For more information about the command, refer to the "4.9 jobschsetauthinfo Command [Windows][Linux]".

If omitted, authentication processing is not performed.

Type

string

Default value

None

Credential Name of proxy server

Key name

proxyAuthName

Specify the name of the proxy server credential set by the jobschsetauthinfo command. For more information about the command, refer to the "4.9 jobschsetauthinfo Command [Windows][Linux]".

If omitted, the proxy server is not used.

Type

string

Default value

None

Query Parameters

Key name

query

When you specify a query parameter in the connection destination URL, specify it in the format "parameter name: value". You can specify multiple parameter names and values in the query object, as follows.

query: {
  parameter name1: value1,
  parameter name2: value2,
  ...
}

If you want to set the value of the query parameter to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

query: {
  parameter name:@any key name@
}

Specify the parameter name and value in no more than 1024 bytes.

If omitted, the query parameter is not added to the URL.

Type

object

Default value

None

HTTP Request Header

Key name

header

If you specify additional HTTP request headers, use the format "header name:value". You can specify multiple header names and values in the header object as follows.

header: {
  header name1:value1,
  header name2:value2,
  ...
}

If you want to set the value of the request header to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

header: {
  header name:@any key name@
}

Specify the header name and value in no more than 1024 bytes.

If omitted, the request header is not added to the URL.

Type

object

Default value

None

HTTP Request Body

Key name

body

Specify the full path of the file you want to specify as the HTTP request body.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters, "/", ":","\",".","_" (underscore) and "-" (hyphen) can be specified for the file path.

If you want to set the value of the request body to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

If omitted, the request body is not set.

Type

string

Default value

None

HTTP response header

Key name

resHeader

Specify the full path of the file in which to save the header information of the HTTP response.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters,"/",":","\", ".","_" (underscore) and"-" (hyphen) can be specified for the file path.

If the specified file exists, it is overwritten.

If you want to output a file with a unique file name without changing the specification of this parameter, by including the character string <date> in the file name, <date> is replaced with the date and time information of YYYYMMDDhhmmss when output.

If omitted, header information is not output to a file.

Type

string

Default value

None

HTTP response body

Key name

resBody

Specify the full path of the file in which to save the body information of the HTTP response.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters,"/",":","\",".","_" (underscore) and"-" (hyphen) can be specified for the file path.

If the specified file exists, it is overwritten.

If you want to output a file with a unique file name without changing the specification of this parameter, by including the character string <date> in the file name, <date> is replaced with the date and time information of YYYYMMDDhhmmss when output.

If omitted, body information is not output to a file.

Type

string

Default value

None

Connection timeout period

Key name

timeout

Specify the connection timeout period for HTTP requests from 1 to 1800 seconds.

If omitted, the default is 10 seconds.

Type

number

Default value

10

Take over key to monitor, abort requests

Key name

takeoverKeys

If you want to take over the result of this HTTP request to the URL or request body of the monitoring request specified in the monitoring object or the termination request specified in the termination object, you can take over the value of the key by specifying the key of the response result to be taken over.

For monitoring requests, the monitoring end judgment key and normal end judgment key can also be taken over.

If the substitution variable name specified in this parameter is written in the form of "<Substitution variable name>" in the URL of the takeover destination or request body, it is converted to the value of the extracted key.

Specify this parameter in the format "Substitution variable name:Key to extract". You can specify multiple substitution variable names and extracted keys in the takeoverKeys object as follows.

takeoverKeys: {
  Substitution variable name1:Key to extract1(Note),
  Substitution variable name2:Key to extract2,
  ...
}

Specify the substitution variable name using a maximum of 64 bytes of alphanumeric characters.

(Note)For more information about specifying the keys to extract, refer to the "How to Specify the Key to extract".

Type

object

Default value

None

Key set in the job net variable

Key name

jobnetValKeys

If you want to link with a succeeding job by setting the result of this HTTP response to a job net variable, you can set the value of the response key to the job net variable by specifying the response key with this parameter.

The key specified by this parameter is output to the standard output in the format "job net variable name = key value".

You can specify multiple keys in list format.

Specify this parameter in the format "Job net variable name: Key to extract". You can specify more than one job net variable name and key to extract in the jobnetValKeys object.

jobnetValKeys: {
  Job net variable name1:Key to extract1(Note),
  Job net variable name2:Key to extract2,
  ...
}

(Note)For more information about specifying the keys to extract, refer to the "How to Specify the Key to extract".

If a job net variable is not used in the job settings, it is not set in the job net variable even if this parameter is specified. For the procedures that use job net variables and the character strings and limit values that can be defined in job net variables, refer to the "Using Job Net Variables to Pass Information between Jobs" in the "Systemwalker Operation Manager User's Guide".

Make sure that the job net variable name does not overlap with other key names that are output by the REST execution job. If they are duplicated, a parameter error results.

Type

object

Default value

None

(*):Required parameters

Parameters of the monitorering object

Specify the parameters of the API for getting the processing results of the execution API in the monitoring object when waiting for the completion of API processing of the connection URL specified in the request object.

Send HTTP requests to the destination URL specified in this object at the specified polling interval and number of polling times.

The REST execution job ends when the value of the specified end judgment key matches the value of the response result or when the request for the specified number of polling times is submitted.

When the monitoring object waits for the completion of processing, the REST execution job terminates normally when the value specified by the success judgment key matches the value of the response result. Otherwise, the REST execution job terminates abnormally.

The parameters are common to all requests sent.

The response results are output only for the last request.

The monitoring object is optional. If you omit this option, the API does not wait for completion.

Parameters

Key Name, Type, Default Value

Description

Connection URL (*)

Key name

url

Specify the URL of the connection destination in the following format.

  • When using https:

    https://host[:port number]/resource path

  • When using http:

    http://host[:port number]/resource path

The URL cannot exceed 2083 bytes. For the characters that can be used in the URL, follow the rules of the cloud service at the connection destination.

When the value of the key specified in the parameter of "Take over key to monitor, abort requests" in the request object is set in this URL, it is replaced at the time of the request by stating it in the form of "<Substitution variable name>".

Type

string

Default value

None

HTTP Methods (*)

Key name

method

Specify the HTTP method.

Specify either GET/PUT/POST/DELETE.

Type

string

Default value

None

Query Parameters

Key name

query

When you specify a query parameter in the connection destination URL, specify it in the format "parameter name: value". You can specify multiple parameter names and values in the query object, as follows.

query: {
  parameter name1: value1,
  parameter name2: value2,
  ...
}

If you want to set the value of the query parameter to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

query: {
  parameter name:@any key name@
}

Specify the parameter name and value in no more than 1024 bytes.

If omitted, the query parameter is not added to the URL.

Type

object

Default value

None

HTTP Request Header

Key name

header

If you specify additional HTTP request headers, use the format "header name: value". You can specify multiple header names and values in the header object as follows.

header: {
  header name1:value1,
  header name2:value2,
  ...
}

If you want to set the value of the request header to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

header: {
  header name:@any key name@
}

Specify the header name and value in no more than 1024 bytes.

If omitted, the request header is not added to the URL.

Type

object

Default value

None

HTTP Request Body

Key name

body

Specify the full path of the file you want to specify as the HTTP request body.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters,"/",":","\",".","_" (underscore) and"-" (hyphen) can be specified for the file path.

When the value of the key specified in the parameter of "Take over key to monitor, abort requests" in the request object is set in this URL, it is replaced at the time of the request by stating it in the form of "<Substitution variable name>".

If you want to set the value of the request body to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

If omitted, the request body is not set.

Type

string

Default value

None

HTTP response header

Key name

resHeader

Specify the full path of the file in which to save the header information of the HTTP response.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters,"/",":" "\", ".", "_"(underscore) and "-"(hyphen) can be specified for the file path.

If the specified file exists, it is overwritten.

If you want to output a file with a unique file name without changing the specification of this parameter, by including the character string <date> in the file name, <date> is replaced with the date and time information of YYYYMMDDhhmmss when output.

Outputs only the HTTP response results for the last HTTP request for monitoring.

If omitted, header information is not output to a file.

Type

string

Default value

None

HTTP response body

Key name

resBody

Specify the full path of the file in which to save the body information of the HTTP response.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters, "/",":" "\" "." "_"(underscore) and "-"(hyphen) can be specified for the file path.

If the specified file exists, it is overwritten.

If you want to output a file with a unique file name without changing the specification of this parameter, by including the character string <date> in the file name, <date> is replaced with the date and time information of YYYYMMDDhhmmss when output.

Outputs only the HTTP response results for the last HTTP request for monitoring.

If omitted, body information is not output to a file.

Type

string

Default value

None

Polling interval for monitoring

Key name

pollingInterval

Specify the request polling interval, from 1 to 600 seconds.

If omitted, the default is 60 seconds.

Type

number

Default value

60

Polling count for monitoring

Key name

pollingCount

Specify the number of times to poll the request.

If 0 is specified, the wait is unlimited.

If omitted, the default is 0 seconds.

Type

number

Default value

0

Interval between the first monitoring request execution

Key name

firstMonitorInterval

Specify the interval between the execution of the request specified in the request object and the execution of the first monitoring request, between 1 and 600 seconds.

If omitted, the default is 10 seconds.

Type

number

Default value

10

End judgment key for monitoring (*)

Key name

pollingEndKey

Specify the key of the response result for determining that the execution API has completed.

For more information about specifying keys, refer to the "How to Specify the Key to extract".

If the value of the key specified in the "Take over key to monitor, abort requests" parameter of the request object is set as the termination judgment key for monitoring, it is replaced at the time of the request by specifying it in the format of "<Substitution variable name>".

Type

string

Default value

None

End judgment value for monitoring (*)

Key name

pollingEndVal

Specify the key value of the response result for determining that the execution API has completed.

Specify the value for end judgment in list format.

["value1","value2","value3", ...]

Specify a value of no more than 1024 bytes.

Type

array

Default value

None

Normal end judgment key (*)

Key name

checkResultKey

Specify the key of the response result to determine whether the API terminated normally after the execution API terminated.

If the value specified by the normal-end judgment key does not match when the wait for the job is completed, the REST execution job terminates abnormally.

For more information about specifying keys, refer to the "How to Specify the Key to extract".

If the value of the key specified in the "Take over key to monitor, abort requests" parameter of the request object is set as the termination judgment key for monitoring, it is replaced at the time of the request by specifying it in the format of "<Substitution variable name>".

Type

string

Default value

None

Normal end judgment value

Key name

checkResultVal

Specify the key value of the response result to determine whether the API terminated normally after the execution API terminated.

Specify the values for determining whether the command terminated normally in list format.

["value1","value2","value3", ...]

Specify a value of no more than 1024 bytes.

Type

array

Default value

None

Key set in the job net variable

Key name

jobnetValKeys

If you want to link with a succeeding job by setting the result of this HTTP response as a job net variable, you can set the value of the response key as a job net variable by specifying the response key with this parameter.

The key specified by this parameter is output to the standard output in the format of "Job net variable name = key".

Specify this parameter in the form of "Job net variable name: Key to extract". You can specify more than one job net variable name and key to extract in the jobnetValKeys object.

jobnetValKeys: {
  Job net variable name1:Key to extract1(Note),
  Job net variable name2:Key to extract2,
  ...
}

(Note)For more information about specifying the keys to extract, refer to the "How to Specify the Key to extract".

If a job net variable is not used in the job settings, it is not set in the job net variable even if this parameter is specified. For the procedures that use job net variables and the character strings and limit values that can be defined in job net variable, refer to the "Using Job Net Variables to Pass Information between Jobs" in the "Systemwalker Operation Manager User's Guide".

Make sure that the job net variable name does not overlap with other key names that are output by the REST execution job. If they are duplicated, a parameter error results.

Type

object

Default value

None

(*):Required parameters

Parameters of the termination object

If you want to send a kill request to the API processing of the connection URL specified in the request object when a REST execution job is killed, specify the following parameters in the termination object.

The termination object is optional. If omitted, no API kill request is sent.

Parameters

Key Name, Type, Default Value

Description

Connection URL (*)

Key name

url

Specify the URL of the connection destination in the following format.

  • When using https:

    https://host[:port number]/resource path

  • When using http:

    http://host[:port number]/resource path

The URL cannot exceed 2083 bytes. For the characters that can be used in the URL, follow the rules of the cloud service at the connection destination.

When the value of the key specified in the parameter of "Take over key to monitor, abort requests" in the request object is set in this URL, it is replaced at the time of the request by stating it in the form of "<Substitution variable name>".

Type

string

Default value

None

HTTP Methods (*)

Key name

method

Specify the HTTP method.

Specify either GET/PUT/POST/DELETE.

Type

string

Default value

None

Query Parameters

Key name

query

When you specify a query parameter in the connection destination URL, specify it in the format "parameter name: value". You can specify multiple parameter names and values in the query object, as follows.

query: {
  parameter name1: value1,
  parameter name2: value2,
  ...
}

If you want to set the value of the query parameter to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

query: {
  parameter name:@any key name@
}

Specify the parameter name and value in no more than 1024 bytes.

If omitted, the query parameter is not added to the URL.

Type

object

Default value

None

HTTP Request Header

Key name

header

If you specify additional HTTP request headers, use the format "header name: value". You can specify multiple header names and values in the header object as follows.

header: {
  header name1:value1,
  header name2:value2,
  ...
}

If you want to set the value of the request header to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

header: {
  header name:@any key name@
}

Specify the header name and value in no more than 1024 bytes.

If omitted, the request header is not added to the URL.

Type

object

Default value

None

HTTP Request Body

Key name

body

Specify the full path of the file you want to specify as the HTTP request body.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters, "/",":","\",".", "_"(underscore) and "-"(hyphen) can be specified for the file path.

When setting the value of the key specified by the parameter of "Take over key to monitor, abort requests" in the request object in the request body, it is replaced at the time of the request by writing in the form of "<Substitution variable name>".

If you want to set the value of the request body to the value of any key set by the jobschsetauthinfo command, specify the value in the format "@any key name@" to replace the value with the value set.

If omitted, the request body is not set.

Type

string

Default value

None

HTTP response header

Key name

resHeader

Specify the full path of the file in which to save the header information of the HTTP response.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters, "/",":","\",":","_"(underscore) and "-"(hyphen) can be specified for the file path.

If the specified file exists, it is overwritten.

If you want to output a file with a unique file name without changing the specification of this parameter, by including the character string <date> in the file name, <date> is replaced with the date and time information of YYYYMMDDhhmmss when output.

If omitted, header information is not output to a file.

Type

string

Default value

None

HTTP response body

Key name

resBody

Specify the full path of the file in which to save the body information of the HTTP response.

Specify the file path with a maximum of 256 bytes. Only alphanumeric characters, "/",":","\",".","_"(underscore) and "-"(hyphen) can be specified for the file path.

If the specified file exists, it is overwritten.

If you want to output a file with a unique file name without changing the specification of this parameter, by including the character string <date> in the file name, <date> is replaced with the date and time information of YYYYMMDDhhmmss when output.

If omitted, body information is not output to a file.

Type

string

Default value

None

(*):Required parameters

How to Specify the Key to extract

For takeoverKeys, jobnetValKeys, pollingEndKey, and checkResultKey, how to specify which keys to extract from the response result is described below.

Note that: Specify a key to be extracted within 1024 bytes.

Example response results

{
    "id": "id001",
    "info": {
        "hoge": "fuga"
     },
    "properties": [
            {
                "name": "aaa",
                "rc": 2
            },
            {
                "name": "bbb",
                "rc": 0
            }
    ]
}

Usage Examples

Executing, Monitoring, and Killing Jobs for the AWS Batch Service (API Version 2016-08 -10)
{
  "request": {
    "url": "https://batch.ap-northeast-1.amazonaws.com/v1/submitjob",
    "method": "POST",
    "authName ": "Aws_Batch",
    "proxyAuthName ": "Proxy1",
    "body": "/paramfiles/aws_batch_main_body.json",
    "resHeader": "/aws_batch_main_header_<date>.json",
    "resBody": "/response/aws_batch_main_body_<date>.txt",
    "takeoverKeys": {
      "JOBID": "jobId"
    },
  "timeout": 60
  },
  "monitoring": {
    "url": "https://batch.ap-northeast-1.amazonaws.com/v1/describejobs",
    "method": "POST",
    "body": "/paramfiles/aws_batch_moni_body.json",
    "resHeader": "/response/aws_batch_moni_header_<date>.json",
    "resBody": "/response/aws_batch_moni_body_<date>.txt",
    "pollingInterval": 60,
    "pollingCount": 5,
    "pollingEndKey": " jobs.[?"jobId"=="<JOBID>"].status ",
    "pollingEndVal": ["SUCCEEDED", "FAILED"],
    "checkResultKey": " jobs.[?"jobId"=="<JOBID>"].status ",
    "checkResultVal": ["SUCCEEDED"]
  },
  "termination": {
    "url": "https://batch.ap-northeast-1.amazonaws.com/v1/terminatejob",
    "method": "POST",
    "body": "/paramfiles/aws_batch_term_body.json",
    "resHeader": "/response/aws_batch_term_header_<date>.json",
    "resBody": "/response/aws_batch_term_body_<date>.txt"
  }
}

Example request body (aws_batch_main_body.json) specified in the request object above

{
  "jobName": "testjob1",
  "jobQueue": "testjob-queue",
  "jobDefinition": "testjob-def1"
}

Example request body (aws_batch_main_body.json) specified in the monitoring object above

{
  "jobs": [ "<JOBID>" ] 
}

Example request body (aws_batch_main_body.json) specified in the termination object above

{
  "reason": "Terminating job.",
  "jobId": "<JOBID>"
}
Example of Executing a Function for the AWS Lambda (API Version 2015-03-31) Service
{
  "request": {
    "url": "https://lambda.ap-northeast-1.amazonaws.com/2015-03-31/functions/func_name/invocations",
    "method": "POST",
    "authName": "Aws_Lambda",
    "proxyAuthName": "Proxy1",
    "resHeader": "/response/aws_lambda_main_header_<date>.json",
    "resBody": "/response/aws_lambda_main_body_<date>.json",
  "timeout": 60
  }
}

func_name: Any function name specified by the user

Executing, Monitoring, and Killing Jobs for Azure Batch (API Version 2020-09-1.12.0) Service
{
  "request": {
    "url": "https://testbatch112233.japaneast.batch.azure.com/jobs/testJob/tasks",
    "method": "POST",
    "authName": "Azure-Batch",
    "proxyAuthName": "Proxy1",
    "query": {
      "api-version": "2020-09-01.12.0"
    },
    "header": {
      "Content-Type": "application/json;odata=minimalmetadata"
    },
    "body": "/paramfiles/azure_batch_main_body.json",
    "resHeader": "/response/azure_batch_main_header_<date>.json",
    "resBody": "/response/azure_batch_main_body_<date>.json",
    "timeout": 60
  },
  "monitoring": {
    "url":
"https://testbatch112233.japaneast.batch.azure.com/jobs/testJob/tasks/testTask",
    "method": "GET",
    "query": {
      "api-version": "2020-09-01.12.0"
    },
    "resHeader": "/response/azure_batch_moni_header_<date>.json",
    "resBody": "/response/azure_batch_moni_body_<date>.json",
    "pollingInterval": 60,
    "pollingCount": 5,
    "pollingEndKey": "state",
    "pollingEndVal": ["completed"],
    "checkResultKey": "executionInfo.result",
    "checkResultVal": ["success"]
  },
  "termination": {
    "url":
"https://testbatch112233.japaneast.batch.azure.com/jobs/testJob/tasks/testTask/terminate",
    "method": "POST",
    "query": {
      "api-version": "2020-09-01.12.0"
    },
    "resHeader": "/resoponse/azure_batch_term_header_<date>.json",
    "resBody": "/response/azure_batch_term_body_<date>.json"
  }
}

Example request body (azure_batch_main_body.json) specified in the request object above

{
  "id": "testTask",
  "commandLine": "cmd /c \"set AZ_BATCH & timeout /t 90 > NUL\""
}
Example of executing a function of the Azure functions service (runtime version 3)
{
  "request": {
    "url": "https://testfunc123456.azurewebsites.net/api/HttpTrigger1",
    "method": "GET",
    "authName":  "Azure-Functions",
    "proxyAuthName": "Proxy1",
    "query": {
      "name": "Function"
    },
    "resHeader": "/response/azure_func_main_header_<date>.json",
    "resBody": "/response/azure_func_main_body_<date>.json",
    "timeout": 60
  }
}

Cautionary Notes