vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If the viewid that you are trying to modify does not exist, a response similar to the following will be returned:

{"error":"Nothing to configure","code":"BadRequest","status":"error"}





 Deleting views 

When you delete a view, consider the following information:



* You must specify the ID of the view that you plan to delete.
* You delete the view and all the alerts that are configured for the view.









 API methods 

The following table outlines the actions that you can run to manage views and alerts programmatically:



Table 1. logging Configuration API endpoints

 Action Request URL 

 Create a view and attach an alert to a view. POST <ENDPOINT>/v1/config/view 
 Modify an existing view and the alerts that are attached to the view. PUT <ENDPOINT>/v1/config/view/<VIEWID> 
 Delete a view and its associated alerts. DELETE <ENDPOINT>/v1/config/view/<VIEWID> 



Where <VIEWID> represents the ID of a view.





 Endpoint URL 

Depending on [your account settings](https://cloud.ibm.com/docs/account?topic=account-service-endpoints-overview), you can use public or private endpoints to manage views and alerts programmatically. For information about endpoints per region, see [API endpoints](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-endpointsendpoints_api).





 Authentication 

When you manage views and alerts programmatically, you must use a service key. Authorization to the logging Configuration API is enforced by using a service key.

A service key is a unique code that is passed in an API request to identify the calling application or user. The service key is specific to a logging instance. For more information on how to generate a service key, see [Managing service keys](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-service_keys).
Type the URL for the PagerDuty service that you want to post alerts to.

b. Type your PagerDuty integration key. You can find your key or create a key in the Integrations section of your PagerDuty service page.
5. Click Create Integration.
6. On your Toolchain's Overview page, on the Third-Party tools card, click PagerDuty to go to pagerduty.com. You can view the events that are associated with the PagerDuty service that you specified when you configured this tool integration for your toolchain.





 Configuring PagerDuty by using the API 

The PagerDuty tool integration supports the following configuration parameters that you can use with the [Toolchain HTTP API and SDKs](https://cloud.ibm.com/apidocs/toolchain) when you [create](https://cloud.ibm.com/apidocs/toolchaincreate-tool), [read](https://cloud.ibm.com/apidocs/toolchainget-tool-by-id), and [update](https://cloud.ibm.com/apidocs/toolchainupdate-tool) tool integrations.

You must specify the tool_type_id property in the request body with the pagerduty value.



Table 1. PagerDuty tool integration parameters

 Parameter Usage Type Terraform argument Description 

 service_id optional, updatable String service_id The service ID of the PagerDuty service. 
 service_key optional, updatable Password service_key The PagerDuty service tool integration key. You can find or create this key in the Integrations section of the PagerDuty service page. 
 service_url optional, updatable String service_url The URL of the PagerDuty service to post alerts to. 







 Learn more about PagerDuty 

To learn more about PagerDuty, see the [PagerDuty article](https://www.ibm.com/garage/method/practices/manage/tool_pagerduty/) on the IBM Cloud Garage Method.
Go to your DNS provider and create a CNAME record for the HOSTNAME for IBM CNAME. For me it was static.example.com -> cdnakawazw9dpv33.cdn.appdomain.cloud.

Often, it takes some minutes for DNS changes to become active. You might need to wait before proceeding to the next step.
5. Access your files with http://<static.example.com>/index.html.



You can demonstrate the performance improvement. Access via the CDN. Check the output of the first curl to verify successful connection:

SUBDOMAIN=static.example.com
curl http://$SUBDOMAIN/index.html
while sleep 1; do curl --output /tmp/fast http://$SUBDOMAIN/a-video.mp4; done

Access via COS:

curl http://$PUBLIC_ENDPOINT/$BUCKET_NAME/index.html
while sleep 1; do curl --output /tmp/slow http://$PUBLIC_ENDPOINT/$BUCKET_NAME/a-video.mp4 ; done

If you are using Cloud Shell you can change the location to a region with more distance from the bucket to see a more substantial performance change.





 Access index.html through COS and other content through CDN 

All of the content is now distributed through the CDN. Website content can be broken into static content and dynamic content. To demonstrate this a file cdn.html has references to the CDN related files through the prefix CDN/. Edit cdn.html and replace the occurrences of CDN with your CNAME, http://static.example.com, in the example above. If you open the file in the vim editor the command :%sCDNhttp://static.yourwebsite.com will do the trick.

Upload cdn.html by replacing the file index.html:

ibmcloud cos upload --bucket $BUCKET_NAME --key index.html --file cdn.html
Integrating with PagerDuty 

You can send alerts to PagerDuty.



 Configuring PagerDuty 

When you [configure an alert](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-alerts) you can have that alert sent to PagerDuty.



1. When configuring your alert, click ![PagerDuty icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/pagerduty.png).
2. Select if you want the alert to be sent when the condition exists (Presence) or does not exist (Absence).
3. Indicate the logging criteria when an alert should be sent. For example, when 100 lines matching in the view are logged in an hour. A graph will help you determine the number of log lines matching your specified criteria.
4. Select if the alert should be sent at the end of the selected period or immediately when the number of lines are logged.
5. Optionally you can specify a Custom schedule with alerting limited to a specified timezone, days of the week, or timeframe. To configure a Custom schedule:



1. Select on for Custom schedule.
2. Select the Timezone for the log entries.
3. Select the days of the week when alerts should be generated.
4. Optionally specify a time range for the selected days. A graph will help you determine the number of log entries for the timezone and time range.



6. Specify the Service. If required, you will be prompted to connect to PagerDuty.

If no services are listed, click Add PagerDuty to connect and add a service. Create a PagerDuty service and associate it with an escalation policy. You will be directed to PagerDuty to authorize the integration.
* Standard-member: A standard-member role allows a user to monitor data through views, dashboards, screens, and alerts, and to manage resources such as dashboards, and alerts that are in scope for the group.
* Reader: A reader role allows a user to monitor data through views, dashboards, screens, and alerts that are in scope for the group.
* Manager: The manager role is an instance level role that grants administrative permissions. If you grant this role in a policy for a group, you are granting admin permissions over the instance to the users that belong to that group. Managers can see all log data.



The following table shows the user roles that you can grant a user to work with the Log Analysis service:



Table 1. List of user roles

 User role IAM service role 

 ROLE_USER reader 
 ROLE_ADVANCED_USER standard-member 
 ROLE_ADMIN manager 



The following table shows the group roles that you can grant users to work within the context of a group in an Log Analysis instance:



Table 2. List of group roles

 Team role IAM service role logGroup 

 ROLE_GROUP_READ reader Custom group 
 ROLE_GROUP_EDIT standard-member Custom group 
 ROLE_GROUP_ADMIN manager Custom group 



You can define in the Log Analysis UI more groups to define different levels of access to data per group and set of users.

To grant a user access to 1 or more groups, an administrator must grant the user a policy for each group that the user needs access to. By using individual policies for each group, administrators can define different service access and permissions levels to work with data in the logging instance.

For example, a user that needs to work in a group requires the following policies:



* A policy with a platform role viewer to allow the user to see logging instances in the IBM Cloud.
* A policy to grant the user access to 1 group. The service role determines the permissions of the user to work with data that is in scope for the group.



Complete the following steps to grant a user or service ID permissions to work with the IBM Log Analysis service within the context of a group.



 Prerequisites 

Your user ID needs administrator platform permissions to manage the IBM Log Analysis service.
You can access Activity Tracker with LogDNA through the Observability tab of your deployment's Manage page. The Manage Activity Tracker button links to the main list of all Activity Tracker instances in your IBM Cloud account. Select the instance where you set your database logs to be forwarded. IBM Cloud Activity Tracker can have only one instance per location. Click View Activity Tracker to view the events.

After the event activity is forwarded to the service, each event can be expanded to a detailed view by clicking the arrow to the left of the time stamp.

The Activity Tracker with LogDNA service offers [searching](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-view_logsview_logs_step6), [filtering](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-view_logsview_logs_step5), and [export](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-exportexport) of events so you can customize retention for your use case. You can also use it to configure [alerts](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-alerts).
To store the value of an entity in a context variable, use this syntax:



Capturing an entity mention

 Variable Value 

 place @place 



For example, the user input is, I want to go to Paris. If your @place entity recognizes Paris, then your assistant saves Paris in the $place context variable.

To store the value of a string that you extract from the user's input, you can include a SpEL expression that uses the extract method to apply a regular expression to the user input. The following expression extracts a number from the user input, and saves it to the $number context variable.



Using a String method

 Variable Value 

 number <?input.text.extract('[d]+',0)?> 



To store the value of a pattern entity, append .literal to the entity name. Using this syntax ensures that the exact span of text from user input that matched the specified pattern is stored in the variable.



Capturing a pattern entity value

 Variable Value 

 email <? @email.literal ?> 



For example, the user input is Contact me at joe@example.com. Your entity named @email recognizes the name@domain.com email format. By configuring the context variable to store @email.literal, you indicate that you want to store the part of the input that matched the pattern. If you omit the .literal property from the value expression, then the entity value name that you specified for the pattern is returned instead of the segment of user input that matched the pattern.

Many of these value examples use methods to capture different parts of the user input. For more information about the methods available for you to use, see [Expression language methods](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-methods).





 Deleting a context variable 

To delete a context variable, set the variable to null.



Nulling a context variable

 Variable Value 

 order_form null 



Alternatively you can delete the context variable in your application logic.
Part 1: Enable notifications for Secrets Manager 

This tutorial is part 1 of a 3-part tutorial series that guides you through setting up alerts for your expiring secrets.

By integrating with the IBM Cloud® Event Notifications service, Secrets Manager can notify you in advance when your secrets or certificates are about to expire. You can use webhooks to route the alerts to your preferred destinations, such as GitHub or Slack. For example, consider the following scenario.

Zoom

![The diagram shows the basic flow between the Secrets Manager and Event Notifications services.](https://cloud.ibm.com/docs-content/v1/content/991f60ddbe3ab0a9aa69481a07a0a73b359fa329/secrets-manager/images/notifications-flow.svg)

Figure 1. Notifications flow



1. You have a certificate that expires in 10 days.
2. Secrets Manager generates and forwards the event to the Event Notifications service.
3. Event Notifications routes your notification data to Cloud Functions by using a webhook URL.
4. Cloud Functions uses your incoming notification data to create a GitHub issue and post to a Slack channel.





 Before you begin 

Before you get started, be sure that you have [Editor platform access](https://cloud.ibm.com/docs/account?topic=account-assign-access-resourcesassign-new-access) or higher so that you can provision services in your account.





 Step 1: Set up your environment 

To work with Secrets Manager and Event Notifications, you need to create instances of both services in your IBM Cloud account.

Already have instances of both services in your account? Verify that you have Manager service access or higher on both services so that you can update settings in your instances.



1. Log in to the IBM Cloud console.
2. Go to the [IBM Cloud catalog](https://cloud.ibm.com/catalog).
3.
* The primitives in qiskit can perform local statevector simulations - useful for quickly prototying algorithms.
* The primitives in qiskit_aer give access to the local Aer simulators for tasks such as noisy simulation.
* The primitives in qiskit_ibm_runtime provide access to cloud simulators and real hardware through the Qiskit Runtime service. They include exclusive features such as built-in circuit optimization and error mitigation support.



The only primitives that provide access to the Qiskit Runtime service are those imported from qiskit_ibm_runtime (Qiskit Runtime primitives).

When migrating, the key to writing an equivalent algorithm using primitives is to first identify what is the minimal unit of information your algorithm is based on:



* If it uses an expectation value, you will need an Estimator.
* If it uses a probability distribution (from sampling the device), you will need a Sampler.



After determining which primitive to use, identify where the algorithm accesses the backend. Look for the call to backend.run(). Next, you will replace this call with the respective primitive call, as shown in the following examples.

Some qiskit libraries provide their own backend.run() wrappers, for example: QuantumInstance, formerly used in qiskit.algorithms. To migrate code that has such dependencies, replace the execution method with the corresponding primitive.

This guide has examples for two basic types of users:



* Algorithm developers who need to refactor algorithms to use primitives instead of backend.run should refer to these topics:



* [Update code that performs circuit sampling](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-migrate-sampler)
* [Update code that calculates expectation values](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-migrate-estimator)



* Algorithm users that refer to Qiskit algorithms but do not directly use primitives. These users now need to pass in a primitive instead of a backend to the updated Qiskit algorithms. Refer to this topic for details:
Learning about IBM Cloud Activity Tracker architecture and workload isolation 

Review the following sample architecture for IBM Cloud® Activity Tracker, and learn more about different isolation levels so that you can choose the solution that best meets the requirements of the workloads that you want to run in the cloud.



 IBM Cloud Activity Tracker architecture 

IBM Cloud Activity Tracker is a multi-tenant, regional service that is available in IBM Cloud. With Activity Tracker, you can manage collection and storage of auditing data to monitor and audit activity in your account.

The following figure shows the high level architecture for IBM Cloud Activity Tracker hosted event search offerings:

Zoom

![IBM Cloud Activity Tracker architecture](https://cloud.ibm.com/docs-content/v1/content/6f3c07c34058f637b1c86044ca4f9b24214330a7/activity-tracker/images/Activity-Tracker-Search-05-Architecture.svg)

Figure 1. IBM Cloud Activity Tracker architecture

The API server component provides a web and an API interface to the logging service.

The collector component collects events from IBM Cloud services that run in the account.

The datastore component stores data, alerts, and user metadata.

The UI is the front-end component where users can monitor and manage logs from hosts through dashboards, views, screens, and alerts.





 Connections 

You can use private and public endpoints to configure Activity Tracker resources in your account.



 Private connections 

You cannot disable private endpoints.





 Public connections 

You can choose to disable public endpoints for Activity Tracker. For more information, see [Disabling public endpoints](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-endpoints_manage).







 Workload isolation 

Each regional deployment of the IBM Cloud Activity Tracker service serves multiple tenants that are identified by the IBM service instance.



* There is 1 IBM Cloud Activity Tracker service per region that is responsible for running user workloads in the region.
* The data that is collected and processed by the IBM Cloud Activity Tracker service is associated with that location and not visible to the other regions by virtue of this association.
You create a custom view by applying a search query that defines what logs to display through the view. [Learn more](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-views).

You can also run any of the following tasks:



* [Attach an alert](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-alerts) to a custom view
* [Export data](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-export) from a custom view
* [Rename, and add or modify the description of a view](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-viewsviews_step5)
* [Apply a line template](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-viewsviews_step4) to a view to customize how the data is displayed
* Organize views by grouping them into categories







 Monitoring logs by applying a timeframe 

You might want to see logs within a specific timeframe.

You can apply a timestamp by specifying an absolute time, a relative time, or a time range.



* An abosute time specifies a precise point in time in your event log, such as May 20 7:00pm.
* A relative time specifies a timeframe that is not precise, such as 2 days ago.
* A time range specified an interval of time, such as yesterday 10am to yesterday 11am.







 Configuring alerts 

There are scenarios where you might want to be notified if specific logs are generated in your account. For example, you might want to be notified if the number of actions that fail are greater than a threshold that you specify.

Through the IBM Log Analysis web UI, you can apply search queries to define the logs that are displayed through a custom view. Then, you can attach an alert to that view to be notified when a condition occurs. A bell icon is displayed with the view to indicate that this view has an alert attached to it.

Consider the following information when you configure alerts:
Best practices for organizing and managing projects 

These best practices provide you with the basic building blocks to manage successful and secure

projectsin IBM Cloud®. Projects are beneficial to regulated enterprises as a way to best manage code-based deployments while maintaining compliance and collaborating with team members across accounts.



 Creating a primary project account 

A key benefit of IBM Cloud projects is the ability to centrally manage and collaborate your Infrastructure as Code deployments. If you are using an enterprise, establishing a primary or home account to store all of your projects helps manage and track your projects in one location.

The usefulness of establishing a primary account depends on your enterprise structure. Projects can be created in an account and deploy resources to other accounts. Users can view only the projects that are within the account that they're currently logged in to. In addition, reports for multiple projects can be generated only for projects within the same account. This is another useful benefit of establishing a common home account for all projects in an enterprise or all projects with a similar line of business. By keeping your project in a primary account, and deploying to separate accounts for each environment(dev, test, and production) you can help minimize issues.

To make the account easier to identify the purpose and projects within the account by all users, give the account a human-readable name.





 Defining an authentication method 

When you configure your deployable architecture, you are required to add an authentication method. You can choose to authenticate through a trusted profile or an existing secret.



 Using trusted profiles 

Some services cannot fully configure and deploy architectures by using trusted profiles. In the future, projects can be directly authorized by using a trusted profile. For now, [use an API key or secret to authorize a project to deploy an architecture](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-authorize-project). For more information, see [Known issues and limitations for projects](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-known-issuesauth-known-issue).

You can deploy an architecture in your own account or in another account by using trusted profiles.
A graph will help you determine the number of log entries for the timezone and time range.



6. Specify the Service. If required, you will be prompted to connect to PagerDuty.

If no services are listed, click Add PagerDuty to connect and add a service. Create a PagerDuty service and associate it with an escalation policy. You will be directed to PagerDuty to authorize the integration. After authorization, your alerts will display in the PagerDuty incidents dashboard.
7. Optional: You can click Test to test that your alert configuration is correct.

![PagerDuty Test button](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/pagerduty-test.png)
8. Click Save Alert.

The alert definition must be saved for alerts to be sent to PagerDuty.







 Limitations 

Due to [PagerDuty API limitations](https://developer.pagerduty.com/docs/events-api-v2/overview/), all requests are trimmed to a maximum of 400 KB.