vania-janet/multiturn-rag-retrieval-data huggingface dataset:
type string The response type: <br>text_to_speech - a command to play an utterance to the caller <br>sms - a command to send a SMS to the caller <br>url - a command to play an audio file to the caller <br>transfer - a command to transfer a call <br>text_to_speech_config - a command to change Text to Speech settings <br>speech_to_text_config - a command to change the Speech to Text settings <br>pause_speech_to_text - a command to stop speech recognition <br>unpause_speech_to_text - a command to start speech recognition <br>pause_dtmf - a command to stop DTMF recognition <br>unpause_dtmf - a command to start speech recognition <br>enable_speech_barge_in - a command to enable speech barge-in so that callers can interrupt playback by speaking <br>disable_speech_barge_in - a command to disable speech barge-in so that playback isn't interrupted when callers speak over top of the played back audio <br>enable_dtmf_barge_in - a command to enables DTMF barge-in so that callers can interrupt playback from the phone integration by pressing a key. <br>disable_dtmf_barge_in - a command to disable DTMF barge-in so that playback from the phone integration isn't interrupted when callers press keys <br>dtmf - a command to send DTMFs to the caller <br>hangup - a command to disconnect a call 
 barge_in_occurred Boolean Indicates whether barge-in occurred during the turn. 
 streaming_statistics JSON object Contains information and statistics related to the Text to Speech synthesis and playback. 



The response.streaming_statistics object contains the following keys:



Keys for the response.streaming_statistics object

 Key Type Description 

 transaction_id string A unique identifier of the transaction. 
 start_timestamp string. Time in the ISO format yyyy-MM-ddTHH:mm:ss.SSSZ Time when the transaction started. 
 stop_timestamp string.
.resource(policyResource)
.rule(policyRule)
.pattern("time-based-conditions:once")
.build();

Response<V2Policy> response = service.v2CreatePolicy(options).execute();
V2Policy policy = response.getResult();

policy_subject = V2PolicyBaseSubject(
attributes=[V2PolicyAttribute(key='iam_id', value=example_user_id, operator='stringEquals')]
)
policy_role = PolicyRole(role_id='crn:v1:bluemix:public:iam::::role:Operator')
account_id_resource_attribute = V2PolicyAttribute(
key='accountId', value=example_account_id, operator='stringEquals'
)
service_name_resource_attribute = V2PolicyAttribute(
key='serviceType', value='service', operator='stringEquals'
)
policy_resource = PolicyResource(
attributes=[account_id_resource_attribute, service_name_resource_attribute],
)
policy_control = V2PolicyBaseControl(grant=V2PolicyBaseControlGrant(roles=[policy_role]))
policy_rule = V2PolicyBaseRuleV2RuleWithConditions(
operator='and',
conditions=[
V2PolicyAttribute(
key='{{environment.attributes.current_time}}',
operator='dateTimeGreaterThanOrEquals',
value='2022-12-23T00:00:00+00:00',
),
V2PolicyAttribute(
key='{{environment.attributes.current_time}}',
operator='dateTimeLessThanOrEquals',
As another example, the following $array context variable is an array, but the $string_array context variable is a string.

{
"context": {
"array": [
"one",
"two"
],
"array_in_string": "this is my array: $array"
}
}

If you check the values of these context variables in the Try it out pane, you will see their values specified as follows:

$array : ["one","two"]

$array_in_string : "this is my array: ["one","two"]"

You can subsequently perform array methods on the $array variable, such as <? $array.removeValue('two') ?>,but not the $array_in_string variable.
Add an API spec and invoke a REST service with IBM Cloud 

Duration: 15 mins
Skill level: Beginner



 Objective 

This tutorial helps you get started quickly with IBM® API Connect for IBM Cloud® V5. You will build a new API in a few minutes that acts as a pass-through API proxy for an existing REST service. The API that you build provides security and monitoring.





 Prerequisite 

Before you begin, you need to [set up your API Connect Instance](https://cloud.ibm.com/docs/apiconnect/tutorials?topic=apiconnect-tut_prereq_set_up_apic_instance).

--------------------



 Explore the sample app and test the target endpoints 

A sample weather provider app was created for this tutorial.



1. To explore the app, go to [http://gettingstartedweatherapp.mybluemix.net/](http://gettingstartedweatherapp.mybluemix.net/).
2. Enter a valid 5-digit US zip code to get the current weather and today's forecast.
![explore-weatherapp-1.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/explore-weatherapp-1.png)
3. The sample weather app was built with APIs that provide the weather data. The endpoint to get the current weather data is https://myweatherprovider.mybluemix.net/current?zipcode={zipcode}. Test it out by visiting [https://myweatherprovider.mybluemix.net/current?zipcode=90210](https://myweatherprovider.mybluemix.net/current?zipcode=90210).
Import your API spec and proxy an existing REST service with IBM Cloud 

Duration: 5 mins
Skill level: Beginner



 Objective 

This tutorial helps you get started quickly with IBM® API Connect for IBM Cloud® V5 by illustrating how you can bring your existing API under management control. We'll start by importing an OpenAPI spec, and then create a passthrough API proxy for an existing REST service.





 Prerequisites 

Before you begin, you will need to [set up your API Connect instance](https://cloud.ibm.com/docs/apiconnect/tutorials?topic=apiconnect-tut_prereq_set_up_apic_instance).

--------------------





 Explore the sample app and test the target endpoints 

A sample weather provider app has been created for this tutorial. The corresponding API specification (OpenAPI 2.0) is in the [weather-provider-api_1.yaml](https://raw.githubusercontent.com/IBM-Bluemix-Docs/apiconnect/master/tutorials/weather-provider-api_1.yaml) file.



1. To explore the app, go to [http://gettingstartedweatherapp.mybluemix.net/](http://gettingstartedweatherapp.mybluemix.net/).
2. Enter a valid 5-digit U.S. zipcode to get the current weather and today's forecast.
![explore-weatherapp-1.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/explore-weatherapp-1.png)
3. The above sample weather app was built using APIs that provide the weather data.
SUSEConnect -s

For RHEL:

subscription-manager status







 CLI and API support with PER 

PER uses the same existing Power Systems Virtual Server network APIs and CLIs.

For more information, refer to the Power Systems Virtual Server documentation on:



* API - [Create a new cloud connection](https://cloud.ibm.com/apidocs/power-cloudpcloud-cloudconnections-post)
* CLI - [Create a cloud connection](https://cloud.ibm.com/docs/power-iaas-cli-plugin?topic=power-iaas-cli-plugin-power-iaas-cli-referencecreate-connection)
Host name 99b5ab45-us-south.lb.test.appdomain.cloud
Subnets ID Name
0896-b1f24514-89dc-4afd-b0e2-5489a43cf45c nlb

Public IPs 150.238.50.78, 150.238.54.95
Private IPs 10.240.0.58, 10.240.0.59
Provision status active
Operating status online
Is public true
Listeners r134-2847a948-f9b6-4fc1-91c6-f1c49dac3eba
Pools ID Name
r134-3b66d605-6aa5-4166-9f66-b16054da3cb0 nlb-pool

Resource group ID Name
3021f90279574ce287dd5fba82c08899 Default

Created 2020-08-27T14:34:34.732-05:00







 Creating a network load balancer using the API 

The following example illustrates using the API to create a network load balancer in front of two VPC virtual server instances (192.168.100.5 and 192.168.100.6) running a web application that listens on port 80. The load balancer has a front-end listener, which allows secure access to the web application by using HTTPS.

The example skips the [prerequisite steps](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-a-vpc-using-the-rest-apis) for using the API to provision a VPC, subnets, and instances.

To create a network load balancer with the API, follow these steps:



1. Set up your [API environment](https://cloud.ibm.com/docs/vpc?topic=vpc-set-up-environmentapi-prerequisites-setup).
2. Store the following values in variables to be used in the API command:



* ResourceGroupId - First, get your resource group and then populate the variable:
Private IPs 10.240.0.58, 10.240.0.59
Provision status active
Operating status online
Is public true
Listeners r134-2847a948-f9b6-4fc1-91c6-f1c49dac3eba
Pools ID Name
r134-3b66d605-6aa5-4166-9f66-b16054da3cb0 nlb-pool

Resource group ID Name
3021f90279574ce287dd5fba82c08899 Default

Created 2020-08-27T14:34:34.732-05:00







 Creating an application load balancer with the API 

The following example illustrates using the API to create an application load balancer in front of two VPC virtual server instances (192.168.100.5 and 192.168.100.6) running a web application that listens on port 80. The load balancer has a front-end listener, which allows secure access to the web application by using HTTPS.

The example skips the [prerequisite steps](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-a-vpc-using-the-rest-apis) for using the API to provision a VPC, subnets, and instances.

To create an application load balancer by using the API, follow these steps:



1. Set up your [API environment](https://cloud.ibm.com/docs/vpc?topic=vpc-set-up-environmentapi-prerequisites-setup).
2. Store the following values in variables to be used in the API command:



* ResourceGroupId - First, get your resource group and then populate the variable:



export ResourceGroupId=<your_resourcegroup_id>
3. Create a load balancer with a listener, pool, and attached server instances (pool members)

curl -H "Authorization: $iam_token" -X POST
The following section gives details about the CLI commands that are available for working with VPN gateways, including IKE and IPsec policies.



 ibmcloud is ike-policies 

List all IKE policies.

ibmcloud is ike-policies [--resource-group-id RESOURCE_GROUP_ID | --resource-group-name RESOURCE_GROUP_NAME | --all-resource-groups] [--output JSON] [-q, --quiet]



 Command options 



* --resource-group-id: ID of the resource group. This ID is mutually exclusive with --resource-group-name.
* --resource-group-name: Name of the resource group. This name is mutually exclusive with --resource-group-id.
* --all-resource-groups: Query all resource groups.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is ike-policy 

View details of an IKE policy.

ibmcloud is ike-policy IKE_POLICY [--output JSON] [-q, --quiet]



 Command options 



* IKE_POLICY: ID or name of the IKE policy.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is ike-policy-connections 

List all connections that use the IKE policy.

ibmcloud is ike-policy-connections IKE_POLICY [--output JSON] [-q, --quiet]



 Command options 



* IKE_POLICY: ID or name of the IKE policy.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------
[API Editor page](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/designpage2.png)
11. Click ![Save](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/save.png) icon to save your changes. An "API Saved" confirmation notification appears momentarily.
12. In the page header, the Design tab indicates your present location. The Source tab displays the OopenAPI file that represents your API, and the Assemble tab provides a graphical interface for API processing. Click Assemble. ![Assemble tab](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/assemble-clean.png)







 Testing the SOAP API definition 



1. In the Assemble tab, click the More actions (three dots) icon and select Generate a default product from the menu.
![More actions menu, open](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/gen-default-prod.png)
2. Accept the default options in the New Product dialog pop-up, and select Create Product. The weatherService product 1.0.0 is created and published to the default Sandbox catalog.
!
Test it out by going to [https://myweatherprovider.mybluemix.net/today?zipcode=90210](https://myweatherprovider.mybluemix.net/today?zipcode=90210).

![explore-weatherapp-3.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/explore-weatherapp-3.png)



--------------------





 Import the sample app's OpenAPI spec to create a REST API proxy 



1. Log in to IBM Cloud®: [https://cloud.ibm.com](https://cloud.ibm.com).
2. In the IBM Cloud Dashboard, click Cloud Foundry Services. Launch the API Connect service.
3. In API Connect, make sure the navigation panel on the left side is open. If not, click >> to open it.
4. Select Drafts in the navigation panel.
5. In the APIs tab, click Add. From the dropdown menu, select Import API from a file or URL.
![import-1.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/import-1.png)
6. We will now import the OpenAPI weather definition. In the "Import OpenAPI (Swagger)" dialog box that opens, enter the following URL: https://raw.githubusercontent.com/IBM-Bluemix-Docs/apiconnect/master/tutorials/weather-provider-api_1.yaml. Leave the other options with their default values and click Import.
IAMPAP IBMCLOUD_IAMPAP_API_ENDPOINT N/A 
 ICD IBMCLOUD_ICD_API_ENDPOINT [Docs](https://cloud.ibm.com/docs/account?topic=account-vrf-service-endpoint) 
 Key protect IBMCLOUD_KP_API_ENDPOINT [Docs](https://cloud.ibm.com/docs/key-protect?topic=key-protect-private-endpoints) 
 Power IBMCLOUD_PI_API_ENDPOINT [Endpoint URL](https://cloud.ibm.com/apidocs/power-cloudendpoint) 
 Private DNS IBMCLOUD_PRIVATE_DNS_API_ENDPOINT N/A 
 Resource management IBMCLOUD_RESOURCE_MANAGEMENT_API_ENDPOINT [Endpoint URLs](https://cloud.ibm.com/apidocs/resource-controller/resource-managerendpoint-urls) 
 Resource controller IBMCLOUD_RESOURCE_CONTROLLER_API_ENDPOINT N/A 
 Resource catalog IBMCLOUD_RESOURCE_CATALOG_API_ENDPOINT N/A 
 Resource management IBMCLOUD_RESOURCE_MANAGEMENT_API_ENDPOINT N/A 
 Satellite IBMCLOUD_SATELLITE_API_ENDPOINT N/A 
 Schematics IBMCLOUD_SCHEMATICS_API_ENDPOINT [Docs](https://cloud.ibm.com/docs/schematics?topic=schematics-private-endpoints) 
 Transit Gateway IBMCLOUD_TG_API_ENDPOINT N/A 
 UAA IBMCLOUD_UAA_ENDPOINT N/A 
 User management IBMCLOUD_USER_MANAGEMENT_ENDPOINT [Endpoint URLs](https://cloud.ibm.com/apidocs/user-managementendpoint-urls) 
 VPC Gen2 IBMCLOUD_IS_NG_API_ENDPOINT N/A
"href": "$vpc_api_endpoint/v1/shares/0995b8c6-c323-4e59-9ea9-fa14dd66bba8/mount_targets/9fdf4438-f5b4-4b6f-8bca-602494fd6c31",
"id": "9fdf4438-f5b4-4b6f-8bca-602494fd6c31",
"lifecycle_reasons": [],
"lifecycle_state": "deleting",
"mount_path": "domain.com:/vol_xyz_2891fd0a_63aa_4deb_9ed5_1159e37cb5aa",
"name": "target-name1",
"primary_ip": {
"address": "10.10.12.64",
"href": "$vpc_api_endpoint/v1/subnets/2302-ea5fe79f-52c3-4f05-86ae-9540a10489f5/reserved_ips/0716-6fd4925d-7774-4e87-829e-7e5765d454ad",
"id": "0716-6fd4925d-7774-4e87-829e-7e5765d454ad",
"name": "my-reserved-ip",
"resource_type": "subnet_reserved_ip"
},
"resource_type": "share_mount_target",
"security_groups": [
{
"crn": "crn:...]",
"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/r134-1dfeccef-3ad6-4760-8653-a202bc795db4",
Topologies 

Use IBM® WebSphere® Application Server to install a WebSphere Application Server traditional environment on a Red Hat® Enterprise Linux® 8.4 virtual server instance (VSI) on IBM Cloud®.

To install a WebSphere Application Server Liberty environment on IBM Cloud, use [Java Liberty App](https://cloud.ibm.com/developer/appservice/create-app?starterKit=687d91f2-ba5c-3914-8da5-57876c1f772a).

This documentation refers to WebSphere Application Server as WebSphere or WAS.

IBM® WebSphere® Application Server offers two topologies: WAS.Base and WAS.Cell. Specify one of these topologies as a value for the deploy_was_topology parameter.

WAS.Base
: The WAS.Base topology provisions one VSI with the latest release of WebSphere Application Server traditional V9.0.5. WAS.Base provides a single server. This VSI has a public (floating) IP address.

WAS.Cell
: The WAS.Cell topology provides multiple VSIs with the latest release of WebSphere Application Server Network Deployment traditional V9.0.5. WAS.Cell provisions one VSI with the deployment manager (DMgr), with one or more VSIs for custom nodes. You can also set up an IBM HTTP Server (IHS) VSI. DMgr and IHS VSIs have public (floating) IP addresses, while custom node VSIs have private IP addresses.

The installation sets up a new virtual private cloud (VPC), one or more VSIs, and relevant networking.



 VPC details 

The VPC, VSI, and related networking artifacts are created in the same resource group where Schematics workspace is created. After the installation is complete, refer to the Resources section of the Schematics workspace for these artifacts. For more details about the artifacts, see [https://cloud.ibm.com/vpc-ext](https://cloud.ibm.com/vpc-ext).





 VSI details 



* All the VSIs are set up within the same subnet.
REST API 

You can use the REST API to access data, view and create database objects, administer, scale storage and compute, and monitor your Db2 Warehouse on Cloud service.



*  All plans hosted on IBM Cloud, and previous generation of plans hosted on AWS: [V4 REST API](https://cloud.ibm.com/apidocs/db2-warehouse-on-cloud/db2-warehouse-on-cloud-v4).
*  Current generation of plans hosted on AWS: [V5 REST API](https://cloud.ibm.com/apidocs/db2-warehouse-on-cloud/db2-warehouse-on-cloud-v5).
authentication-algorithm hmac-sha1-96;
encryption-algorithm aes-128-cbc;
lifetime-seconds 3600;
}
policy IPSEC-POL {
perfect-forward-secrecy {
keys group5;
}
proposals IPSEC-PROP;
}
vpn IPSEC-VPN {
bind-interface st0.1;
vpn-monitor;
ike {
gateway IKE-GW;
ipsec-policy IPSEC-POL;
}
establish-tunnels immediately;
}
 show interfaces
ge-0/0/0 {
description PRIVATE_VLANs;
flexible-vlan-tagging;
native-vlan-id 1121;
unit 0 {
vlan-id 1121;
family inet {
address 10.184.108.158/26;
}
}
unit 10 {
vlan-id 1811;
family inet {
address 10.184.237.201/29;
}
}
unit 20 {
vlan-id 1812;
family inet {
address 10.185.48.9/29;
}
}
}
st0 {
unit 1 {
family inet {
address 169.254.200.0/31;
}
}
 show security policies
from-zone CUSTOMER-PRIVATE to-zone VPN {
policy Custprivate-to-VPN {
match {
source-address any;
destination-address Network-B;
application any;
}
then {
permit;
}
}
}
from-zone VPN to-zone CUSTOMER-PRIVATE {
policy VPN-to-Custprivate {
match {
source-address Network-B;
destination-address any;
application any;
}
then {
permit;
}
}
Show more





 Sample configuration for Site B (London): 

 show interfaces
ge-0/0/0 {
Retrieve a bucket lifecycle configuration {: compatibility-api-get-config}

A GET operation uses the lifecycle query parameter to retrieve lifecycle settings for the bucket.

Syntax

 {: codeblock}
GET https://{endpoint}/{bucket-name}?lifecycle path style
GET https://{bucket-name}.{endpoint}?lifecycle virtual host style

Example request

GET /apiary?lifecycle HTTP/1.1
Content-Type: text/plain
Host: s3.us.cloud-object-storage.appdomain.cloud
Authorization: {authorization-string}

Example request

GET /apiary?lifecycle HTTP/1.1
Authorization: 'AWS4-HMAC-SHA256 Credential={access-key}/{date}/{region}/s3/aws4_request,SignedHeaders=host;x-amz-date;,Signature={signature}'
x-amz-date: {timestamp}
Content-Type: text/plain
Host: s3.us.cloud-object-storage.appdomain.cloud

Example Response

<LifecycleConfiguration>
<Rule>
<ID>my-archive-policy</ID>
<Filter>
<Prefix/>
</Filter>
<Status>Enabled</Status>
<Transition>
<Days>20</Days>
<StorageClass>GLACIER</StorageClass>
</Transition>
</Rule>
</LifecycleConfiguration>



Example request

GET /cit_dump-log?lifecycle HTTP/1.1
Host: 192.168.35.22
User-Agent: curl/7.64.1
Accept: /
Date: Fri, 28 Feb 2020 14:00:43 +0000
Authorization: AWS MOfXYiHQ9QTyD2ALoiOh:iKm2QNetyW740kylP6ja2pze3DM=
"https://api.coinbase.com/v2/prices/BTC-USD/spot",
"https://api.coinbase.com/v2/prices/ETH-USD/spot",
"https://api.coinbase.com/v2/prices/LTC-USD/spot"
].map(url => fetch(url, requestInit))

// Wait for each fetch() to complete.
let responses = await Promise.all(fetches)

// Make sure every subrequest succeeded.
if (!responses.every(r => r.ok)) {
return new Response(null, { status: 502 })
}

// Create a pipe and stream the response bodies out
// as a JSON array.
let { readable, writable } = new TransformStream()
streamJsonBodies(responses.map(r => r.body), writable)

return new Response(readable)
}

async function streamJsonBodies(bodies, writable) {
// We're presuming these bodies are JSON, so we
// concatenate them into a JSON array. Since we're
// streaming, we can't use JSON.stringify(), but must
// instead manually write an initial '[' before the
// bodies, interpolate ',' between them, and write a
// terminal ']' after them.

let writer = writable.getWriter()
let encoder = new TextEncoder()

await writer.write(encoder.encode("[n"))

for (let i = 0; i < bodies.length; ++i) {
if (i > 0) {
await writer.write(encoder.encode(",n"))
}
writer.releaseLock()
await bodiesi].pipeTo(writable, { preventClose: true })
writer = writable.getWriter()
}
The Weather Provider API product is created and published to the Sandbox catalog. A message indicating successful product generation is displayed.
![generate-default-product-2.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/generate-default-product-2.png)

In API Connect, Products provide a way to group APIs that are intended for a particular use. Products are published to a Catalog.
3. In the Assemble tab, click the play icon to test your API proxy's target invocation.
4. In the test panel, select the get /current operation.
a. Zipcode is a required parameter for this operation, so enter a valid U.S. zip (for example, 10504).
b. Click invoke.



If you run into a CORS error, follow the instructions in the error message. Click the link in the error to add the exception to your browser, and then hit the "invoke" button again.![test-invoke-all.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/test-invoke-all.png)





 Test with the Explore tool 

The Explore Tool allows users to test the correct operation of the API by enforcing any parameter requirements that are set in the OpenAPI definition. This enforcement is not done in the API Test Tool found in the Assemble tab, so it allows the user to verify the API behavior when the parameter is missing.



1. To test your API proxy endpoints, select Explore, then select Sandbox.