Web Services Jobs

The following topics describe job attributes that work with Web Services jobs:

Web Services REST Job

Web Services REST jobs enable you to design and execute single REST API calls.

To create a Web Services REST job, see Creating a Job. For more information about this plug-in, see Control-M for Web Services REST.

The following table describes the Web Services REST job attributes.

Attribute

Description

Connection Profile

Determines the authorization credentials that are used to connect Control-M to Web Services REST, as described in Web Services REST Connection Profile Parameters.

Rules

  • Characters: 1−30

  • Case Sensitive: Yes

  • Invalid Characters: Blank spaces.

Endpoint URL

Defines the endpoint base URL, which is the common resource prefix that the API uses to navigate.

https://batch.eu-west-2.amazonaws.com

URL Request Path

Defines the URL request path.

/v1/submitjob

Method

Determines one of the following HTTP methods that is used to execute the REST job:

  • GET: Reads or retrieves data from a resource.

  • POST: Adds a new resource.

  • DELETE: Deletes a resource.

  • PUT: Updates an existing resource by entirely replacing its content.

  • TRACE: Creates a loop-back test with the same request body that the user sent to the server. This is used for diagnostic purposes.

  • HEAD: Determines the size of the data and allows you to test if a server is available.

  • OPTIONS: Retrieves information about the possible communication options (HTTP methods) on the endpoint URL or the entire server.

  • PATCH: Partially updates an existing resource by replacing some of its content.

Rules:

  • Characters: 1−214

  • Case-Sensitive: Yes

Variable Name: %%WS-SERVICE

URL Parameters

Defines optional URL parameters, as Key:Value pairs.

Key: Filter

Value: Untitled Workflow

HTTP Headers

Defines optional HTTP headers, as Key:Value pairs.

  • Key: Content-Type

  • Value: application/json

If you created a connection profile that authenticates with OAuth2, as described in Web Services REST Connection Profile Parameters, you must define the following HTTP header key name and value:

  • Key: Authorization

  • Value: <Empty>

Request Definition

Determines whether to define a REST request body, and how to do so:

  • Edit request body: Textual input of the body

  • Specify only URL parameters and headers: No request body (only URL parameters and headers)

  • Use a predefined request body from a local file

Body

Defines the request body as textual input, in JSON format.

filename

Defines the full path to a local file that contains a predefined request body.

/home/jobdefs/request-body.txt

Output Parameters

(Optional) Defines the following output parameters:

  • HTTP Code: Defines the HTTP response or error code, in numbers or * (asterisk) for any code.

  • Parameter/Path: Defines the parameter and its path in XPath or JsonPath format.

  • CTM Variable/URI: Defines the Control-M variable or file to save the parameter value to, in the following format:

    • Local Variable: <parameter_name>

    • Smart Folder Variable: \\<parameter_name>

    • Named Pool Variable: \\\<parameter_name>

    • File: Defines the URI of the file in the following format:

      file:<full directory path and file name>

  • HTTP Code: *

  • Parameter/Path

    • Xpath Format: //AddIntegerResult

    • JsonPath Format: $.run_id

  • CTM Variable/URI

    • CTM Variable: CTM_LOCAL_VAR

    • File:

      • Windows: file:C:\output\temp.txt

      • Linux: file:/home/dbauser/temp.txt

Rules:

  • Each parameter must have a value.

  • Maximum Rows: 999

Connection Timeout

Determines the number of seconds to wait after Control-M initiates a connection request to Web Services before a timeout occurs.

Default: 50

Append Request

Determines whether to append the API request to the outputClosed A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location..

Append Response

Determines whether to append the API response to the output.

Web Services SOAP Job

Web Services SOAP jobs enable you to design and execute single SOAP API calls.

To create a Web Services SOAP job, see Creating a Job. For more information about this plug-in, see Control-M for Web Services SOAP.

The following table describes the Web Services SOAP job attributes.

Attribute

Description

Connection Profile

Determines the authorization credentials that are used to connect Control-M to Web Services SOAP, as described in Web Services SOAP Connection Profile Parameters.

Rules

  • Characters: 1−30

  • Case Sensitive: Yes

  • Invalid Characters: Blank spaces.

Endpoint URL

Defines the endpoint base URL, which is the common resource prefix that the API uses to navigate.

https://batch.eu-west-2.amazonaws.com

SOAP Action

Defines a single SOAP action (operation), which you must take from the WSDL file.

In the WSDL file, copy the SOAP action http://tempuri.org/SOAP.Demo.AddInteger from the body of the following operation and paste it in the SOAP Request field:

Copy
<operation name="AddInteger">
<soap:operation soapAction="http://tempuri.org/SOAP.Demo.AddInteger"
 style="document"/>

Request Definition

Determines one of the following requests to perform:

  • Edit SOAP Request

  • Use a Predefined SOAP Request from a Local File

SOAP Request

Defines the SOAP request.

Copy
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:tem="http://tempuri.org">
<soapenv:Header/>
<soapenv:Body>
<tem:AddInteger>
<!-Optional:->
<tem:Arg1>1</tem:Arg1>
<!-Optional:->
<tem:Arg2>2</tem:Arg2>
</tem:AddInteger>
</soapenv:Body>
</soapenv:Envelope>

HTTP Headers

(Optional) Defines HTTP header key names and values.

  • Key: Content-Type

  • Value: application/json

Output Parameters

(Optional) Defines the following output parameters:

  • HTTP Code: Defines the HTTP response or error code, in numbers or * (asterisk) for any code.

  • Parameter/Path: Defines the parameter and its path in XPath or JsonPath format.

  • CTM Variable/URI: Defines the Control-M variable or file to save the parameter value to, in the following format:

    • Local Variable: <parameter_name>

    • Smart Folder Variable: \\<parameter_name>

    • Named Pool Variable: \\\<parameter_name>

    • File: Defines the URI of the file in the following format:

      file:<full directory path and file name>

  • HTTP Code: *

  • Parameter/Path

    • Xpath Format: //AddIntegerResult

    • JsonPath Format: $.run_id

  • CTM Variable/URI

    • CTM Variable: CTM_LOCAL_VAR

    • File:

      • Windows: file:C:\output\temp.txt

      • Linux: file:/home/dbauser/temp.txt

Rules:

  • Each parameter must have a value.

  • Maximum Rows: 999

Connection Timeout

Determines the number of seconds to wait after Control-M initiates a connection request to Web Services before a timeout occurs.

Default: 50

Append Request

Determines whether to append the API request to the outputClosed A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location..

Append Response

Determines whether to append the API response to the output.