vania-janet/multiturn-rag-retrieval-data huggingface dataset:
query_params={'foo': 'bar', 'baz': 5},
source=source_db,
target=target_db
)

response = service.put_replication_document(
doc_id='repldoc-example',
replication_document=replication_document
).get_result()

print(response)

source, err := service.NewReplicationDatabase(
"<your-source-service-url>/source",
)
if err != nil {
panic(err)
}

target, err := service.NewReplicationDatabase(
"<your-target-service-url>/target",
)
if err != nil {
panic(err)
}

auth, err := service.NewReplicationDatabaseAuthIam(
"<your-iam-api-key>",
)
if err != nil {
panic(err)
}
target.Auth = &cloudantv1.ReplicationDatabaseAuth{Iam: auth}

replicationDoc, err := service.NewReplicationDocument(
source,
target,
)
if err != nil {
panic(err)
}

replicationDoc.Filter := "mydesigndoc/myfilter"
replicationDoc.QueryParams := map[string]interface{}{"foo": "bar", "baz": 5}

putReplicationDocumentOptions := service.NewPutReplicationDocumentOptions(
"repldoc-example",
replicationDoc,
)

documentResult, response, err := service.PutReplicationDocument(putReplicationDocumentOptions)
if err != nil {
panic(err)
}

b, _ := json.MarshalIndent(documentResult, "", " ")
--paramKEYVALUE, -pKEYVALUE
: Parameter values in the KEYVALUE format. This flag is optional.

--param-fileFILE, -PFILE
: A JSON file that contains parameter KEYS and VALUES. This flag is optional.

--trigger-paramKEYVALUE, -pKEYVALUE
: Trigger parameter values in the KEYVALUE format. This flag is optional.

--feed-paramKEYVALUE, -pKEYVALUE
: Feed parameter values in the KEYVALUE format. This flag is optional.





 Examples 

ibmcloud fn trigger update mytrigger --param name Jim

ibmcloud fn trigger update mytrigger --trigger-param name Jim

ibmcloud fn trigger update mytrigger --feed-param cron "0,1,2,3,4"
message String This field MUST contain a plainly-written, developer-oriented explanation of the solution to the problem in complete, well-formed sentences. 
 more_info URL This field SHOULD contain a publicly-accessible URL where information about the error can be read in a web browser. 
 target Error Target Model This field MAY contain an error target model. Otherwise, it MUST be omitted. 



The error model MAY be extended with additional fields to better specify the error. The target field can be considered a standardized example of such an extension.





 Error target model 

An error target model MUST contain the fields outlined below:



Error target model

 Field Type Description 

 type Enumeration This field MUST contain field, parameter, or header. 
 name String This field MUST contain the name of the problematic field (with dot-syntax if necessary), query parameter, or header. 





 Example error response 

{
"trace": "9daee671-916a-4678-850b-10b911f0236d",
"errors": [
{
"code": "missing_field",
"message": "The first_name field is required.",
"more_info": "https://docs.api.example.com/v2/users/create_userfirst_name",
"target": {
"type": "field",
"name": "first_name"
}
},
{
"code": "reserved_value",
"message": "The value provided for username is already in use.",
"more_info": "https://docs.api.example.com/v2/users/create_userusername",
"target": {
"type": "field",
"name": "username"
}
}
]
}
Show more







 Codes and messages 

Error code values SHOULD specify the problem that caused an error; message values SHOULD describe the problem and MAY also provide suggestions or solutions.



 Codes
[2](such as an immutable name) or a "minimally represented" resource that can be entirely encoded as a single string (such as a tag).

A path parameter MUST NOT be used to provide a collection filter, pagination control, argument for a [custom operation](https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-operationscustom-operations), access token, or supplementary directive for the creation or mutation of a resource.



 Path parameter names 

If a property in the response schema for an operation reflects the same value provided in the final path parameter containing an identifier (or other unique resource handle), that property and that parameter MUST use the same name.

For example, if the operation to retrieve a farm resource from its identifier returns:

{
"id": "0d45edaa-456f-48f2-abff-c01fd6b7530f",
"name": "Moo-Cow Milk Farm"
}

Then the OpenAPI path parameter for the farm's identifier MUST be named "id":

GET /farms/{id}

Conversely, a path parameter MUST NOT have the same name as a top-level property in the operation's response body that represents a different value. Additionally, a path parameter MUST NOT have the same name as any top-level property in the operation's request body.

The path parameters used to identify a resource and any of its parent resources MUST use consistent names across the resource type's standard operations for creating, retrieving, mutating, deleting, and listing resources of that type.

For example, if /farms/{farm_id}/barns/{id} is used to retrieve, mutate, or delete a barn, the path used to list or create barns MUST be /farms/{farm_id}/barns and not /farms/{id}/barns.

As in the example above, and where otherwise sufficient, the singular form of the prior path segment SHOULD be used to disambiguate a parent resource's identifier from its child's identifier.
For more information about request headers and query parameters, see the [Parameter summary](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-summary).



 Form data 

You specify the following parameters of multipart speech recognition requests as form data:

metadata (required object)
: A JSON object that provides the transcription parameters for the request. The object must be the first part of the form data. The information describes the audio in the subsequent parts of the form data. See [JSON metadata for multipart requests](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-httpmultipart-json).

upload (required file)
: One or more audio files as the remainder of the form data for the request. All audio files must have the same format. With the curl command, include a separate --form option for each file of the request.





 Request headers 

You specify the following parameters as request headers:

Content-Type (required string)
: Specify multipart/form-data to indicate how data is passed to the method. You specify the content type of the audio with the JSON part_content_type parameter.

Transfer-Encoding (optional string)
: Specify chunked to stream the audio data to the service. Omit the parameter if you send all audio with a single request.





 Query parameters 

You specify the following parameters as query parameters:

model (optional string)
: The identifier of the model that is to be used with the request. The default is en-US_BroadbandModel. For more information, see [Using the default model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-usemodels-use-default).

language_customization_id (optional string)
: The GUID of a custom language model that is to be used with the request.

acoustic_customization_id (optional string)
Mech: &pb.Mechanism{Mechanism: ep11.CKM_AES_CBC_PAD, Parameter: util.SetMechParm(iv)},
Plain: msg,
}
EncryptKey1Response, err := cryptoClient.EncryptSingle(context.Background(), EncryptKey1Request)
if err != nil {
return nil, fmt.Errorf("Encrypt error: %s", err)
}

ReencryptSingleRequest := &pb.ReencryptSingleRequest{
DecKey: GenerateKey1Response.KeyBytes, // original key
EncKey: GenerateKey2Response.KeyBytes, // new key
DecMech: &pb.Mechanism{Mechanism: ep11.CKM_AES_CBC_PAD, Parameter: util.SetMechParm(iv)},
EncMech: &pb.Mechanism{Mechanism: ep11.CKM_AES_CBC_PAD, Parameter: util.SetMechParm(iv)},
Ciphered: RencryptKey1Response.Ciphered,
}

ReencryptSingleResponse, err := cryptoClient.ReencryptSingle(context.Background(), ReencryptSingleRequest)
Show more
* JavaScript code snippet

client.ReencryptSingle({
Decmech: {
Mechanism: mech1,
ParameterB: iv
},
Encmech: {
Mechanism: mech2,
ParameterB: iv
},
In: encipherState.Ciphered,
DKey: keyBlob1,
Ekey: keyBlob2,
}, (err, response) => {
callback(err, response);
});







 DecryptInit
Service parameter definitions and examples 

Service parameters are used to collect and add additional data points to a call when an IBM Cloud customer creates a service instance. The following sections provide examples and definitions of how service parameters can be used. To start adding custom service parameters for your product, see [Adding custom service parameters for your service](https://cloud.ibm.com/docs/sell?topic=sell-service-add-custom-parametersservice_parameters3p).



 Service parameter examples 

The following example illustrates how service parameters can be used to request a required text field:

{
"metadata": {
//...
"service": {
//...
"parameters": [{
"associations": {
"plan": {
"showFor":
"068f8a20-8b27-4049-91fe-a3ff5f505352",
"45333bd7-79f5-475f-9b14-9fe99734592a"
]
}
},
"description": "Subscription ID that will be use when provisioning the service instance",
"displayname": "Subscription ID",
"name": "subscription_id",
"required": true,
"type": "text"
}]
}
}
Show more

Make changes to the Service and all the Deployment objects for each service plan that you want to add the parameters to. Based on the earlier example, edit all the deployments for 068f8a20-8b27-4049-91fe-a3ff5f505352 and 45333bd7-79f5-475f-9b14-9fe99734592a.

Always verify that the changes that you requested have been made.





 Service parameter definitions 

parameters
: An array of key-value pairs that are defined by the service when the service instance is created.

"parameters": [{
"name": "nodes",
"displayname": "Number of Data Nodes"
}]
<br>To get the value that you can set for a specific service, you can check the label App in an event that is generated by the service. 
 levels string Optional Comma-separated list of severities. <br>Use this field to set the severity of the events that you want to export. 
 query string Optional [Search query](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-viewsviews_step2). <br>You can test your query in a view in the UI. Then, when you copy the query to use for the export, replace each blank space in the query with %20. 
 prefer string Optional Defines the log lines that you want to export. Valid values are head, first log lines, and tail, last log lines. If not specified, defaults to tail. 
 email string Optional Specifies the email with the downloadable link of your export. By default, the event lines are streamed. 
 emailSubject string Optional Use to set the subject of the email.<br><br>Use %20 to represent a space. For example, a sample value is Export%20logs. 



When you include a query or a subject to an email, use %20 to represent a space.

For example, you can define a set of parameters to include information:

ENDPOINT/v1/export?to=START_TIME&from=END_TIME&hosts=SERVICE_LIST<=vels=SEVERITY_LIST&size=N&query=(SEARCH_QUERY)" -u $TOKEN:





 Exporting events 

Complete the following steps to export events programmatically:



 Step 1. Get a service key 

[Get a service key](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-service_keys).





 Step 2. Identify the data to pass through the export parameters 

When you use the export API, you can define 1 or more parameters to refine the set of events that you export. For example, consider the following parameters:



* levels: This parameter is used to filter events based on the criticality of a request.
* The following example shows the format of the SubscriptionCreateAttributes object.

{
"add_notification_payload" : true,
"signing_enabled" : true
}
* Attributes flag syntax in case of SMS subscription to be created.

{
"to" :["+19667895490", "+19845678321"]
}
* Attributes flag syntax in case of email subscription to be created.

{
"to" :["entest@gmail.com"],
"add_notification_payload": true,
"reply_to_mail": "en@ibm.com",
"reply_to_name": "EYS ORG",
"from_name":"ABC ORG"
}
* The following example shows the format of the SubscriptionCreateAttributes object for slack.

{
"attachment_color" : "FF0000"
}
* The following example shows the format of the SubscriptionUpdateAttributes object.

{
"to" : [ "exampleString" ],
"recipient_selection" : "only_destination"
}









 ibmcloud event-notifications subscription list 



* Action: List all Subscription.

ibmcloud event-notifications subscription list [--offset OFFSET] [--limit LIMIT] [--search SEARCH] [--instance-id INSTANCE-ID]
* Parameters to provide:

--limit LIMIT (int64)
: The page limit for paginated results.

The maximum value is 100. The minimum value is 1.

--offset OFFSET (int64)
: The offset for paginated results.

The minimum value is 0.

--search SEARCH (string)
: The search string for filtering results.

The maximum length is 100 characters. The minimum length is 0 characters. The value must match regular expression /[a-zA-Z0-9]/.

[--instance-id INSTANCE-ID] (string)
: The unique identifier for IBM Cloud Event Notifications instance.
The main difference is we are routing HTTP GET requests rather than POST, and sending all the output in the response from getGalleryImages, which is exposed by the galleryController on the last line of the example.

var express = require('express');
var galleryRouter = express.Router();

var router = function(title) {

var galleryController =
require('../controllers/galleryController')(title);

galleryRouter.route('/')
.get(galleryController.getGalleryImages);

return galleryRouter;
};
module.exports = router;

We next turn our attention to the controller for the gallery.

Note how we set up the multer upload, which truncates some code we ignore for now. We require modules ibm-cos-sdk, multer, and multer-s3. The code shows how to configure an S3 object that points to an Object Storage server endpoint. We are statically setting values such as the endpoint address, region, and bucket for simplicity, but they might easily be referenced from an environment variable or JSON configuration file.

We define upload in the imageUploadRouter by creating a new multer instance with storage as its only property. This property tells the multer where to send the file from our multipart/form-data. Since the IBM Cloud Platform uses an implementation of the S3 API, we set storage to be an s3-multer object. This s3-multer object contains an s3 property that is assigned to our s3 object. There is also a bucket property that is assigned to the myBucket variable, which in turn is assigned a value of web-images. The s3-multer object now has all the data necessary to upload files to our Object Storage bucket when it receives data from the upload form. The name (or key) of the uploaded object is the original file name.

Use a time stamp as part of the file name to maintain file name uniqueness.

var galleryController = function(title) {
Some parameter values are Cloud Resource Names (CRNs), which uniquely identify a resource in the cloud. All parameter names and values are passed as strings.

For example, if a database is being provisioned from a particular backup and the new database deployment needs a total of 9 GB of memory across three members, then the command to provision 3 GB per member looks like

ibmcloud resource service-instance-create example-database <service-name> standard us-south -p '{
"backup_id": "crn:v1:blue:public:databases-for-mysql:us-south:a/54e8ffe85dcedf470db5b5ee6ac4a8d8:1b8f53db-fc2d-4e24-8470-f82b15c71717:backup:06392e97-df90-46d8-98e8-cb67e9e0a8e6",
"members_memory_allocation_mb": "3072"
}'







 Provisioning through the Resource Controller API 

You can provision new deployments by using the Resource Controller API. However, to use the Resource Controller API, you need some additional preparation.



1. [Obtain an IAM token from your API token](https://cloud.ibm.com/apidocs/resource-controllerauthentication).
2. You need to know the ID of the resource group that you would like to deploy to. This information is available through the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_commands_resourceibmcloud_resource_groups). You can find a list of resource groups with ibmcloud resource groups and the ID of a resource group with ibmcloud resource group.
3. You need to know the region to which you would like to deploy.



Once you have all the information, the create request is a POST to the https://resource-controller.cloud.ibm.com/v2/resource_instances endpoint.
The following table lists the mapping between the spark-submit command parameters and their equivalent to be passed to the "application_details" section of the Spark application submission REST API payload.



Table 1. Mapping between the spark-submit command parameters and their equivalents passed to the payload

 spark-submit command parameter Payload to the Analytics Engine Spark submission REST API 

 <application binary passed as spark-submit command parameter> application_details -> application 
 <application-arguments> application_details -> arguments 
 class application_details -> class 
 jars application_details -> jars 
 name application_details -> name or application_details -> conf -> spark.app.name 
 packages application_details -> packages 
 repositories application_details -> repositories 
 files application_details -> files 
 archives application_details -> archives 
 driver-cores application_details -> conf -> spark.driver.cores 
 driver-memory application_details -> conf -> spark.driver.memory 
 driver-java-options application_details -> conf -> spark.driver.defaultJavaOptions 
 driver-library-path application_details -> conf -> spark.driver.extraLibraryPath 
 driver-class-path application_details -> conf -> spark.driver.extraClassPath 
 executor-cores application_details -> conf -> spark.executor.cores 
 executor-memory application_details -> conf -> spark.executor.memory 
 num-executors application_details -> conf -> ae.spark.executor.count 
 pyFiles application_details -> conf -> spark.submit.pyFiles 
 <environment-variables> application_details -> env -> {"key1" : "value1", "key2" : "value2", ..... "} 







 Getting the state of a submitted application 

To get the state of a submitted application, enter:
For more information, see [Specifying an audio format](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-audio-formatsaudio-formats-specifying).



Table 7. The Content-Type parameter

 Availability and usage Description 

 Previous-generation models Generally available for all languages. 
 Next-generation models Generally available for all languages. 
 WebSocket content-type parameter of JSON start message 
 Synchronous HTTP Request header of POST /v1/recognize method 
 Asynchronous HTTP Request header of POST /v1/recognitions method 







 customization_weight 

An optional double between 0.0 and 1.0 that indicates the relative weight that the service gives to words from a custom language model versus words from the base vocabulary. The default differs for different types of models. You can specify a value either when a custom model is trained or when it is used for speech recognition. For more information, see [Using customization weight](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageUseweight).



Table 8. The customization_weight parameter

 Availability and usage Description 

 Previous-generation models Generally available or beta for all models that support language model customization. The default value is 0.3. For more information, see [Customization support for previous-generation models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-supportcustom-language-support-pg). 
 Next-generation models Generally available or beta for all models that support language model customization. The default value is 0.2 for most next-generation models; it is 0.1 for models that are based on new language model customization technology. For more information, see [Customization support for next-generation models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-supportcustom-language-support-ng). 
 WebSocket Parameter of JSON start message
- $ref: '/components/parameters/FarmIdQualified'
- $ref: '/components/parameters/FarmBarnId'
get:
operationId: get_farm_barn
...
patch:
operationId: update_farm_barn
...
components:
parameters:
FarmId:
name: id
in: path
required: true
description: The identifier for a farm
schema:
$ref: '/components/schemas/Identifier'
FarmIdQualified:
name: farm_id
in: path
required: true
description: The identifier for a farm
schema:
$ref: '/components/schemas/Identifier'
FarmBarnId:
name: id
in: path
required: true
description: The identifier for a barn on a farm
schema:
$ref: '/components/schemas/Identifier'
schemas:
Identifier:
type: string
format: identifier
pattern: '^[-0-9a-z]+$'
Show more







 Query parameters 



 Contraints 

Each query parameter supported for an operation MUST have a documented and enforced maximum length and the sum of all query parameter maximum lengths (along with the names and control characters & and = for each parameter) for a single operation SHOULD be less than 7000 bytes

[3].





 Unrecognized and invalid parameters 

To prevent [dangerous client bugs and backward-compatibility hazards](https://cloud.ibm.com/docs/api-handbook?topic=api-handbook-robustnesssanitation-and-validation), unrecognized query parameters SHOULD and invalid parameter values MUST result in a 400 status code and appropriate error response model.





 Case insensitivity 

Query parameter names SHOULD NOT be case-normalized to support case insensitivity; a parameter that does not match the case of a defined parameter but otherwise matches its name SHOULD be treated as any other extraneous input

[4].
* <ADMIN_API_KEY> = 'apiKey' in the file platformApiKey.json of your gateway queue manager(i.e. QM1 in our case).
* <ADMIN_REST_ENDPOINT> = this is 'adminREST' in the file connection_info.json of your gateway queue manager(i.e. QM1 in our case).

Note - In this case the adminREST property point will be pointing to the gateway queue manager name, replace the gateway queue manager with the remote queue manager name. e.g. - https://web-qm1-b779.qm2.us-preprod.mq.test.appdomain.cloud/ibmmq/rest/v1/admin/qmgr/QM1 replace QM1 with QM2 like https://web-qm1-b779.qm2.us-preprod.mq.test.appdomain.cloud/ibmmq/rest/v1/admin/qmgr/QM2
* <Remote_Queue_Manager_Name> - this is 'queueManagerName' in the file connection_info.json of your remote queue manager(i.e. QM2 in our case).



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







 Result 



1. An ibm-mq-rest-gateway-qmgr header is returned with the REST response. This header specifies which queue manager was used as the gateway queue manager.



Following is a snippet of the response header containing ibm-mq-rest-gateway-qmgr as one of the attribute.

Date: Mon, 04 Mar 2019 05:29:49 GMT
Content-Type: application/json
Content-Length: 4653
Connection: keep-alive
X-Powered-By: Servlet/3.1
Cache-Control: no-cache, no-store, must-revalidate
Content-Language: en-US
ibm-mq-rest-gateway-qmgr: QM1