Introduction
IBM Cloud® Event Notifications alerts you to critical events occurring in your IBM Cloud account. You can, in turn send filtered notifications to a set of your users, through a notification channel destination of choice. These users need not be IBM Cloud users.
Send notifications for events of your choice and customize specific events to specific destination channels and user groups. Destinations that are currently supported include:
- Email, uses an IBM Cloud provided email service to send emails to your recipients.
- Webhooks, send events from supported IBM Cloud services to webhook destinations of your choice.
SDKs
For more information about installation and technical concepts, see the 'README' document in the SDK.
Admin SDKs | Client SDKs |
---|---|
Go | Android SDK |
Node | Huawei Android SDK |
Java | iOS SDK |
Python |
IBM Cloud® Event Notifications service provides different APIs that you can use to create and work with your Node.js microservice apps. The API endpoint determines where your Event Notifications actions run and where your app data is stored. By default, all information that is stored in Event Notifications is encrypted in transit and at rest. To ensure disaster recovery, your data is replicated to another location within the same geography. Make sure that your data can be stored in these regions before you start with the Event Notifications service.
The code examples on this tab use the IBM Cloud Event Notifications admin SDK for Go.
Installation
go get -u github.com/IBM/event-notifications-go-admin-sdk
For more installation options, view this project in GitHub.
Installation
npm install ibm-event-notifications-node-admin-sdk
For more installation options, view this project in GitHub.
Installation
Maven
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>event-notifications</artifactId>
<version>0.0.2</version>
</dependency>
Gradle
compile 'com.ibm.cloud:event-notifications:0.0.2'
For more installation options, view this project in GitHub.
Installation
pip install --upgrade "ibm_eventnotifications"
For more installation options, view this project in GitHub.
Endpoint list
The following table contains the base URLs for the Event Notifications API endpoints. When you call the API, use the URL that corresponds to the region where your service instance is deployed. Add the path for each method to form the complete API endpoint for your requests.
Location | API endpoint | Location where Event Notifications actions run | Data is stored in | Data is replicated to |
---|---|---|---|---|
Dallas | Public: https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} Private: https://private.us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} |
All Event Notifications actions run in the Dallas (us-south ) location. |
All metadata for the app's features are stored in the Dallas (us-south ) location. |
Data is replicated between three zones within us-south for high-availability. |
London | Public: https://eu-gb.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} Private: https://private.eu-gb.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} |
All Event Notifications actions run in the London (eu-gb ) location. |
All metadata for the app's features are stored in the London(eu-gb ) location. |
Data is replicated between three zones within eu-gb for high-availability. |
Sydney | Public: https://au-syd.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} Private: https://private.au-syd.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} |
All Event Notifications actions run in the Sydney (au-syd ) location. |
All metadata for the app's features are stored in the Sydney (au-syd ) location. |
Data is replicated between three zones within au-syd` for high-availability. |
Frankfurt | Public: https://eu-de.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} Private: https://private.eu-de.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid} |
All Event Notifications actions run in the Frankfurt (eu-de ) location. |
All metadata for the app's features are stored in the Frankfurt (eu-de ) location. |
Data is replicated between three zones within eu-de` for high-availability. |
Example request to a Dallas endpoint:
curl -H "Authorization:Bearer {token}" -X "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid}"
Replace {token}
in this example with the values for your particular API call.
Authentication
The Event Notifications API uses IBM Cloud Identity and Access Management (IAM) to authenticate requests.
To work with the API, authenticate your application or service by including your IBM Cloud IAM access token in API requests.
To call each method, you need to be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Managing access for Event Notifications.
IAM authentication. Replace {token}
and {url}/{method}
with your service credentials.
curl -H "Authorization:Bearer {token}" -X "{url}/{method}"
Authorization: Bearer {token}
For example, if the token is tzLbqWhyALQawBg5TjRIf5sAznhrKQyvBFFaZbtF60m5
in the service credentials, include the credentials in your call like this:
curl -H "Authorization:Bearer {tzLbqWhyALQawBg5TjRIf5sAznhrKQyvBFFaZbtF60m5}" -X "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{guid}"
Example that initializes the SDK programmatically.
import (
"github.com/IBM/go-sdk-core/v5/core"
"github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1"
)
// IAM API key based authentication
authenticator := &core.IamAuthenticator{
ApiKey: <apikey>,
URL: <IBM Cloud URL to generate Token>,
}
// Set the options for the Event notification instance.
options := &eventnotificationsv1.EventNotificationsV1Options{
Authenticator: authenticator,
URL: "https://" + region + ".event-notifications.cloud.ibm.com/event-notifications",
}
eventNotificationsAPIService, err := eventnotificationsv1.NewEventNotificationsV1(options)
if err != nil {
panic(err)
}
import { EventNotificationsV1 } from 'ibm-event-notifications-node-admin-sdk/event-notifications/v1';
import { IamAuthenticator } from 'ibm-event-notifications-node-admin-sdk/auth';
const authenticator = new IamAuthenticator({
apikey: <apikey>,
url: <IBM Cloud URL to generate Token>,
});
const eventNotificationsService = EventNotificationsV1.newInstance({
authenticator,
serviceUrl: <service-url>,
});
import com.ibm.cloud.eventnotifications.event_notifications.v1.EventNotifications;
// Create an IAM authenticator.
Authenticator authenticator = new IamAuthenticator.Builder()
.apikey("<api-key>")
.build();
// Construct the service client.
EventNotifications eventNotificationsService = new EventNotifications("event_notifications", authenticator);
// Set our custom service URL (optional)
eventNotificationsService.setServiceUrl("https://" + region + ".event-notifications.cloud.ibm.com/event-notifications");
from ibm_eventnotifications import EventNotificationsV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
# Create an IAM authenticator.
authenticator = IAMAuthenticator('<api-key>')
# Construct the service client.
event_notifications_service = EventNotificationsV1(authenticator=authenticator)
# Set our custom service URL (optional)
event_notifications_service.set_service_url(<service-url>)
Error handling
This API uses standard HTTP response codes to indicate whether a method completed successfully. A 2xx
response indicates success. A 4xx
type response is some sort of failure, and a 5xx
type response usually indicates an internal system error.
HTTP status code | Description | Recovery |
---|---|---|
200 |
Success | The request was successful. |
201 |
Success | The resource was successfully created and added to your IBM Cloud account. |
400 |
Bad request | The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request. |
401 |
Unauthorized | You are not authorized to make this request. Log in to IBM Cloud and try again. If this error persists, contact the account owner to check your permissions. |
403 |
Forbidden | The supplied authentication is not authorized to access the apps. Check that you have the correct access credentials and permissions. |
404 |
Not found | The requested resource could not be found. |
408 |
Request timeout | The connection to the server timed out. Wait a few minutes, then try again. |
409 |
Conflict | The entity is already in the requested state. |
415 |
Unsupported media type | The server refuses the request because the payload format is in an unsupported format. |
429 |
Too many requests | Rate limit is 1000 calls per second. Wait before calling the API again. |
500 |
Internal server error | IBM Cloud Event Notifications is not available. Your request could not be processed. Wait a few minutes and try again. If you still encounter this problem, note the incident ID and contact IBM Cloud support. |
503 |
Service temporarily unavailable | IBM Cloud Event Notifications could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support. |
Example error handling
import (
"github.com/IBM/go-sdk-core/v5/core"
eventnotificationsv1 "github.com/IBM/event-notifications-go-admin-sdk/eventnotificationsv1"
)
// Set the options for the Event notification instance.
options := &eventnotificationsv1.EventNotificationsV1Options{options}
eventNotificationsInstance, err := eventnotificationsv1.NewEventNotificationsV1(options)
// Check for errors
if err != nil {
panic(err)
}
Auditing
You can monitor API activity within your account. Whenever an API method is called, an event is generated that you can then track and audit. The specific event type is listed for each method that generates auditing events. For methods that don't list any events, no events are generated.
For more information about how to track Event Notifications activity, see Auditing events for Event Notifications.
Methods
Get metrics
Get metrics
Get metrics.
Get metrics.
Get metrics.
Get metrics.
GET /v1/instances/{instance_id}/metrics
(eventNotifications *EventNotificationsV1) GetMetrics(getMetricsOptions *GetMetricsOptions) (result *Metrics, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetMetricsWithContext(ctx context.Context, getMetricsOptions *GetMetricsOptions) (result *Metrics, response *core.DetailedResponse, err error)
getMetrics(params)
get_metrics(self,
instance_id: str,
destination_type: str,
gte: str,
lte: str,
*,
destination_id: str = None,
source_id: str = None,
email_to: str = None,
notification_id: str = None,
subject: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<Metrics> getMetrics(GetMetricsOptions getMetricsOptions)
Request
Instantiate the GetMetricsOptions
struct and set the fields to provide parameter values for the GetMetrics
method.
Use the GetMetricsOptions.Builder
to create a GetMetricsOptions
object that contains the parameter values for the getMetrics
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Destination type. Allowed values are [smtp_custom]
Allowable values: [
smtp_custom
]GTE (greater than equal), start timestamp in UTC
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z
LTE (less than equal), end timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Source
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9-:_]*
Receiver email id.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
[A-Za-z0-9\._%+\-]+@[A-Za-z0-9\.\-]+\.[A-Za-z]{2,}
Notification Id.
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Email subject.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetMetrics options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination type. Allowed values are [smtp_custom].
Allowable values: [
smtp_custom
]GTE (greater than equal), start timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
LTE (less than equal), end timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Receiver email id.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[A-Za-z0-9\\._%+\\-]+@[A-Za-z0-9\\.\\-]+\\.[A-Za-z]{2,}/
Notification Id.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Email subject.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination type. Allowed values are [smtp_custom].
Allowable values: [
smtp_custom
]GTE (greater than equal), start timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
LTE (less than equal), end timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Receiver email id.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[A-Za-z0-9\\._%+\\-]+@[A-Za-z0-9\\.\\-]+\\.[A-Za-z]{2,}/
Notification Id.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Email subject.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination type. Allowed values are [smtp_custom].
Allowable values: [
smtp_custom
]GTE (greater than equal), start timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
LTE (less than equal), end timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Receiver email id.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[A-Za-z0-9\\._%+\\-]+@[A-Za-z0-9\\.\\-]+\\.[A-Za-z]{2,}/
Notification Id.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Email subject.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[a-zA-Z0-9]/
The getMetrics options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination type. Allowed values are [smtp_custom].
Allowable values: [
smtp_custom
]GTE (greater than equal), start timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
LTE (less than equal), end timestamp in UTC.
Possible values: 1 ≤ length ≤ 28, Value must match regular expression
/[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2}T[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}Z/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Receiver email id.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[A-Za-z0-9\\._%+\\-]+@[A-Za-z0-9\\.\\-]+\\.[A-Za-z]{2,}/
Notification Id.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Email subject.
Possible values: 0 ≤ length ≤ 256, Value must match regular expression
/[a-zA-Z0-9]/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/metrics?destination_type=smtp_custom>e=2024-06-20T11%3A04%3A23Z<e=2024-06-20T11%3A05%3A00Z' --header 'Authorization: Bearer {TOKEN}'
getMetricsOptions := &eventnotificationsv1.GetMetricsOptions{ InstanceID: core.StringPtr(instanceID), DestinationType: core.StringPtr("smtp_custom"), Gte: core.StringPtr("2024-08-01T17:18:43Z"), Lte: core.StringPtr("2024-08-02T11:55:22Z"), EmailTo: core.StringPtr("mobileb@us.ibm.com"), DestinationID: core.StringPtr(destinationID16), NotificationID: core.StringPtr(notificationID), Subject: core.StringPtr("Test Metrics Subject"), } metrics, response, err := eventNotificationsService.GetMetrics(getMetricsOptions)
const destination_type = 'smtp_custom'; const gte = '2024-08-01T17:18:43Z'; const lte = '2024-08-02T11:55:22Z'; const email_to = 'testuser@in.ibm.com'; const subject = 'Test Metrics Subject'; const getMetricsParams = { instanceId, destinationType: destination_type, gte, lte, destinationId: destinationId16, emailTo: email_to, notificationId: notificationID, subject, }; try { const res = await eventNotificationsService.getMetrics(getMetricsParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetMetricsOptions getMetricsOptionsModel = new GetMetricsOptions.Builder() .instanceId(instanceId) .destinationType("smtp_custom") .gte("2024-08-01T17:18:43Z") .lte("2024-08-02T11:55:22Z") .destinationId(destinationId16) .emailTo("mobileb@us.ibm.com") .notificationId(notificationID) .subject("Metric Test") .build(); Response<Metrics> response = eventNotificationsService.getMetrics(getMetricsOptionsModel).execute(); Metrics responseObj = response.getResult();
destination_type = "smtp_custom" gte = "2024-08-01T17:18:43Z" lte = "2024-08-02T11:55:22Z" email_to = "testuser@in.ibm.com" subject = "The Metric Test" get_metrics_response = self.event_notifications_service.get_metrics( instance_id, destination_type, gte, lte, destination_id=destination_id16, email_to=email_to, notification_id=notificationID, subject=subject, ) metric_response = get_metrics_response.get_result() print(json.dumps(metric_response, indent=2))
Response
Payload describing a metrics
array of metrics
Possible values: number of items = 5
Payload describing a metrics.
{
"metrics": [
{
"key": "bounced",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "deferred",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "opened",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "success",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "submitted",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
}
]
}
array of metrics.
Possible values: number of items = 5
- Metrics
key.
Possible values: [
bounced
,deferred
,opened
,success
,submitted
]Possible values: 1 ≤ length ≤ 255
doc count.
Payload describing histogram.
- Histogram
List of buckets.
Possible values: 0 ≤ number of items ≤ 48
- Buckets
Total count.
Timestamp.
Payload describing a metrics.
{
"metrics": [
{
"key": "bounced",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "deferred",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "opened",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "success",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "submitted",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
}
]
}
array of metrics.
Possible values: number of items = 5
- metrics
key.
Possible values: [
bounced
,deferred
,opened
,success
,submitted
]Possible values: 1 ≤ length ≤ 255
doc count.
Payload describing histogram.
- histogram
List of buckets.
Possible values: 0 ≤ number of items ≤ 48
- buckets
Total count.
Timestamp.
Payload describing a metrics.
{
"metrics": [
{
"key": "bounced",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "deferred",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "opened",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "success",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "submitted",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
}
]
}
array of metrics.
Possible values: number of items = 5
- metrics
key.
Possible values: [
bounced
,deferred
,opened
,success
,submitted
]Possible values: 1 ≤ length ≤ 255
doc count.
Payload describing histogram.
- histogram
List of buckets.
Possible values: 0 ≤ number of items ≤ 48
- buckets
Total count.
Timestamp.
Payload describing a metrics.
{
"metrics": [
{
"key": "bounced",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "deferred",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "opened",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "success",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
},
{
"key": "submitted",
"doc_count": 1,
"histogram": {
"buckets": [
{
"doc_count": 1,
"key_as_string": "2024-06-16T09:00:00Z"
}
]
}
}
]
}
array of metrics.
Possible values: number of items = 5
- metrics
key.
Possible values: [
bounced
,deferred
,opened
,success
,submitted
]Possible values: 1 ≤ length ≤ 255
doc count.
Payload describing histogram.
- histogram
List of buckets.
Possible values: 0 ≤ number of items ≤ 48
- buckets
Total count.
Timestamp.
Status Code
Get metrics information
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "metrics": [ { "key": "bounced", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "deferred", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "opened", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "success", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "submitted", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } } ] }
{ "metrics": [ { "key": "bounced", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "deferred", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "opened", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "success", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } }, { "key": "submitted", "doc_count": 1, "histogram": { "buckets": [ { "doc_count": 1, "key_as_string": "2024-06-16T09:00:00Z" } ] } } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Send a notification
Send Notifications body from the instance. For more information about Event Notifications payload, see here.
Send Notifications body from the instance. For more information about Event Notifications payload, see here.
Send Notifications body from the instance. For more information about Event Notifications payload, see here.
Send Notifications body from the instance. For more information about Event Notifications payload, see here.
Send Notifications body from the instance. For more information about Event Notifications payload, see here.
POST /v1/instances/{instance_id}/notifications
(eventNotifications *EventNotificationsV1) SendNotifications(sendNotificationsOptions *SendNotificationsOptions) (result *NotificationResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) SendNotificationsWithContext(ctx context.Context, sendNotificationsOptions *SendNotificationsOptions) (result *NotificationResponse, response *core.DetailedResponse, err error)
sendNotifications(params)
send_notifications(self,
instance_id: str,
*,
body: 'NotificationCreate' = None,
**kwargs
) -> DetailedResponse
ServiceCall<NotificationResponse> sendNotifications(SendNotificationsOptions sendNotificationsOptions)
Request
Instantiate the SendNotificationsOptions
struct and set the fields to provide parameter values for the SendNotifications
method.
Use the SendNotificationsOptions.Builder
to create a SendNotificationsOptions
object that contains the parameter values for the sendNotifications
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Payload describing a notification create request
{
"specversion": "1.0",
"time": "2018-04-05T17:31:00Z",
"id": "9ca5e995-3cbb-4985-ba27-9f8d7f7b10e2",
"ibmenseverity": "HIGH",
"source": "api-server",
"ibmensourceid": "b0935fd7-8597-475a-8526-704e2e4714e8:api",
"type": "*",
"data": {
"createTimestamp": 1557282940339,
"shortDescription": "Test notification"
},
"ibmensubject": "email subject",
"ibmentemplates": "[\"149b0e11-8a7c-4fda-a847-5d79e01b71dc\"]",
"ibmenmailto": "[\"abc@ibm.com\", \"def@in.ibm.com\"]",
"ibmenslackto": "[\"sgjhgsjaS\",\"agjhgsjaS\"]",
"ibmensmsto": "[\"+911234567890\", \"+911224567890\"]",
"ibmenhtmlbody": "\"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https: //cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>\"",
"ibmendefaultshort": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
"ibmendefaultlong": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua",
"datacontenttype": "application/json",
"ibmenpushto": "{\"fcm_devices\": [\"9c75975a-37d0-3898-905d-3b5ee0d7c172\",\"C9CACDF5-6EBF-49E1-AD60-E25BA23E954C\"]}",
"ibmenfcmbody": "{\"notification\":{\"title\":\"Portugal vs. Denmark\",\"body\":\"great match!\"}}",
"ibmenapnsbody": "{\"aps\":{\"alert\":{\"title\":\"GameRequest\",\"body\":\"Bobwantstoplaypoker\",\"action-loc-key\":\"PLAY\"},\"badge\":5}}",
"ibmenapnsheaders": "{\"apns-collapse-id\":\"13\"}",
"ibmenchromebody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}",
"ibmenfirefoxbody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}",
"ibmenhuaweibody": "{\"message\":{\"android\":{\"notification\":{\"title\":\"New Message\",\"body\":\"Hello World\",\"click_action\":{\"type\":3}}}}}",
"ibmenmms": "{\"content\": \"iVBORw0KGgoAAAANSUhEUgAAAFoAAAA4CAYAAAB9lO9TAAAAAXNSR0IArs4c6QAAActpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgSW1hZ2VSZWFkeTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KKS7NPQAABO9JREFUeAHtW81x2zoQBhgn46NLYCpISpA6cCowfYjn3ZJUELmC5Og4h0AVPKeC8HWgDh5L8DGTTMR8KxoSBCzAX3us8WKGJrg/34KfqF2AkJWSJgwIA8KAMCAMCAPCgDAgDAgDwoAw8LQZ0GfFRT2egrpcmq9zwpkGzx9RXWqllsZ8Nb7GXg+Pq83SfDm3OKlzUVy8B1mfUjYxXRZTPC65ntVKfwOZ/xfFP7Npx1afFkVx0gUTJJ91seNsjvCkXHKKnrLK2k+EZ+GY83oGYlbGmFtXOS7uMRG9h+di2z5ifEefDmmPlQE9zVfxzy3y54puchq8rnT93D7Z4+PusLjoY/GParX+wQH3lJWwn5PPRHgE1dq0evEBRp/JcGxcrZ6fA8YQlt+K4u3rsfgHUgz9W2+uxxQnHxHF9p0vs9fQDS6CFgPFMNs8iVYw7PxnW0imwes/ivuMq1W9VOqZFMH+H8vDe2guJCbmC07eyLLSmKsyrg81aby6Si1E0r4UK8NM76oKo1JhTt0H56FQ1K83Od9qkZ8LpXSuerVwTEecP3LfR05OMq3WdCrpT9eWwgNGicPgYFuLL8Yz3JcLiNnFjfvBIT/TSvCEs43JMKYSusrVH3QxpBtxSXFvbHh/fWp98Y2gfi+Sra9/Zp/olsJS+SBt12m8XSHlcO7Pl4tGMnc82QpP5zxmGZf/XMV1orlXBvCBhe2sePsjlDYSOCTfonF+KTzOvotMK/3dL1y+39C4hA2sqlZ1dG7tx3KvwdEHu1K2cjZ1oOTNrAFz/o+RtYiSeC2+rLpS6pdhNXvCYXFRgHPA4Osf9b+FPpG7s0B3iMUQebN+gzkd3eyIVpdwriIAOeSnER3E+iauE40w8BQYQN4OW2pbCA6XKEKL0CsuSeHFvaIaSh3nfrHhrNNxm+032rWBb875czJMN18qtS6Qxz9yepLRlNRfPR9ijsYrS/0vdlmCghO78RZ5n3y7t2pswd1TR2Ydm0KxZ+hcVE6/YzeJ1xHDN3vxHpKFL92/TsXVK7KlN3N4Ol/v+/FXmPYtG01d4Vw2fe6vu+jh9CK7NwaQcsPWsm2Dt21XVegVl6TxdttgHMJD+DZp6Ljtqd7eN8aUY6x0RFq4LcamjtS2DT6ZS6AvIhFYcQoPDiWOOesIYdoXo6Fvf6Slfd24z/MWW0ox5whjmlBtxfCY7qdsbJu/h1gM3fHTZnC+JxhwcTeDqdKuv2/S+rSWfaLxiFzG3bIyruM1abzo6mwD1uLLB7yTtvhWrjNsaaM3kj5oc8JdiWbl3Xt5F8LtV+6F9B+QAfyu42IxPt5uO2oavO4jsoun/nF3Y7bRYttWNsbOjn6WtsbRveF3HfEVTneYTeI3ZD8RXtfQKxguyHhA3BJuBofT9AmDw+Tm9Yyxc3DC7kEXQ+TVZXhLYyRZQOpUMQ78dx27LaP0lhdHfrh6o/UBZjFz19p/Z9HoMoMPoHTtpP9IGMAP0ePbVt3HqFdLc03TI/wQfQq8dGStnuHt3VXlWvWPuxuzi0N9i4WnNtiSIj0VTeToM+p3bZhHR7drumLADmG3bQq8LZjfqZAiApIbo75x3TH7YfQJJDlmG1RsmaZzCGc4Ojd2wdLZ++EMb7AExmZs/F8rphwKFUC8in01JaZgCQPCgDAgDAgDwoAwIAwIA8KAMCAMPHUG/gKC0oz7fm25ogAAAABJRU5ErkJggg==\", \"content_type\": \"image/png\"}"
}
The version of the notification specification
Possible values: 3 ≤ length ≤ 100, Value must match regular expression
[0-9][0-9.]*[0-9]$
The unique identifier of the notification
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
The source of notifications
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
The notifications type
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
The source id of the notification
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Default short text for the message
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Default long text for the message
Possible values: 1 ≤ length ≤ 3000, Value must match regular expression
.*
The time notification was created
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
The severity of the notification
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
The subject of the notification
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
The template id Array of string
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
.*
The email id string
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
.*
The slack channel id/member id stringified array
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
.*
The SMS number string
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
.*
The html body of notification
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
.*
The subject of the notification
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Stringified MMS Attachment JSON
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
.*
The payload for webhook notification
- data
The notification content type
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z 0-9-_/.?:' ]*
Default:
application/json
If platforms or tags or user_ids is used then do not use fcm_devices / apns_devices / chrome_devices / firefox_devices / safari_devices with it. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Example:
{"platforms":["push_android"]}
Payload describing a notification FCM body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Payload describing a notification APNs body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Headers for iOS notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Notification payload for Chrome. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Headers for a Chrome notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Example:
{"TTL":3600,"Topic":"test","Urgency":"high"}
Notification payload for Firefox. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Headers for a Firefox notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Example:
{"TTL":3600,"Topic":"test","Urgency":"high"}
Payload describing a notification Huawei body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
Payload describing a notification Safari body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
.*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The SendNotifications options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Payload describing a notification create request.
Examples:{ "specversion": "1.0", "time": "2018-04-05T17:31:00Z", "id": "9ca5e995-3cbb-4985-ba27-9f8d7f7b10e2", "ibmenseverity": "HIGH", "source": "api-server", "ibmensourceid": "b0935fd7-8597-475a-8526-704e2e4714e8:api", "type": "*", "data": { "createTimestamp": 1557282940339, "shortDescription": "Test notification" }, "ibmensubject": "email subject", "ibmentemplates": "[\"149b0e11-8a7c-4fda-a847-5d79e01b71dc\"]", "ibmenmailto": "[\"abc@ibm.com\", \"def@in.ibm.com\"]", "ibmenslackto": "[\"sgjhgsjaS\",\"agjhgsjaS\"]", "ibmensmsto": "[\"+911234567890\", \"+911224567890\"]", "ibmenhtmlbody": "\"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https: //cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>\"", "ibmendefaultshort": "Lorem ipsum dolor sit amet, consectetur adipiscing elit", "ibmendefaultlong": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", "datacontenttype": "application/json", "ibmenpushto": "{\"fcm_devices\": [\"9c75975a-37d0-3898-905d-3b5ee0d7c172\",\"C9CACDF5-6EBF-49E1-AD60-E25BA23E954C\"]}", "ibmenfcmbody": "{\"notification\":{\"title\":\"Portugal vs. Denmark\",\"body\":\"great match!\"}}", "ibmenapnsbody": "{\"aps\":{\"alert\":{\"title\":\"GameRequest\",\"body\":\"Bobwantstoplaypoker\",\"action-loc-key\":\"PLAY\"},\"badge\":5}}", "ibmenapnsheaders": "{\"apns-collapse-id\":\"13\"}", "ibmenchromebody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenfirefoxbody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenhuaweibody": "{\"message\":{\"android\":{\"notification\":{\"title\":\"New Message\",\"body\":\"Hello World\",\"click_action\":{\"type\":3}}}}}", "ibmenmms": "{\"content\": \"iVBORw0KGgoAAAANSUhEUgAAAFoAAAA4CAYAAAB9lO9TAAAAAXNSR0IArs4c6QAAActpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgSW1hZ2VSZWFkeTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KKS7NPQAABO9JREFUeAHtW81x2zoQBhgn46NLYCpISpA6cCowfYjn3ZJUELmC5Og4h0AVPKeC8HWgDh5L8DGTTMR8KxoSBCzAX3us8WKGJrg/34KfqF2AkJWSJgwIA8KAMCAMCAPCgDAgDAgDwoAw8LQZ0GfFRT2egrpcmq9zwpkGzx9RXWqllsZ8Nb7GXg+Pq83SfDm3OKlzUVy8B1mfUjYxXRZTPC65ntVKfwOZ/xfFP7Npx1afFkVx0gUTJJ91seNsjvCkXHKKnrLK2k+EZ+GY83oGYlbGmFtXOS7uMRG9h+di2z5ifEefDmmPlQE9zVfxzy3y54puchq8rnT93D7Z4+PusLjoY/GParX+wQH3lJWwn5PPRHgE1dq0evEBRp/JcGxcrZ6fA8YQlt+K4u3rsfgHUgz9W2+uxxQnHxHF9p0vs9fQDS6CFgPFMNs8iVYw7PxnW0imwes/ivuMq1W9VOqZFMH+H8vDe2guJCbmC07eyLLSmKsyrg81aby6Si1E0r4UK8NM76oKo1JhTt0H56FQ1K83Od9qkZ8LpXSuerVwTEecP3LfR05OMq3WdCrpT9eWwgNGicPgYFuLL8Yz3JcLiNnFjfvBIT/TSvCEs43JMKYSusrVH3QxpBtxSXFvbHh/fWp98Y2gfi+Sra9/Zp/olsJS+SBt12m8XSHlcO7Pl4tGMnc82QpP5zxmGZf/XMV1orlXBvCBhe2sePsjlDYSOCTfonF+KTzOvotMK/3dL1y+39C4hA2sqlZ1dG7tx3KvwdEHu1K2cjZ1oOTNrAFz/o+RtYiSeC2+rLpS6pdhNXvCYXFRgHPA4Osf9b+FPpG7s0B3iMUQebN+gzkd3eyIVpdwriIAOeSnER3E+iauE40w8BQYQN4OW2pbCA6XKEKL0CsuSeHFvaIaSh3nfrHhrNNxm+032rWBb875czJMN18qtS6Qxz9yepLRlNRfPR9ijsYrS/0vdlmCghO78RZ5n3y7t2pswd1TR2Ydm0KxZ+hcVE6/YzeJ1xHDN3vxHpKFL92/TsXVK7KlN3N4Ol/v+/FXmPYtG01d4Vw2fe6vu+jh9CK7NwaQcsPWsm2Dt21XVegVl6TxdttgHMJD+DZp6Ljtqd7eN8aUY6x0RFq4LcamjtS2DT6ZS6AvIhFYcQoPDiWOOesIYdoXo6Fvf6Slfd24z/MWW0ox5whjmlBtxfCY7qdsbJu/h1gM3fHTZnC+JxhwcTeDqdKuv2/S+rSWfaLxiFzG3bIyruM1abzo6mwD1uLLB7yTtvhWrjNsaaM3kj5oc8JdiWbl3Xt5F8LtV+6F9B+QAfyu42IxPt5uO2oavO4jsoun/nF3Y7bRYttWNsbOjn6WtsbRveF3HfEVTneYTeI3ZD8RXtfQKxguyHhA3BJuBofT9AmDw+Tm9Yyxc3DC7kEXQ+TVZXhLYyRZQOpUMQ78dx27LaP0lhdHfrh6o/UBZjFz19p/Z9HoMoMPoHTtpP9IGMAP0ePbVt3HqFdLc03TI/wQfQq8dGStnuHt3VXlWvWPuxuzi0N9i4WnNtiSIj0VTeToM+p3bZhHR7drumLADmG3bQq8LZjfqZAiApIbo75x3TH7YfQJJDlmG1RsmaZzCGc4Ojd2wdLZ++EMb7AExmZs/F8rphwKFUC8in01JaZgCQPCgDAgDAgDwoAwIAwIA8KAMCAMPHUG/gKC0oz7fm25ogAAAABJRU5ErkJggg==\", \"content_type\": \"image/png\"}" }
- Body
The version of the notification specification.
Possible values: 3 ≤ length ≤ 100, Value must match regular expression
/[0-9][0-9.]*[0-9]$/
The time notification was created.
The unique identifier of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source of notifications.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The notifications type.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The severity of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source id of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default short text for the message.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default long text for the message.
Possible values: 1 ≤ length ≤ 3000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The template id Array of string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The email id string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The slack channel id/member id stringified array.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The SMS number string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The html body of notification.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Stringified MMS Attachment JSON.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The payload for webhook notification.
The notification content type.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:' ]*/
Default:
application/json
If platforms or tags or user_ids is used then do not use fcm_devices / apns_devices / chrome_devices / firefox_devices / safari_devices with it. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "platforms": [ "push_android" ] }
Payload describing a notification FCM body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification APNs body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for iOS notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Notification payload for Chrome. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Chrome notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Notification payload for Firefox. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Firefox notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Payload describing a notification Huawei body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification Safari body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Payload describing a notification create request.
Examples:{ "specversion": "1.0", "time": "2018-04-05T17:31:00Z", "id": "9ca5e995-3cbb-4985-ba27-9f8d7f7b10e2", "ibmenseverity": "HIGH", "source": "api-server", "ibmensourceid": "b0935fd7-8597-475a-8526-704e2e4714e8:api", "type": "*", "data": { "createTimestamp": 1557282940339, "shortDescription": "Test notification" }, "ibmensubject": "email subject", "ibmentemplates": "[\"149b0e11-8a7c-4fda-a847-5d79e01b71dc\"]", "ibmenmailto": "[\"abc@ibm.com\", \"def@in.ibm.com\"]", "ibmenslackto": "[\"sgjhgsjaS\",\"agjhgsjaS\"]", "ibmensmsto": "[\"+911234567890\", \"+911224567890\"]", "ibmenhtmlbody": "\"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https: //cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>\"", "ibmendefaultshort": "Lorem ipsum dolor sit amet, consectetur adipiscing elit", "ibmendefaultlong": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", "datacontenttype": "application/json", "ibmenpushto": "{\"fcm_devices\": [\"9c75975a-37d0-3898-905d-3b5ee0d7c172\",\"C9CACDF5-6EBF-49E1-AD60-E25BA23E954C\"]}", "ibmenfcmbody": "{\"notification\":{\"title\":\"Portugal vs. Denmark\",\"body\":\"great match!\"}}", "ibmenapnsbody": "{\"aps\":{\"alert\":{\"title\":\"GameRequest\",\"body\":\"Bobwantstoplaypoker\",\"action-loc-key\":\"PLAY\"},\"badge\":5}}", "ibmenapnsheaders": "{\"apns-collapse-id\":\"13\"}", "ibmenchromebody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenfirefoxbody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenhuaweibody": "{\"message\":{\"android\":{\"notification\":{\"title\":\"New Message\",\"body\":\"Hello World\",\"click_action\":{\"type\":3}}}}}", "ibmenmms": "{\"content\": \"iVBORw0KGgoAAAANSUhEUgAAAFoAAAA4CAYAAAB9lO9TAAAAAXNSR0IArs4c6QAAActpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgSW1hZ2VSZWFkeTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KKS7NPQAABO9JREFUeAHtW81x2zoQBhgn46NLYCpISpA6cCowfYjn3ZJUELmC5Og4h0AVPKeC8HWgDh5L8DGTTMR8KxoSBCzAX3us8WKGJrg/34KfqF2AkJWSJgwIA8KAMCAMCAPCgDAgDAgDwoAw8LQZ0GfFRT2egrpcmq9zwpkGzx9RXWqllsZ8Nb7GXg+Pq83SfDm3OKlzUVy8B1mfUjYxXRZTPC65ntVKfwOZ/xfFP7Npx1afFkVx0gUTJJ91seNsjvCkXHKKnrLK2k+EZ+GY83oGYlbGmFtXOS7uMRG9h+di2z5ifEefDmmPlQE9zVfxzy3y54puchq8rnT93D7Z4+PusLjoY/GParX+wQH3lJWwn5PPRHgE1dq0evEBRp/JcGxcrZ6fA8YQlt+K4u3rsfgHUgz9W2+uxxQnHxHF9p0vs9fQDS6CFgPFMNs8iVYw7PxnW0imwes/ivuMq1W9VOqZFMH+H8vDe2guJCbmC07eyLLSmKsyrg81aby6Si1E0r4UK8NM76oKo1JhTt0H56FQ1K83Od9qkZ8LpXSuerVwTEecP3LfR05OMq3WdCrpT9eWwgNGicPgYFuLL8Yz3JcLiNnFjfvBIT/TSvCEs43JMKYSusrVH3QxpBtxSXFvbHh/fWp98Y2gfi+Sra9/Zp/olsJS+SBt12m8XSHlcO7Pl4tGMnc82QpP5zxmGZf/XMV1orlXBvCBhe2sePsjlDYSOCTfonF+KTzOvotMK/3dL1y+39C4hA2sqlZ1dG7tx3KvwdEHu1K2cjZ1oOTNrAFz/o+RtYiSeC2+rLpS6pdhNXvCYXFRgHPA4Osf9b+FPpG7s0B3iMUQebN+gzkd3eyIVpdwriIAOeSnER3E+iauE40w8BQYQN4OW2pbCA6XKEKL0CsuSeHFvaIaSh3nfrHhrNNxm+032rWBb875czJMN18qtS6Qxz9yepLRlNRfPR9ijsYrS/0vdlmCghO78RZ5n3y7t2pswd1TR2Ydm0KxZ+hcVE6/YzeJ1xHDN3vxHpKFL92/TsXVK7KlN3N4Ol/v+/FXmPYtG01d4Vw2fe6vu+jh9CK7NwaQcsPWsm2Dt21XVegVl6TxdttgHMJD+DZp6Ljtqd7eN8aUY6x0RFq4LcamjtS2DT6ZS6AvIhFYcQoPDiWOOesIYdoXo6Fvf6Slfd24z/MWW0ox5whjmlBtxfCY7qdsbJu/h1gM3fHTZnC+JxhwcTeDqdKuv2/S+rSWfaLxiFzG3bIyruM1abzo6mwD1uLLB7yTtvhWrjNsaaM3kj5oc8JdiWbl3Xt5F8LtV+6F9B+QAfyu42IxPt5uO2oavO4jsoun/nF3Y7bRYttWNsbOjn6WtsbRveF3HfEVTneYTeI3ZD8RXtfQKxguyHhA3BJuBofT9AmDw+Tm9Yyxc3DC7kEXQ+TVZXhLYyRZQOpUMQ78dx27LaP0lhdHfrh6o/UBZjFz19p/Z9HoMoMPoHTtpP9IGMAP0ePbVt3HqFdLc03TI/wQfQq8dGStnuHt3VXlWvWPuxuzi0N9i4WnNtiSIj0VTeToM+p3bZhHR7drumLADmG3bQq8LZjfqZAiApIbo75x3TH7YfQJJDlmG1RsmaZzCGc4Ojd2wdLZ++EMb7AExmZs/F8rphwKFUC8in01JaZgCQPCgDAgDAgDwoAwIAwIA8KAMCAMPHUG/gKC0oz7fm25ogAAAABJRU5ErkJggg==\", \"content_type\": \"image/png\"}" }
- body
The version of the notification specification.
Possible values: 3 ≤ length ≤ 100, Value must match regular expression
/[0-9][0-9.]*[0-9]$/
The time notification was created.
The unique identifier of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source of notifications.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The notifications type.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The severity of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source id of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default short text for the message.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default long text for the message.
Possible values: 1 ≤ length ≤ 3000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The template id Array of string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The email id string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The slack channel id/member id stringified array.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The SMS number string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The html body of notification.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Stringified MMS Attachment JSON.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The payload for webhook notification.
The notification content type.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:' ]*/
Default:
application/json
If platforms or tags or user_ids is used then do not use fcm_devices / apns_devices / chrome_devices / firefox_devices / safari_devices with it. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "platforms": [ "push_android" ] }
Payload describing a notification FCM body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification APNs body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for iOS notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Notification payload for Chrome. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Chrome notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Notification payload for Firefox. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Firefox notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Payload describing a notification Huawei body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification Safari body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Payload describing a notification create request.
Examples:{ "specversion": "1.0", "time": "2018-04-05T17:31:00Z", "id": "9ca5e995-3cbb-4985-ba27-9f8d7f7b10e2", "ibmenseverity": "HIGH", "source": "api-server", "ibmensourceid": "b0935fd7-8597-475a-8526-704e2e4714e8:api", "type": "*", "data": { "createTimestamp": 1557282940339, "shortDescription": "Test notification" }, "ibmensubject": "email subject", "ibmentemplates": "[\"149b0e11-8a7c-4fda-a847-5d79e01b71dc\"]", "ibmenmailto": "[\"abc@ibm.com\", \"def@in.ibm.com\"]", "ibmenslackto": "[\"sgjhgsjaS\",\"agjhgsjaS\"]", "ibmensmsto": "[\"+911234567890\", \"+911224567890\"]", "ibmenhtmlbody": "\"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https: //cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>\"", "ibmendefaultshort": "Lorem ipsum dolor sit amet, consectetur adipiscing elit", "ibmendefaultlong": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", "datacontenttype": "application/json", "ibmenpushto": "{\"fcm_devices\": [\"9c75975a-37d0-3898-905d-3b5ee0d7c172\",\"C9CACDF5-6EBF-49E1-AD60-E25BA23E954C\"]}", "ibmenfcmbody": "{\"notification\":{\"title\":\"Portugal vs. Denmark\",\"body\":\"great match!\"}}", "ibmenapnsbody": "{\"aps\":{\"alert\":{\"title\":\"GameRequest\",\"body\":\"Bobwantstoplaypoker\",\"action-loc-key\":\"PLAY\"},\"badge\":5}}", "ibmenapnsheaders": "{\"apns-collapse-id\":\"13\"}", "ibmenchromebody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenfirefoxbody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenhuaweibody": "{\"message\":{\"android\":{\"notification\":{\"title\":\"New Message\",\"body\":\"Hello World\",\"click_action\":{\"type\":3}}}}}", "ibmenmms": "{\"content\": \"iVBORw0KGgoAAAANSUhEUgAAAFoAAAA4CAYAAAB9lO9TAAAAAXNSR0IArs4c6QAAActpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgSW1hZ2VSZWFkeTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KKS7NPQAABO9JREFUeAHtW81x2zoQBhgn46NLYCpISpA6cCowfYjn3ZJUELmC5Og4h0AVPKeC8HWgDh5L8DGTTMR8KxoSBCzAX3us8WKGJrg/34KfqF2AkJWSJgwIA8KAMCAMCAPCgDAgDAgDwoAw8LQZ0GfFRT2egrpcmq9zwpkGzx9RXWqllsZ8Nb7GXg+Pq83SfDm3OKlzUVy8B1mfUjYxXRZTPC65ntVKfwOZ/xfFP7Npx1afFkVx0gUTJJ91seNsjvCkXHKKnrLK2k+EZ+GY83oGYlbGmFtXOS7uMRG9h+di2z5ifEefDmmPlQE9zVfxzy3y54puchq8rnT93D7Z4+PusLjoY/GParX+wQH3lJWwn5PPRHgE1dq0evEBRp/JcGxcrZ6fA8YQlt+K4u3rsfgHUgz9W2+uxxQnHxHF9p0vs9fQDS6CFgPFMNs8iVYw7PxnW0imwes/ivuMq1W9VOqZFMH+H8vDe2guJCbmC07eyLLSmKsyrg81aby6Si1E0r4UK8NM76oKo1JhTt0H56FQ1K83Od9qkZ8LpXSuerVwTEecP3LfR05OMq3WdCrpT9eWwgNGicPgYFuLL8Yz3JcLiNnFjfvBIT/TSvCEs43JMKYSusrVH3QxpBtxSXFvbHh/fWp98Y2gfi+Sra9/Zp/olsJS+SBt12m8XSHlcO7Pl4tGMnc82QpP5zxmGZf/XMV1orlXBvCBhe2sePsjlDYSOCTfonF+KTzOvotMK/3dL1y+39C4hA2sqlZ1dG7tx3KvwdEHu1K2cjZ1oOTNrAFz/o+RtYiSeC2+rLpS6pdhNXvCYXFRgHPA4Osf9b+FPpG7s0B3iMUQebN+gzkd3eyIVpdwriIAOeSnER3E+iauE40w8BQYQN4OW2pbCA6XKEKL0CsuSeHFvaIaSh3nfrHhrNNxm+032rWBb875czJMN18qtS6Qxz9yepLRlNRfPR9ijsYrS/0vdlmCghO78RZ5n3y7t2pswd1TR2Ydm0KxZ+hcVE6/YzeJ1xHDN3vxHpKFL92/TsXVK7KlN3N4Ol/v+/FXmPYtG01d4Vw2fe6vu+jh9CK7NwaQcsPWsm2Dt21XVegVl6TxdttgHMJD+DZp6Ljtqd7eN8aUY6x0RFq4LcamjtS2DT6ZS6AvIhFYcQoPDiWOOesIYdoXo6Fvf6Slfd24z/MWW0ox5whjmlBtxfCY7qdsbJu/h1gM3fHTZnC+JxhwcTeDqdKuv2/S+rSWfaLxiFzG3bIyruM1abzo6mwD1uLLB7yTtvhWrjNsaaM3kj5oc8JdiWbl3Xt5F8LtV+6F9B+QAfyu42IxPt5uO2oavO4jsoun/nF3Y7bRYttWNsbOjn6WtsbRveF3HfEVTneYTeI3ZD8RXtfQKxguyHhA3BJuBofT9AmDw+Tm9Yyxc3DC7kEXQ+TVZXhLYyRZQOpUMQ78dx27LaP0lhdHfrh6o/UBZjFz19p/Z9HoMoMPoHTtpP9IGMAP0ePbVt3HqFdLc03TI/wQfQq8dGStnuHt3VXlWvWPuxuzi0N9i4WnNtiSIj0VTeToM+p3bZhHR7drumLADmG3bQq8LZjfqZAiApIbo75x3TH7YfQJJDlmG1RsmaZzCGc4Ojd2wdLZ++EMb7AExmZs/F8rphwKFUC8in01JaZgCQPCgDAgDAgDwoAwIAwIA8KAMCAMPHUG/gKC0oz7fm25ogAAAABJRU5ErkJggg==\", \"content_type\": \"image/png\"}" }
- body
The version of the notification specification.
Possible values: 3 ≤ length ≤ 100, Value must match regular expression
/[0-9][0-9.]*[0-9]$/
The time notification was created.
The unique identifier of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source of notifications.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The notifications type.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The severity of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source id of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default short text for the message.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default long text for the message.
Possible values: 1 ≤ length ≤ 3000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The template id Array of string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The email id string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The slack channel id/member id stringified array.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The SMS number string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The html body of notification.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Stringified MMS Attachment JSON.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The payload for webhook notification.
The notification content type.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:' ]*/
Default:
application/json
If platforms or tags or user_ids is used then do not use fcm_devices / apns_devices / chrome_devices / firefox_devices / safari_devices with it. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "platforms": [ "push_android" ] }
Payload describing a notification FCM body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification APNs body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for iOS notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Notification payload for Chrome. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Chrome notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Notification payload for Firefox. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Firefox notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Payload describing a notification Huawei body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification Safari body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The sendNotifications options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Payload describing a notification create request.
Examples:{ "specversion": "1.0", "time": "2018-04-05T17:31:00Z", "id": "9ca5e995-3cbb-4985-ba27-9f8d7f7b10e2", "ibmenseverity": "HIGH", "source": "api-server", "ibmensourceid": "b0935fd7-8597-475a-8526-704e2e4714e8:api", "type": "*", "data": { "createTimestamp": 1557282940339, "shortDescription": "Test notification" }, "ibmensubject": "email subject", "ibmentemplates": "[\"149b0e11-8a7c-4fda-a847-5d79e01b71dc\"]", "ibmenmailto": "[\"abc@ibm.com\", \"def@in.ibm.com\"]", "ibmenslackto": "[\"sgjhgsjaS\",\"agjhgsjaS\"]", "ibmensmsto": "[\"+911234567890\", \"+911224567890\"]", "ibmenhtmlbody": "\"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https: //cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>\"", "ibmendefaultshort": "Lorem ipsum dolor sit amet, consectetur adipiscing elit", "ibmendefaultlong": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", "datacontenttype": "application/json", "ibmenpushto": "{\"fcm_devices\": [\"9c75975a-37d0-3898-905d-3b5ee0d7c172\",\"C9CACDF5-6EBF-49E1-AD60-E25BA23E954C\"]}", "ibmenfcmbody": "{\"notification\":{\"title\":\"Portugal vs. Denmark\",\"body\":\"great match!\"}}", "ibmenapnsbody": "{\"aps\":{\"alert\":{\"title\":\"GameRequest\",\"body\":\"Bobwantstoplaypoker\",\"action-loc-key\":\"PLAY\"},\"badge\":5}}", "ibmenapnsheaders": "{\"apns-collapse-id\":\"13\"}", "ibmenchromebody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenfirefoxbody": "{\"title\":\"GameRequest\",\"options\":{\"body\":\"Bobwantstoplaypoker\",\"badge\":5}}", "ibmenhuaweibody": "{\"message\":{\"android\":{\"notification\":{\"title\":\"New Message\",\"body\":\"Hello World\",\"click_action\":{\"type\":3}}}}}", "ibmenmms": "{\"content\": \"iVBORw0KGgoAAAANSUhEUgAAAFoAAAA4CAYAAAB9lO9TAAAAAXNSR0IArs4c6QAAActpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+QWRvYmUgSW1hZ2VSZWFkeTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KKS7NPQAABO9JREFUeAHtW81x2zoQBhgn46NLYCpISpA6cCowfYjn3ZJUELmC5Og4h0AVPKeC8HWgDh5L8DGTTMR8KxoSBCzAX3us8WKGJrg/34KfqF2AkJWSJgwIA8KAMCAMCAPCgDAgDAgDwoAw8LQZ0GfFRT2egrpcmq9zwpkGzx9RXWqllsZ8Nb7GXg+Pq83SfDm3OKlzUVy8B1mfUjYxXRZTPC65ntVKfwOZ/xfFP7Npx1afFkVx0gUTJJ91seNsjvCkXHKKnrLK2k+EZ+GY83oGYlbGmFtXOS7uMRG9h+di2z5ifEefDmmPlQE9zVfxzy3y54puchq8rnT93D7Z4+PusLjoY/GParX+wQH3lJWwn5PPRHgE1dq0evEBRp/JcGxcrZ6fA8YQlt+K4u3rsfgHUgz9W2+uxxQnHxHF9p0vs9fQDS6CFgPFMNs8iVYw7PxnW0imwes/ivuMq1W9VOqZFMH+H8vDe2guJCbmC07eyLLSmKsyrg81aby6Si1E0r4UK8NM76oKo1JhTt0H56FQ1K83Od9qkZ8LpXSuerVwTEecP3LfR05OMq3WdCrpT9eWwgNGicPgYFuLL8Yz3JcLiNnFjfvBIT/TSvCEs43JMKYSusrVH3QxpBtxSXFvbHh/fWp98Y2gfi+Sra9/Zp/olsJS+SBt12m8XSHlcO7Pl4tGMnc82QpP5zxmGZf/XMV1orlXBvCBhe2sePsjlDYSOCTfonF+KTzOvotMK/3dL1y+39C4hA2sqlZ1dG7tx3KvwdEHu1K2cjZ1oOTNrAFz/o+RtYiSeC2+rLpS6pdhNXvCYXFRgHPA4Osf9b+FPpG7s0B3iMUQebN+gzkd3eyIVpdwriIAOeSnER3E+iauE40w8BQYQN4OW2pbCA6XKEKL0CsuSeHFvaIaSh3nfrHhrNNxm+032rWBb875czJMN18qtS6Qxz9yepLRlNRfPR9ijsYrS/0vdlmCghO78RZ5n3y7t2pswd1TR2Ydm0KxZ+hcVE6/YzeJ1xHDN3vxHpKFL92/TsXVK7KlN3N4Ol/v+/FXmPYtG01d4Vw2fe6vu+jh9CK7NwaQcsPWsm2Dt21XVegVl6TxdttgHMJD+DZp6Ljtqd7eN8aUY6x0RFq4LcamjtS2DT6ZS6AvIhFYcQoPDiWOOesIYdoXo6Fvf6Slfd24z/MWW0ox5whjmlBtxfCY7qdsbJu/h1gM3fHTZnC+JxhwcTeDqdKuv2/S+rSWfaLxiFzG3bIyruM1abzo6mwD1uLLB7yTtvhWrjNsaaM3kj5oc8JdiWbl3Xt5F8LtV+6F9B+QAfyu42IxPt5uO2oavO4jsoun/nF3Y7bRYttWNsbOjn6WtsbRveF3HfEVTneYTeI3ZD8RXtfQKxguyHhA3BJuBofT9AmDw+Tm9Yyxc3DC7kEXQ+TVZXhLYyRZQOpUMQ78dx27LaP0lhdHfrh6o/UBZjFz19p/Z9HoMoMPoHTtpP9IGMAP0ePbVt3HqFdLc03TI/wQfQq8dGStnuHt3VXlWvWPuxuzi0N9i4WnNtiSIj0VTeToM+p3bZhHR7drumLADmG3bQq8LZjfqZAiApIbo75x3TH7YfQJJDlmG1RsmaZzCGc4Ojd2wdLZ++EMb7AExmZs/F8rphwKFUC8in01JaZgCQPCgDAgDAgDwoAwIAwIA8KAMCAMPHUG/gKC0oz7fm25ogAAAABJRU5ErkJggg==\", \"content_type\": \"image/png\"}" }
- body
The version of the notification specification.
Possible values: 3 ≤ length ≤ 100, Value must match regular expression
/[0-9][0-9.]*[0-9]$/
The time notification was created.
The unique identifier of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source of notifications.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The notifications type.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The severity of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The source id of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default short text for the message.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Default long text for the message.
Possible values: 1 ≤ length ≤ 3000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The template id Array of string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The email id string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The slack channel id/member id stringified array.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The SMS number string.
Possible values: 1 ≤ length ≤ 5000, Value must match regular expression
/.*/
The html body of notification.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The subject of the notification.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Stringified MMS Attachment JSON.
Possible values: 1 ≤ length ≤ 20000, Value must match regular expression
/.*/
The payload for webhook notification.
The notification content type.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:' ]*/
Default:
application/json
If platforms or tags or user_ids is used then do not use fcm_devices / apns_devices / chrome_devices / firefox_devices / safari_devices with it. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "platforms": [ "push_android" ] }
Payload describing a notification FCM body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification APNs body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for iOS notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Notification payload for Chrome. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Chrome notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Notification payload for Firefox. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Headers for a Firefox notification. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Examples:{ "TTL": 3600, "Topic": "test", "Urgency": "high" }
Payload describing a notification Huawei body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Payload describing a notification Safari body. Value should be stringified.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/notifications" --data-raw '{ "id": "b2198eb8-04b1-48ec-a78c-ee87694dd845", "time": "13/03/2024, 22:23:01", "type": "com.ibm.cloud.sysdig-monitor.alert:downtime", "ibmensmstext": "Hi, Welcome from the IBM Cloud - Event Notifications service!", "ibmensubject": "Monitoring alert.", "source": "apisource/git", "specversion": "1.0", "ibmensourceid": "0ca10e8b-b772-4528-85c5-cab39776762b:api", "data": {"alert":"Alert from Event Notifications service","message":"Hi, Welcome from the IBM Cloud Event Notifications service. Reference-id: 09691643-a1f4-47b3-96a1-306f7abc3f3e"}, "datacontenttype": "application/json", "ibmendefaultlong": "This is a original long message", "ibmendefaultshort": "IBM Cloud Event Notifications is a routing service that provides information about critical events in your IBM Cloud account", "ibmenfcmbody": "{\"notification\":{\"title\":\"IBM Cloud Event Notifications is a routing service that provides information about critical events in your IBM Cloud account\",\"time_to_live\":100}}", "ibmenapnsbody": "{\"aps\":{\"alert\":{\"title\":\"Hello!! Alert from Event Notifications service\",\"body\":\"IBM Cloud Event Notifications is a routing service that provides information about critical events in your IBM Cloud account\",\"action-loc-key\":\"PLAY\"},\"badge\":5}}", "ibmensafaribody":"{\"aps\":{\"alert\":{\"title\":\"Alert! from Event Notifications Service\",\"body\":\"BoardinghasbegunforFlightA998.\",\"action\":\"View\"},\"url-args\":[\"boarding\",\"A998\"]}}", "ibmenhuaweibody":"{\"message\":{\"android\":{\"notification\":{\"title\":\"New Message\",\"body\":\"Hello World\",\"click_action\":{\"type\":3}}}}}", "ibmenfirefoxbody": "{\"title\":\"Alert from Event Notifications service\"}", "ibmenchromebody": "{\"title\":\"Alert from Event Notifications service\"}", "ibmenpushto": "{\"platforms\":[\"push_chrome\",\"push_firefox\",\"push_android\",\"push_ios\",\"push_safari\",\"push_huawei\"]}", "ibmenmailto": "[\"abc@ibm.com\", \"xyz@ibm.com\"]", "ibmensmsto": "[\"+911234567890\", \"+911224567890\"]", "ibmenslackto": "[\"Z07FALXBHXX\", \"XX7FALXBHXX\"]", "ibmentemplates": "[\"10e5b8fc-45e6-4fcc-bf9e-1961ca418381\"]", "ibmenhtmlbody": "Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https://cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>" }'
notificationCreateModel := &eventnotificationsv1.NotificationCreate{} notificationCreateModel.Ibmenseverity = ¬ificationSeverity notificationCreateModel.ID = ¬ificationID notificationCreateModel.Source = ¬ificationsSouce notificationCreateModel.Ibmensourceid = &sourceID notificationCreateModel.Type = &typeValue notificationCreateModel.Time = &strfmt.DateTime{} notificationCreateModel.Specversion = &specVersion notificationDevicesModel := "{\"platforms\":[\"push_ios\",\"push_android\",\"push_chrome\",\"push_firefox\",\"push_huawei\"]}" notificationSafariBodyModel := "{\"en_data\": {\"alert\": \"Alert message\"}}" mailTo := "[\"abc@ibm.com\", \"def@us.ibm.com\"]" smsTo := "[\"+911234567890\", \"+911224567890\"]" slackTo := "[\"C07FALXBH4G\", \"C07FALXBJ4G\"]" mms := "{\"content\": \"encode mms content\", \"content_type\": \"image/png\"}" htmlBody := "\"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https: //cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>\"" notificationCreateModel.Ibmenpushto = ¬ificationDevicesModel apnsOptions := map[string]interface{}{ "aps": map[string]interface{}{ "alert": "APNS alert", "badge": 5, }, } ibmenapnsbody, _ := json.Marshal(apnsOptions) ibmenapnsbodyString := string(ibmenapnsbody) fcmOptions := map[string]interface{}{ "notification": map[string]interface{}{ "title": "FCM alert", "body": "alert message for FCM", }, } ibmenfcmbody, _ := json.Marshal(fcmOptions) ibmenfcmbodyString := string(ibmenfcmbody) apnsHeaders := map[string]interface{}{ "apns-collapse-id": "collapse-id", } ibmenapnsheaderbody, _ := json.Marshal(apnsHeaders) ibmenapnsheaderstring := string(ibmenapnsheaderbody) notificationHuaweiBodyModel := "{\"message\": {\"android\": {\"notification\": {\"title\": \"Breaking News\",\"body\": \"New news story available.\"},\"data\": {\"name\": \"Willie Greenholt\",\"description\": \"description\"}}}}" notificationCreateModel.Ibmenfcmbody = &ibmenfcmbodyString notificationCreateModel.Ibmenapnsbody = &ibmenapnsbodyString notificationCreateModel.Ibmenapnsheaders = &ibmenapnsheaderstring notificationCreateModel.Ibmensafaribody = ¬ificationSafariBodyModel notificationCreateModel.Ibmenhuaweibody = ¬ificationHuaweiBodyModel notificationCreateModel.Ibmenmailto = &mailTo notificationCreateModel.Ibmensmsto = &smsTo notificationCreateModel.Ibmensmsto = &smsTo notificationCreateModel.Ibmenslackto = &slackTo notificationCreateModel.Ibmenmms = &mms notificationCreateModel.Ibmensubject = core.StringPtr("Notification subject") notificationCreateModel.Ibmenhtmlbody = core.StringPtr(htmlBody) notificationCreateModel.Ibmendefaultshort = core.StringPtr("This is simple test alert from IBM Cloud Event Notifications service.") notificationCreateModel.Ibmendefaultlong = core.StringPtr("Hi, we are making sure from our side that the service is available for consumption.") sendNotificationsOptionsModel := new(eventnotificationsv1.SendNotificationsOptions) sendNotificationsOptionsModel.InstanceID = &instanceID sendNotificationsOptionsModel.Body = notificationCreateModel notificationResponse, response, err := eventNotificationsService.SendNotifications(sendNotificationsOptionsModel) if err != nil { panic(err) } b, _ := json.MarshalIndent(notificationResponse, "", " ") fmt.Println(string(b))
// NotificationFCMDevices const notificationFcmDevicesModel = { user_ids: [userId], }; const notificationApnsBodyModel = { aps: { alert: 'Game Request', badge: 5, }, }; const notificationFcmBodyModel = { notification: { title: 'Portugal vs. Denmark', badge: 'great match!', }, }; const apnsHeaders = { 'apns-collapse-id': '123', }; const notificationSafariBodymodel = { saf: { alert: 'Game Request', badge: 5, }, }; const notificationHuaweiBodyMessageDataModel = { 'android': { 'notification': { 'title': 'Alert message', 'body': 'Bob wants to play cricket', }, 'data': { 'name': 'Robert', 'description': 'notification for the cricket', }, }, }; const notificationHuaweiBodyModel = { message: notificationHuaweiBodyMessageDataModel, }; const notificationCreateModel = { instanceId, ibmenseverity: notificationSeverity, id: notificationID, source: notificationsSouce, ibmensourceid: sourceId, type: typeValue, time: date, ibmenpushto: JSON.stringify(notificationFcmDevicesModel), ibmenmailto: JSON.stringify(['abc@ibm.com', 'def@us.ibm.com']), ibmenmms: JSON.stringify('{'content': 'encoded mms content', 'content_type': 'image/png'}'), ibmensmsto: JSON.stringify(['+911234567890', '+911224567890']), ibmenslackto: JSON.stringify(['C07FALXBH4G', 'C07FALXBU4G']), ibmensubject: 'certificate expire', ibmenhtmlbody: htmlBody, ibmenfcmbody: JSON.stringify(notificationFcmBodyModel), ibmenapnsbody: JSON.stringify(notificationApnsBodyModel), ibmensafaribody: JSON.stringify(notificationSafariBodymodel), ibmenhuaweibody: JSON.stringify(notificationHuaweiBodyModel), ibmendefaultshort: 'testString', ibmendefaultlong: 'testString', specversion: '1.0', }; const body = notificationCreateModel; const sendNotificationsParams = { instanceId, body, }; let res; try { res = await eventNotificationsService.sendNotifications(sendNotificationsParams); } catch (err) { console.warn(err); }
String notificationDevices = "{\"platforms\":[\"push_ios\",\"push_android\",\"push_chrome\",\"push_firefox\", \"push_huawei\"]}"; String fcmJsonString = "{\"message\": {\"android\": {\"notification\": {\"title\": \"Alert message\",\"body\": \"Bob wants to play Poker\"},\"data\": {\"name\": \"Willie Greenholt\",\"description\": \"notification for the Poker\"}}}}"; String apnsJsonString = "{\"alert\": \"Game Request\", \"badge\": 5 }"; String safariJsonString = "{\"aps\":{\"alert\":{\"title\":\"FlightA998NowBoarding\",\"body\":\"BoardinghasbegunforFlightA998.\",\"action\":\"View\"},\"url-args\":[\"boarding\",\"A998\"]}}"; String huaweiJsonString = "{\"message\":{\"android\":{\"notification\":{\"title\":\"New Message\",\"body\":\"Hello World\",\"click_action\":{\"type\":3}}}}}"; String mailTo = "[\"abc@ibm.com\", \"def@us.ibm.com\"]"; String smsTo = "[\"+911234567890\", \"+911224567890\"]"; String slackTo = "[\"C07FALXBH4G\", \"C07FALXBJ4G\"]"; String mms = "{\"content\": \"encode mms content\", \"content_type\": \"image/png\"}"; String htmlBody = "\"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to <a href=\"https: //cloud.ibm.com/security-compliance/dashboard\">Security and Complaince dashboard</a> to find more information<br/>\""; NotificationCreate body = new NotificationCreate.Builder() .id(instanceId) .ibmenseverity("MEDIUM") .id("FCM ID") .source(sourceId) .ibmensourceid(sourceId) .type("com.acme.offer:new") .time(new java.util.Date()) .ibmenpushto(notificationDevices) .ibmensubject("certificate expires") .ibmenmailto(mailTo) .ibmensmsto(smsTo) .ibmenslackto(slackTo) .ibmenmms(mms) .ibmenhtmlbody(htmlBody) .ibmenfcmbody(fcmJsonString) .ibmenapnsbody(apnsJsonString) .ibmenhuaweibody(huaweiJsonString) .ibmensafaribody(safariJsonString) .ibmendefaultshort("Match Info") .ibmendefaultlong("Portugal lead the group with a 2-0 win") .specversion("1.0") .build(); SendNotificationsOptions sendNotificationsOptions = new SendNotificationsOptions.Builder() .instanceId(instanceId) .body(body) .build(); Response<NotificationResponse> response = eventNotificationsService.sendNotifications(sendNotificationsOptions).execute(); NotificationResponse notificationResponse = response.getResult(); System.out.println(notificationResponse);
notification_devices_model = { 'platforms': ['push_huawei', 'push_android', 'push_ios', 'push_chrome', 'push_firefox'] } notification_apns_body_model = { "aps": { "alert": "Game Request", "badge": 5, }, } notification_fcm_body_model = { "notification": { "title": "Portugal vs. Denmark", "body": "great match!", }, } notification_huawei_body_message_data_model = { 'android': { 'notification': { 'title': 'Alert message', 'body': 'Bob wants to play Poker', }, 'data': { 'name': 'Robert', 'description': 'notification for the Poker', }, }, } notification_huawei_body_model = { 'message': notification_huawei_body_message_data_model, } message_apns_headers = { "apns-collapse-id": "123", } notificationSafariBodymodel = { 'saf': { 'alert': 'Game Request', 'badge': 5, }, } htmlbody = '"Hi ,<br/>Certificate expiring in 90 days.<br/><br/>Please login to ' \ '<a href="https: //cloud.ibm.com/security-compliance/dashboard">' \ 'Security and Complaince dashboard</a> to find more information<br/>"' mailto = '[\"abc@ibm.com\", \"def@us.ibm.com\"]' smsto = '["+911234567890", "+911224567890"]' slackto = '["C07FALXBH4G", "C07FAKXBH4G"]' mms = '{\"content\": \"encoded mms content\", \"content_type\": \"image/png\"}' notification_create_model = { 'ibmenseverity': notification_severity, 'ibmenfcmbody': json.dumps(notification_fcm_body_model), 'ibmenpushto': json.dumps(notification_devices_model), 'ibmenapnsbody': json.dumps(notification_apns_body_model), 'ibmenhuaweibody': json.dumps(notification_huawei_body_model), 'ibmensourceid': source_id, 'ibmendefaultshort': 'teststring', 'ibmendefaultlong': 'teststring', 'ibmensafaribody': json.dumps(notificationSafariBodymodel), 'ibmenhtmlbody': htmlbody, 'ibmensubject': 'Findings on IBM Cloud Security Advisor', 'ibmenmailto': mailto, 'ibmensmsto': smsto, 'ibmenslackto': slackto, 'ibmenmms': mms, 'id': notification_id, 'source': notifications_source, 'type': type_value, 'specversion': '1.0', 'time': '2019-01-01T12:00:00.000Z', } send_notifications_response = event_notifications_service.send_notifications( instance_id, body=notification_create_model ).get_result() print(json.dumps(send_notifications_response, indent=2))
Response
Payload describing a notifications response
Notification ID
Payload describing a notifications response.
{
"notification_id": "09463a26-64b7-412b-85de-dbad730e9230"
}
Notification ID.
Payload describing a notifications response.
{
"notification_id": "09463a26-64b7-412b-85de-dbad730e9230"
}
Notification ID.
Payload describing a notifications response.
{
"notification_id": "09463a26-64b7-412b-85de-dbad730e9230"
}
Notification ID.
Payload describing a notifications response.
{
"notification_id": "09463a26-64b7-412b-85de-dbad730e9230"
}
Notification ID.
Status Code
New notification created successfully
Bad or incorrect request body
Trying to access the API with unauthorized token
Request body type is not application/json
Internal server error
Unexpected Error
{ "notification_id": "09463a26-64b7-412b-85de-dbad730e9230" }
{ "notification_id": "09463a26-64b7-412b-85de-dbad730e9230" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new API Source
Create a new API Source
Create a new API Source.
Create a new API Source.
Create a new API Source.
Create a new API Source.
POST /v1/instances/{instance_id}/sources
(eventNotifications *EventNotificationsV1) CreateSources(createSourcesOptions *CreateSourcesOptions) (result *SourceResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateSourcesWithContext(ctx context.Context, createSourcesOptions *CreateSourcesOptions) (result *SourceResponse, response *core.DetailedResponse, err error)
createSources(params)
create_sources(self,
instance_id: str,
name: str,
description: str,
*,
enabled: bool = None,
**kwargs
) -> DetailedResponse
ServiceCall<SourceResponse> createSources(CreateSourcesOptions createSourcesOptions)
Request
Instantiate the CreateSourcesOptions
struct and set the fields to provide parameter values for the CreateSources
method.
Use the CreateSourcesOptions.Builder
to create a CreateSourcesOptions
object that contains the parameter values for the createSources
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Source object
{
"name": "Event Notification Create Source Acme",
"description": "This source is used for Acme Bank",
"enabled": true
}
Name of the source
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Description of the source
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Whether the source is enabled or not
Default:
true
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSources options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
The createSources options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" --data '{"name":"Event Notification Create Source Acme","description":"This source is used for Acme Bank","enabled":true}' "{base_url}/v1/instances/{instance_id}/sources"
createSourcesOptions := eventNotificationsService.NewCreateSourcesOptions( instanceID, "Event Notification Create Source Acme", "This source is used for Acme Bank", ) createSourcesOptions.SetEnabled(false) sourceResponse, response, err := eventNotificationsService.CreateSources(createSourcesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(sourceResponse, "", " ") fmt.Println(string(b))
const params = { instanceId, name: 'Event Notification Create Source Acme', description: 'This source is used for Acme Bank', enabled: false, }; let res; try { res = await eventNotificationsService.createSources(params); console.log(JSON.stringify(res.result, null, 2)); sourceId = res.result.id; } catch (err) { console.warn(err); }
CreateSourcesOptions createSourcesOptions = new CreateSourcesOptions.Builder() .instanceId(instanceId) .name("Event Notification Create Source Acme") .description("This source is used for Acme Bank") .enabled(false) .build(); Response<SourceResponse> response = eventNotificationsService.createSources(createSourcesOptions).execute(); SourceResponse sourceResponse = response.getResult(); System.out.println(sourceResponse);
source_response = event_notifications_service.create_sources( instance_id, name='Event Notification Create Source Acme', description='This source is used for Acme Bank', enabled=False ).get_result() print(json.dumps(source_response, indent=2))
Response
Payload describing a source
ID of the source
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Name of the source
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Description of the source
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Whether the source is enabled or not
Time of the created
Possible values: 1 ≤ length ≤ 50
Payload describing a source.
{
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"description": "This source is related to cloud events",
"enabled": false,
"created_at": "2021-09-14T20:43:47.484072Z"
}
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether the source is enabled or not.
Time of the created.
Payload describing a source.
{
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"description": "This source is related to cloud events",
"enabled": false,
"created_at": "2021-09-14T20:43:47.484072Z"
}
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether the source is enabled or not.
Time of the created.
Payload describing a source.
{
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"description": "This source is related to cloud events",
"enabled": false,
"created_at": "2021-09-14T20:43:47.484072Z"
}
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether the source is enabled or not.
Time of the created.
Payload describing a source.
{
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"description": "This source is related to cloud events",
"enabled": false,
"created_at": "2021-09-14T20:43:47.484072Z"
}
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether the source is enabled or not.
Time of the created.
Status Code
Response body after source creation
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate source
Request body type is not application/json
Internal server error
Unexpected Error
{ "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "description": "This source is related to cloud events", "enabled": false, "created_at": "2021-09-14T20:43:47.484072Z" }
{ "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "description": "This source is related to cloud events", "enabled": false, "created_at": "2021-09-14T20:43:47.484072Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "source_conflict", "message": "Duplicate source name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "source_conflict", "message": "Duplicate source name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all Sources
List all Sources
List all Sources.
List all Sources.
List all Sources.
List all Sources.
GET /v1/instances/{instance_id}/sources
(eventNotifications *EventNotificationsV1) ListSources(listSourcesOptions *ListSourcesOptions) (result *SourceList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListSourcesWithContext(ctx context.Context, listSourcesOptions *ListSourcesOptions) (result *SourceList, response *core.DetailedResponse, err error)
listSources(params)
list_sources(self,
instance_id: str,
*,
limit: int = None,
offset: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SourceList> listSources(ListSourcesOptions listSourcesOptions)
Request
Instantiate the ListSourcesOptions
struct and set the fields to provide parameter values for the ListSources
method.
Use the ListSourcesOptions.Builder
to create a ListSourcesOptions
object that contains the parameter values for the listSources
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
offset for paginated results
Possible values: value ≥ 0
Default:
0
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListSources options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listSources options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/sources"
listSourcesOptions := eventNotificationsService.NewListSourcesOptions( instanceID, ) sourceList, response, err := eventNotificationsService.ListSources(listSourcesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(sourceList, "", " ") fmt.Println(string(b))
const params = { instanceId, }; let res; try { res = await eventNotificationsService.listSources(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
ListSourcesOptions listSourcesOptions = new ListSourcesOptions.Builder() .instanceId(instanceId) .build(); Response<SourceList> response = eventNotificationsService.listSources(listSourcesOptions).execute(); SourceList sourceList = response.getResult(); System.out.println(sourceList);
source_list = event_notifications_service.list_sources( instance_id ).get_result() print(json.dumps(source_list, indent=2))
Response
Payload describing a source list request
Number of sources
Possible values: value ≥ 0
Current offset
limit to show sources
List of sources
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Payload describing a source list request.
{
"total_count": 2,
"limit": 10,
"offset": 0,
"sources": [
{
"enabled": true,
"description": "This source is related cloud events",
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"type": "api",
"topic_count": 0,
"updated_at": "2021-08-19T05:30:03.696492Z"
},
{
"enabled": true,
"description": "This source is used to test integration tests",
"id": "crn:v1:staging:public:compliance:us-south:a/41c340e7fb0b46d9a1a34eaa91fe94d4:2a555506-1d8b-457c-a16b-9d4ad05685ec::",
"name": "Push Source1",
"type": "bluemix.public.compliance",
"topic_count": 1,
"updated_at": "2021-08-18T19:14:13.916436Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=10"
}
}
Number of sources.
Possible values: value ≥ 0
Current offset.
limit to show sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "description": "this source is related cloud events", "type": "api", "enabled": false, "topic_count": 1, "updated_at": "2021-09-14T20:43:47.484072Z" }
- Sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-_0-9].*/
Whether the source is enabled or not.
Time of the last update.
Number of topics.
Possible values: value ≥ 0
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Payload describing a source list request.
{
"total_count": 2,
"limit": 10,
"offset": 0,
"sources": [
{
"enabled": true,
"description": "This source is related cloud events",
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"type": "api",
"topic_count": 0,
"updated_at": "2021-08-19T05:30:03.696492Z"
},
{
"enabled": true,
"description": "This source is used to test integration tests",
"id": "crn:v1:staging:public:compliance:us-south:a/41c340e7fb0b46d9a1a34eaa91fe94d4:2a555506-1d8b-457c-a16b-9d4ad05685ec::",
"name": "Push Source1",
"type": "bluemix.public.compliance",
"topic_count": 1,
"updated_at": "2021-08-18T19:14:13.916436Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=10"
}
}
Number of sources.
Possible values: value ≥ 0
Current offset.
limit to show sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "description": "this source is related cloud events", "type": "api", "enabled": false, "topic_count": 1, "updated_at": "2021-09-14T20:43:47.484072Z" }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-_0-9].*/
Whether the source is enabled or not.
Time of the last update.
Number of topics.
Possible values: value ≥ 0
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a source list request.
{
"total_count": 2,
"limit": 10,
"offset": 0,
"sources": [
{
"enabled": true,
"description": "This source is related cloud events",
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"type": "api",
"topic_count": 0,
"updated_at": "2021-08-19T05:30:03.696492Z"
},
{
"enabled": true,
"description": "This source is used to test integration tests",
"id": "crn:v1:staging:public:compliance:us-south:a/41c340e7fb0b46d9a1a34eaa91fe94d4:2a555506-1d8b-457c-a16b-9d4ad05685ec::",
"name": "Push Source1",
"type": "bluemix.public.compliance",
"topic_count": 1,
"updated_at": "2021-08-18T19:14:13.916436Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=10"
}
}
Number of sources.
Possible values: value ≥ 0
Current offset.
limit to show sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "description": "this source is related cloud events", "type": "api", "enabled": false, "topic_count": 1, "updated_at": "2021-09-14T20:43:47.484072Z" }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-_0-9].*/
Whether the source is enabled or not.
Time of the last update.
Number of topics.
Possible values: value ≥ 0
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a source list request.
{
"total_count": 2,
"limit": 10,
"offset": 0,
"sources": [
{
"enabled": true,
"description": "This source is related cloud events",
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"type": "api",
"topic_count": 0,
"updated_at": "2021-08-19T05:30:03.696492Z"
},
{
"enabled": true,
"description": "This source is used to test integration tests",
"id": "crn:v1:staging:public:compliance:us-south:a/41c340e7fb0b46d9a1a34eaa91fe94d4:2a555506-1d8b-457c-a16b-9d4ad05685ec::",
"name": "Push Source1",
"type": "bluemix.public.compliance",
"topic_count": 1,
"updated_at": "2021-08-18T19:14:13.916436Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=10"
}
}
Number of sources.
Possible values: value ≥ 0
Current offset.
limit to show sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "description": "this source is related cloud events", "type": "api", "enabled": false, "topic_count": 1, "updated_at": "2021-09-14T20:43:47.484072Z" }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-_0-9].*/
Whether the source is enabled or not.
Time of the last update.
Number of topics.
Possible values: value ≥ 0
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Payload describing the Source
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "total_count": 2, "limit": 10, "offset": 0, "sources": [ { "enabled": true, "description": "This source is related cloud events", "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "type": "api", "topic_count": 0, "updated_at": "2021-08-19T05:30:03.696492Z" }, { "enabled": true, "description": "This source is used to test integration tests", "id": "crn:v1:staging:public:compliance:us-south:a/41c340e7fb0b46d9a1a34eaa91fe94d4:2a555506-1d8b-457c-a16b-9d4ad05685ec::", "name": "Push Source1", "type": "bluemix.public.compliance", "topic_count": 1, "updated_at": "2021-08-18T19:14:13.916436Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=10" } }
{ "total_count": 2, "limit": 10, "offset": 0, "sources": [ { "enabled": true, "description": "This source is related cloud events", "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "type": "api", "topic_count": 0, "updated_at": "2021-08-19T05:30:03.696492Z" }, { "enabled": true, "description": "This source is used to test integration tests", "id": "crn:v1:staging:public:compliance:us-south:a/41c340e7fb0b46d9a1a34eaa91fe94d4:2a555506-1d8b-457c-a16b-9d4ad05685ec::", "name": "Push Source1", "type": "bluemix.public.compliance", "topic_count": 1, "updated_at": "2021-08-18T19:14:13.916436Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/sources?limit=10&offset=10" } }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get a Source
Get a Source
Get a Source.
Get a Source.
Get a Source.
Get a Source.
GET /v1/instances/{instance_id}/sources/{id}
(eventNotifications *EventNotificationsV1) GetSource(getSourceOptions *GetSourceOptions) (result *Source, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetSourceWithContext(ctx context.Context, getSourceOptions *GetSourceOptions) (result *Source, response *core.DetailedResponse, err error)
getSource(params)
get_source(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Source> getSource(GetSourceOptions getSourceOptions)
Request
Instantiate the GetSourceOptions
struct and set the fields to provide parameter values for the GetSource
method.
Use the GetSourceOptions.Builder
to create a GetSourceOptions
object that contains the parameter values for the getSource
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Source
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9-:_]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSource options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The getSource options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/sources/{id}"
getSourceOptions := eventNotificationsService.NewGetSourceOptions( instanceID, sourceID, ) source, response, err := eventNotificationsService.GetSource(getSourceOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(source, "", " ") fmt.Println(string(b))
const params = { instanceId, id: sourceId, }; let res; try { res = await eventNotificationsService.getSource(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetSourceOptions getSourceOptions = new GetSourceOptions.Builder() .instanceId(instanceId) .id(sourceId) .build(); Response<Source> response = eventNotificationsService.getSource(getSourceOptions).execute(); Source source = response.getResult(); System.out.println(source);
source = event_notifications_service.get_source( instance_id, id=source_id ).get_result() print(json.dumps(source, indent=2))
Response
Payload describing a source generate request
The id of the source
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The name of the source
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The description of the source
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The status of the source
Type of the source
Possible values: length ≥ 1, Value must match regular expression
[a-z.-].*
The last updated time of the source
The number of topics
The names of the topics
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
[a-zA-Z0-9-:_].*
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Status Code
Payload getting the Source
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "description": "this source is related cloud events", "enabled": false, "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "topic_count": 1, "topic_names": [ "updated1 apireview topic" ], "type": "api", "updated_at": "2021-09-14T20:43:47.484072Z" }
{ "description": "this source is related cloud events", "enabled": false, "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "topic_count": 1, "topic_names": [ "updated1 apireview topic" ], "type": "api", "updated_at": "2021-09-14T20:43:47.484072Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a Source
Delete a Source
Delete a Source.
Delete a Source.
Delete a Source.
Delete a Source.
DELETE /v1/instances/{instance_id}/sources/{id}
(eventNotifications *EventNotificationsV1) DeleteSource(deleteSourceOptions *DeleteSourceOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteSourceWithContext(ctx context.Context, deleteSourceOptions *DeleteSourceOptions) (response *core.DetailedResponse, err error)
deleteSource(params)
delete_source(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteSource(DeleteSourceOptions deleteSourceOptions)
Request
Instantiate the DeleteSourceOptions
struct and set the fields to provide parameter values for the DeleteSource
method.
Use the DeleteSourceOptions.Builder
to create a DeleteSourceOptions
object that contains the parameter values for the deleteSource
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Source
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9-:_]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSource options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The deleteSource options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
curl -X DELETE --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/sources/{id}"
deleteSourceOptions := eventNotificationsService.NewDeleteSourceOptions( instanceID, sourceID, ) response, err := eventNotificationsService.DeleteSource(deleteSourceOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteSource(): %d\n", response.StatusCode) }
const params = { instanceId, id: sourceId, }; try { await eventNotificationsService.deleteSource(params); } catch (err) { console.warn(err); }
DeleteSourceOptions deleteSourceOptions = new DeleteSourceOptions.Builder() .instanceId(instanceId) .id(sourceId) .build(); Response<Void> response = eventNotificationsService.deleteSource(deleteSourceOptions).execute();
response = event_notifications_service.delete_source( instance_id, id=source_id )
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update details of a Source
Update details of a Source
Update details of a Source.
Update details of a Source.
Update details of a Source.
Update details of a Source.
PATCH /v1/instances/{instance_id}/sources/{id}
(eventNotifications *EventNotificationsV1) UpdateSource(updateSourceOptions *UpdateSourceOptions) (result *Source, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) UpdateSourceWithContext(ctx context.Context, updateSourceOptions *UpdateSourceOptions) (result *Source, response *core.DetailedResponse, err error)
updateSource(params)
update_source(self,
instance_id: str,
id: str,
*,
name: str = None,
description: str = None,
enabled: bool = None,
**kwargs
) -> DetailedResponse
ServiceCall<Source> updateSource(UpdateSourceOptions updateSourceOptions)
Request
Instantiate the UpdateSourceOptions
struct and set the fields to provide parameter values for the UpdateSource
method.
Use the UpdateSourceOptions.Builder
to create a UpdateSourceOptions
object that contains the parameter values for the updateSource
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Source
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9-:_]*
Source update object
{
"name": "Event Notification Create Source Acme",
"description": "This source is used for Acme Bank",
"enabled": false
}
Name of the source
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Description of the source
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Whether the source is enabled or not
Default:
true
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSource options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
The updateSource options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Name of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Whether the source is enabled or not.
Default:
true
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" --data '{"name":"Event Notification Create Source Acme","description":"This source is used for Acme Bank","enabled":false}' "{base_url}/v1/instances/{instance_id}/sources/{id}"
updateSourceOptions := eventNotificationsService.NewUpdateSourceOptions( instanceID, sourceID, ) updateSourceOptions.SetName(*core.StringPtr("Event Notification update Source Acme")) updateSourceOptions.SetDescription(*core.StringPtr("This source is used for updated Acme Bank")) updateSourceOptions.SetEnabled(true) source, response, err := eventNotificationsService.UpdateSource(updateSourceOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(source, "", " ") fmt.Println(string(b))
const params = { instanceId, id: sourceId, name: 'Event Notification update Source Acme', description: 'This source is used for updated Acme Bank', enabled: true, }; let res; try { res = await eventNotificationsService.updateSource(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
UpdateSourceOptions updateSourceOptions = new UpdateSourceOptions.Builder() .instanceId(instanceId) .id(sourceId) .name("Event Notification update Source Acme") .description("This source is used for updated Acme Bank") .enabled(true) .build(); Response<Source> response = eventNotificationsService.updateSource(updateSourceOptions).execute(); Source source = response.getResult(); System.out.println(source);
source = event_notifications_service.update_source( instance_id, id=source_id, name='Event Notification update Source Acme', description='This source is used for updated Acme Bank', enabled=True ).get_result() print(json.dumps(source, indent=2))
Response
Payload describing a source generate request
The id of the source
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The name of the source
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The description of the source
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The status of the source
Type of the source
Possible values: length ≥ 1, Value must match regular expression
[a-z.-].*
The last updated time of the source
The number of topics
The names of the topics
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
[a-zA-Z0-9-:_].*
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Payload describing a source generate request.
{
"description": "this source is related cloud events",
"enabled": false,
"id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api",
"name": "CloudEvents Source",
"topic_count": 1,
"topic_names": [
"updated1 apireview topic"
],
"type": "api",
"updated_at": "2021-09-14T20:43:47.484072Z"
}
The id of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The name of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The description of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The status of the source.
Type of the source.
Possible values: length ≥ 1, Value must match regular expression
/[a-z.-].*/
The last updated time of the source.
The number of topics.
The names of the topics.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Status Code
Payload getting the Source
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate source
Request body type is not application/json
Internal server error
Unexpected Error
{ "description": "this source is related cloud events", "enabled": false, "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "topic_count": 1, "topic_names": [ "updated1 apireview topic" ], "type": "api", "updated_at": "2021-09-14T20:43:47.484072Z" }
{ "description": "this source is related cloud events", "enabled": false, "id": "00bb34e5-b8c1-4159-af15-8bc6980c3ab2:api", "name": "CloudEvents Source", "topic_count": 1, "topic_names": [ "updated1 apireview topic" ], "type": "api", "updated_at": "2021-09-14T20:43:47.484072Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "source_conflict", "message": "Duplicate source name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "source_conflict", "message": "Duplicate source name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new Topic
Create a new Topic
Create a new Topic.
Create a new Topic.
Create a new Topic.
Create a new Topic.
POST /v1/instances/{instance_id}/topics
(eventNotifications *EventNotificationsV1) CreateTopic(createTopicOptions *CreateTopicOptions) (result *TopicResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateTopicWithContext(ctx context.Context, createTopicOptions *CreateTopicOptions) (result *TopicResponse, response *core.DetailedResponse, err error)
createTopic(params)
create_topic(self,
instance_id: str,
name: str,
*,
description: str = None,
sources: List['SourcesItems'] = None,
**kwargs
) -> DetailedResponse
ServiceCall<TopicResponse> createTopic(CreateTopicOptions createTopicOptions)
Request
Instantiate the CreateTopicOptions
struct and set the fields to provide parameter values for the CreateTopic
method.
Use the CreateTopicOptions.Builder
to create a CreateTopicOptions
object that contains the parameter values for the createTopic
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Topic object
{
"name": "Event Notification Update Admin topic",
"description": "This topic is used for EN spoof tests",
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"rules": [
{
"enabled": true,
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'"
},
{
"enabled": false,
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'"
},
{
"enabled": true,
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'"
}
]
}
]
}
Name of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Description of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
List of sources
Possible values: 0 ≤ number of items ≤ 100
Examples:[ { "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [ { "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }, { "enabled": false, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'" } ] } ]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:[ { "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [ { "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }, { "enabled": false, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'" } ] } ]
- Sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- Rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:- sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:- sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
The createTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:[ { "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [ { "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }, { "enabled": false, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'" } ] } ]
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" --data '{"name":"Event Notification Update Admin ashwin kul","description":"This topic is used for EN spoof tests","sources":[{"id":"96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api","rules":[{"enabled":true,"event_type_filter":"$.notification_event_info.event_type == 'test'","notification_filter":"$.notification.findings[0].severity == 'LOW'"},{"enabled":false,"event_type_filter":"$.notification_event_info.event_type == 'test'","notification_filter":"$.notification.findings[0].severity == 'HIGH'"},{"enabled":true,"event_type_filter":"$.notification_event_info.event_type == 'cert_manager'"}]}]}' "{base_url}/v1/instances/{instance_id}/topics"
rulesModel := &eventnotificationsv1.Rules{ Enabled: core.BoolPtr(false), EventTypeFilter: core.StringPtr("$.notification_event_info.event_type == 'cert_manager'"), NotificationFilter: core.StringPtr("$.notification.findings[0].severity == 'MODERATE'"), } topicUpdateSourcesItemModel := &eventnotificationsv1.SourcesItems{ ID: core.StringPtr(sourceID), Rules: []eventnotificationsv1.Rules{*rulesModel}, } createTopicOptions := &eventnotificationsv1.CreateTopicOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(topicName), Description: core.StringPtr("This topic is used for routing all compliance related notifications to the appropriate destinations"), Sources: []eventnotificationsv1.SourcesItems{*topicUpdateSourcesItemModel}, } topicResponse, response, err := eventNotificationsService.CreateTopic(createTopicOptions) if err != nil { panic(err) } topicID = string(*topicResponse.ID) b, _ := json.MarshalIndent(topicResponse, "", " ") fmt.Println(string(b))
// Rules const rulesModel = { enabled: false, event_type_filter: "$.notification_event_info.event_type == 'cert_manager'", notification_filter: "$.notification.findings[0].severity == 'MODERATE'", }; // TopicUpdateSourcesItem const topicUpdateSourcesItemModel = { id: sourceId, rules: [rulesModel], }; const params = { instanceId, name: topicName, description: 'This topic is used for routing all compliance related notifications to the appropriate destinations', sources: [topicUpdateSourcesItemModel], }; let res; try { res = await eventNotificationsService.createTopic(params); console.log(JSON.stringify(res.result, null, 2)); topicId = res.result.id; } catch (err) { console.warn(err); }
Rules rulesModel = new Rules.Builder() .enabled(true) .eventTypeFilter("$.notification_event_info.event_type == 'cert_manager'") .notificationFilter("$.notification.findings[0].severity == 'MODERATE'") .build(); SourcesItems topicUpdateSourcesItemModel = new SourcesItems.Builder() .id(sourceId) .rules(new java.util.ArrayList<Rules>(java.util.Arrays.asList(rulesModel))) .build(); CreateTopicOptions createTopicOptions = new CreateTopicOptions.Builder() .instanceId(instanceId) .name(topicName) .description("This topic is used for routing all compliance related notifications to the appropriate destinations") .sources(new java.util.ArrayList<SourcesItems>(java.util.Arrays.asList(topicUpdateSourcesItemModel))) .build(); Response<TopicResponse> response = eventNotificationsService.createTopic(createTopicOptions).execute(); TopicResponse topicResponse = response.getResult(); System.out.println(topicResponse);
rules_model = { 'enabled': False, 'event_type_filter': '$.notification_event_info.event_type == \'cert_manager\'', 'notification_filter': '$.notification.findings[0].severity == \'MODERATE\'', } # Construct a dict representation of a TopicUpdateSourcesItem model topic_update_sources_item_model = { 'id': source_id, 'rules': [rules_model], } topic = event_notifications_service.create_topic( instance_id, name=topic_name, description='This topic is used for routing all compliance related notifications to the appropriate destinations', sources=[topic_update_sources_item_model] ).get_result() print(json.dumps(topic, indent=2))
Response
Topic object
Autogenerated topic ID
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Name of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Description of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Last time the topic was updated
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[0-9A-Z:]*
Topic object.
{
"created_at": "2021-10-07T06:51:37.707653235Z",
"description": "This topic is used for EN e2e tests",
"id": "81207685-7037-4d3a-b022-b7b974f6395b",
"name": "EN Topic"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Topic object.
{
"created_at": "2021-10-07T06:51:37.707653235Z",
"description": "This topic is used for EN e2e tests",
"id": "81207685-7037-4d3a-b022-b7b974f6395b",
"name": "EN Topic"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Topic object.
{
"created_at": "2021-10-07T06:51:37.707653235Z",
"description": "This topic is used for EN e2e tests",
"id": "81207685-7037-4d3a-b022-b7b974f6395b",
"name": "EN Topic"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Topic object.
{
"created_at": "2021-10-07T06:51:37.707653235Z",
"description": "This topic is used for EN e2e tests",
"id": "81207685-7037-4d3a-b022-b7b974f6395b",
"name": "EN Topic"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Status Code
Response body after topic creation
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate topic
Request body type is not application/json
Internal server error
Unexpected Error
{ "created_at": "2021-10-07T06:51:37.707653235Z", "description": "This topic is used for EN e2e tests", "id": "81207685-7037-4d3a-b022-b7b974f6395b", "name": "EN Topic" }
{ "created_at": "2021-10-07T06:51:37.707653235Z", "description": "This topic is used for EN e2e tests", "id": "81207685-7037-4d3a-b022-b7b974f6395b", "name": "EN Topic" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "topic_conflict", "message": "Duplicate topic name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "topic_conflict", "message": "Duplicate topic name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all Topics
List all Topics
List all Topics.
List all Topics.
List all Topics.
List all Topics.
GET /v1/instances/{instance_id}/topics
(eventNotifications *EventNotificationsV1) ListTopics(listTopicsOptions *ListTopicsOptions) (result *TopicList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListTopicsWithContext(ctx context.Context, listTopicsOptions *ListTopicsOptions) (result *TopicList, response *core.DetailedResponse, err error)
listTopics(params)
list_topics(self,
instance_id: str,
*,
limit: int = None,
offset: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<TopicList> listTopics(ListTopicsOptions listTopicsOptions)
Request
Instantiate the ListTopicsOptions
struct and set the fields to provide parameter values for the ListTopics
method.
Use the ListTopicsOptions.Builder
to create a ListTopicsOptions
object that contains the parameter values for the listTopics
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
offset for paginated results
Possible values: value ≥ 0
Default:
0
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListTopics options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listTopics options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/topics"
listTopicsOptions := eventNotificationsService.NewListTopicsOptions( instanceID, ) topicList, response, err := eventNotificationsService.ListTopics(listTopicsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(topicList, "", " ") fmt.Println(string(b))
const params = { instanceId, }; let res; try { res = await eventNotificationsService.listTopics(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
ListTopicsOptions listTopicsOptions = new ListTopicsOptions.Builder() .instanceId(instanceId) .build(); Response<TopicList> response = eventNotificationsService.listTopics(listTopicsOptions).execute(); TopicList topicList = response.getResult(); System.out.println(topicList);
topic_list = event_notifications_service.list_topics( instance_id ).get_result() print(json.dumps(topic_list, indent=2))
Response
Topic list object
Number of topics
Possible values: value ≥ 0
Current offset
limit to show subscriptions
List of topics
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Topic list object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"topics": [
{
"source_count": 2,
"sources_names": [
"Push Source",
"Custom source"
],
"subscription_count": 3,
"description": "To send events to all EN developers",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Developers topic"
},
{
"source_count": 1,
"sources_names": [
"Push Source1"
],
"subscription_count": 3,
"description": "This topic is used for EN integration tests",
"id": "7b23362d-6d48-47ef-847a-c8b291220306",
"name": "Event Notification Admin encryption1"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=10"
}
}
Number of topics.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of topics.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "updated1 apireview topic", "description": "thiis is epic", "source_count": 1, "subscription_count": 3, "sources_names": [ "Push Source1" ] }
- Topics
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of sources.
Possible values: 0 ≤ value ≤ 1024
List of source names.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of subscriptions.
Possible values: 0 ≤ value ≤ 1024
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Topic list object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"topics": [
{
"source_count": 2,
"sources_names": [
"Push Source",
"Custom source"
],
"subscription_count": 3,
"description": "To send events to all EN developers",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Developers topic"
},
{
"source_count": 1,
"sources_names": [
"Push Source1"
],
"subscription_count": 3,
"description": "This topic is used for EN integration tests",
"id": "7b23362d-6d48-47ef-847a-c8b291220306",
"name": "Event Notification Admin encryption1"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=10"
}
}
Number of topics.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of topics.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "updated1 apireview topic", "description": "thiis is epic", "source_count": 1, "subscription_count": 3, "sources_names": [ "Push Source1" ] }
- topics
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of sources.
Possible values: 0 ≤ value ≤ 1024
List of source names.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of subscriptions.
Possible values: 0 ≤ value ≤ 1024
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Topic list object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"topics": [
{
"source_count": 2,
"sources_names": [
"Push Source",
"Custom source"
],
"subscription_count": 3,
"description": "To send events to all EN developers",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Developers topic"
},
{
"source_count": 1,
"sources_names": [
"Push Source1"
],
"subscription_count": 3,
"description": "This topic is used for EN integration tests",
"id": "7b23362d-6d48-47ef-847a-c8b291220306",
"name": "Event Notification Admin encryption1"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=10"
}
}
Number of topics.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of topics.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "updated1 apireview topic", "description": "thiis is epic", "source_count": 1, "subscription_count": 3, "sources_names": [ "Push Source1" ] }
- topics
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of sources.
Possible values: 0 ≤ value ≤ 1024
List of source names.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of subscriptions.
Possible values: 0 ≤ value ≤ 1024
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Topic list object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"topics": [
{
"source_count": 2,
"sources_names": [
"Push Source",
"Custom source"
],
"subscription_count": 3,
"description": "To send events to all EN developers",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Developers topic"
},
{
"source_count": 1,
"sources_names": [
"Push Source1"
],
"subscription_count": 3,
"description": "This topic is used for EN integration tests",
"id": "7b23362d-6d48-47ef-847a-c8b291220306",
"name": "Event Notification Admin encryption1"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=10"
}
}
Number of topics.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of topics.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "updated1 apireview topic", "description": "thiis is epic", "source_count": 1, "subscription_count": 3, "sources_names": [ "Push Source1" ] }
- topics
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of sources.
Possible values: 0 ≤ value ≤ 1024
List of source names.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Number of subscriptions.
Possible values: 0 ≤ value ≤ 1024
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Payload describing the Topic
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "total_count": 2, "offset": 0, "limit": 10, "topics": [ { "source_count": 2, "sources_names": [ "Push Source", "Custom source" ], "subscription_count": 3, "description": "To send events to all EN developers", "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "Developers topic" }, { "source_count": 1, "sources_names": [ "Push Source1" ], "subscription_count": 3, "description": "This topic is used for EN integration tests", "id": "7b23362d-6d48-47ef-847a-c8b291220306", "name": "Event Notification Admin encryption1" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=10" } }
{ "total_count": 2, "offset": 0, "limit": 10, "topics": [ { "source_count": 2, "sources_names": [ "Push Source", "Custom source" ], "subscription_count": 3, "description": "To send events to all EN developers", "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "Developers topic" }, { "source_count": 1, "sources_names": [ "Push Source1" ], "subscription_count": 3, "description": "This topic is used for EN integration tests", "id": "7b23362d-6d48-47ef-847a-c8b291220306", "name": "Event Notification Admin encryption1" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/topics?limit=10&offset=10" } }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of a Topic
Get details of a Topic
Get details of a Topic.
Get details of a Topic.
Get details of a Topic.
Get details of a Topic.
GET /v1/instances/{instance_id}/topics/{id}
(eventNotifications *EventNotificationsV1) GetTopic(getTopicOptions *GetTopicOptions) (result *Topic, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetTopicWithContext(ctx context.Context, getTopicOptions *GetTopicOptions) (result *Topic, response *core.DetailedResponse, err error)
getTopic(params)
get_topic(self,
instance_id: str,
id: str,
*,
include: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<Topic> getTopic(GetTopicOptions getTopicOptions)
Request
Instantiate the GetTopicOptions
struct and set the fields to provide parameter values for the GetTopic
method.
Use the GetTopicOptions.Builder
to create a GetTopicOptions
object that contains the parameter values for the getTopic
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Topic
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Query Parameters
Include sub topics
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
[a-z]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Include sub topics.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Include sub topics.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Include sub topics.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
The getTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Include sub topics.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/topics/{id}"
getTopicOptions := eventNotificationsService.NewGetTopicOptions( instanceID, topicID, ) topic, response, err := eventNotificationsService.GetTopic(getTopicOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(topic, "", " ") fmt.Println(string(b))
const params = { instanceId, id: topicId, }; let res; try { res = await eventNotificationsService.getTopic(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetTopicOptions getTopicOptions = new GetTopicOptions.Builder() .instanceId(instanceId) .id(topicId) .build(); Response<Topic> response = eventNotificationsService.getTopic(getTopicOptions).execute(); Topic topic = response.getResult(); System.out.println(topic);
topic = event_notifications_service.get_topic( instance_id, id=topic_id ).get_result() print(json.dumps(topic, indent=2))
Response
Topic object
Autogenerated topic ID
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Description of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Name of the topic
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
[a-zA-Z 0-9-_]*
Last time the topic was updated
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[0-9A-Z:]*
Number of sources
List of sources
Possible values: 0 ≤ number of items ≤ 100
Number of subscriptions
List of subscriptions
Possible values: 0 ≤ number of items ≤ 100
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- Sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- Rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- Subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Status Code
Payload describing the Topic
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "description": "This topic is used for routing all compliance related notifications to the appropriate destinations", "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "Admin Topic Compliance", "source_count": 1, "sources": [ { "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": false, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": true, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] } ], "subscription_count": 1, "subscriptions": [ { "description": "This subscription is to send events from SCC to EN Admins via sms", "destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "destination_type": "sms_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "SMS Subscription on new change", "topic_id": "7b23362d-6d48-47ef-847a-c8b291220306", "updated_at": "2021-08-20T10:08:46.060316Z" } ], "updated_at": "2021-09-08T13:25:20.475437Z" }
{ "description": "This topic is used for routing all compliance related notifications to the appropriate destinations", "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "Admin Topic Compliance", "source_count": 1, "sources": [ { "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": false, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": true, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] } ], "subscription_count": 1, "subscriptions": [ { "description": "This subscription is to send events from SCC to EN Admins via sms", "destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "destination_type": "sms_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "SMS Subscription on new change", "topic_id": "7b23362d-6d48-47ef-847a-c8b291220306", "updated_at": "2021-08-20T10:08:46.060316Z" } ], "updated_at": "2021-09-08T13:25:20.475437Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update details of a Topic
Update details of a Topic
Update details of a Topic.
Update details of a Topic.
Update details of a Topic.
Update details of a Topic.
PUT /v1/instances/{instance_id}/topics/{id}
(eventNotifications *EventNotificationsV1) ReplaceTopic(replaceTopicOptions *ReplaceTopicOptions) (result *Topic, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ReplaceTopicWithContext(ctx context.Context, replaceTopicOptions *ReplaceTopicOptions) (result *Topic, response *core.DetailedResponse, err error)
replaceTopic(params)
replace_topic(self,
instance_id: str,
id: str,
*,
name: str = None,
description: str = None,
sources: List['SourcesItems'] = None,
**kwargs
) -> DetailedResponse
ServiceCall<Topic> replaceTopic(ReplaceTopicOptions replaceTopicOptions)
Request
Instantiate the ReplaceTopicOptions
struct and set the fields to provide parameter values for the ReplaceTopic
method.
Use the ReplaceTopicOptions.Builder
to create a ReplaceTopicOptions
object that contains the parameter values for the replaceTopic
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Topic
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Topic update object
{
"sources": [
{
"rules": [
{
"enabled": true,
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'"
},
{
"enabled": false,
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'"
}
],
"id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api"
}
],
"name": "Event Notification Topic",
"description": "This topic is used for EN"
}
Name of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Description of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
List of sources
Possible values: 0 ≤ number of items ≤ 100
Examples:[ { "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [ { "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }, { "enabled": false, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'" } ] } ]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ReplaceTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:[ { "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [ { "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }, { "enabled": false, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'" } ] } ]
- Sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- Rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:- sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:- sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
The replaceTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:[ { "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api", "rules": [ { "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }, { "enabled": false, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'" } ] } ]
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'" }
- rules
Whether the rule is enabled or not.
Default:
true
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" --data '{"sources":[{"rules":[{"enabled":true,"event_type_filter":"$.notification_event_info.event_type == 'cert_manager'","notification_filter":"$.notification.findings[0].severity == 'MODERATE'"},{"enabled":false,"event_type_filter":"$.notification_event_info.event_type == 'cert_manager'","notification_filter":"$.notification.findings[0].severity == 'HIGH'"}],"id":"e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5:api"}],"name":"Event Notification Topic","description":"This topic is used for EN"}' "{base_url}/v1/instances/{instance_id}/topics/{id}"
rulesModel := &eventnotificationsv1.Rules{ Enabled: core.BoolPtr(true), EventTypeFilter: core.StringPtr("$.*"), } topicUpdateSourcesItemModel := &eventnotificationsv1.SourcesItems{ ID: core.StringPtr(sourceID), Rules: []eventnotificationsv1.Rules{*rulesModel}, } replaceTopicOptions := eventNotificationsService.NewReplaceTopicOptions( instanceID, topicID, ) replaceTopicOptions.SetSources([]eventnotificationsv1.SourcesItems{*topicUpdateSourcesItemModel}) replaceTopicOptions.SetName("Updated Admin Topic Compliance") topic, response, err := eventNotificationsService.ReplaceTopic(replaceTopicOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(topic, "", " ") fmt.Println(string(b))
// Rules const rulesModel = { enabled: true, event_type_filter: '$.*', }; // TopicUpdateSourcesItem const topicUpdateSourcesItemModel = { id: sourceId, rules: [rulesModel], }; const params = { instanceId, id: topicId, name: 'Updated Admin Topic Compliance', description: 'Updated Topic for FCM notifications', sources: [topicUpdateSourcesItemModel], }; let res; try { res = await eventNotificationsService.replaceTopic(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
Rules rulesModel = new Rules.Builder() .enabled(true) .eventTypeFilter("$.notification_event_info.event_type == 'cert_manager'") .notificationFilter("$.notification.findings[0].severity == 'MODERATE'") .build(); SourcesItems topicUpdateSourcesItemModel = new SourcesItems.Builder() .id(sourceId) .rules(new java.util.ArrayList<Rules>(java.util.Arrays.asList(rulesModel))) .build(); String description = "Updated Topic for GCM notifications"; String name = "Updated Admin Topic Compliance"; ReplaceTopicOptions replaceTopicOptions = new ReplaceTopicOptions.Builder() .instanceId(instanceId) .id(topicId) .name(name) .description(description) .sources(new java.util.ArrayList<SourcesItems>(java.util.Arrays.asList(topicUpdateSourcesItemModel))) .build(); Response<Topic> response = eventNotificationsService.replaceTopic(replaceTopicOptions).execute(); Topic topic = response.getResult(); System.out.println(topic);
rules_model = { 'enabled': True, 'event_type_filter': '$.notification_event_info.event_type == \'core_cert_manager\'', 'notification_filter': '$.notification.findings[0].severity == \'SEVERE\'', } # Construct a dict representation of a TopicUpdateSourcesItem model topic_update_sources_item_model = { 'id': source_id, 'rules': [rules_model], } description = 'Updated Topic for GCM notifications' name = 'Updated Admin Topic Compliance' topic = event_notifications_service.replace_topic( instance_id, id=topic_id, name=name, description=description, sources=[topic_update_sources_item_model] ).get_result() print(json.dumps(topic, indent=2))
Response
Topic object
Autogenerated topic ID
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Description of the topic
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*()]*
Name of the topic
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
[a-zA-Z 0-9-_]*
Last time the topic was updated
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[0-9A-Z:]*
Number of sources
List of sources
Possible values: 0 ≤ number of items ≤ 100
Number of subscriptions
List of subscriptions
Possible values: 0 ≤ number of items ≤ 100
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- Sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- Rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- Subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Topic object.
{
"description": "This topic is used for routing all compliance related notifications to the appropriate destinations",
"id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"name": "Admin Topic Compliance",
"source_count": 1,
"sources": [
{
"id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api",
"name": "Compliance source",
"rules": [
{
"enabled": true,
"id": "218f4e30-9af2-4f70-b38b-738f923b0c4b",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'LOW'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": false,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'test'",
"notification_filter": "$.notification.findings[0].severity == 'HIGH'",
"updated_at": "2021-09-08T13:25:20.523533Z"
},
{
"enabled": true,
"id": "6a061e40-cf93-47b5-809b-59f11e9a4433",
"event_type_filter": "$.notification_event_info.event_type == 'cert_manager'",
"notification_filter": "$.notification.findings[0].severity == 'MODERATE'",
"updated_at": "2021-09-08T13:25:20.523533Z"
}
]
}
],
"subscription_count": 1,
"subscriptions": [
{
"description": "This subscription is to send events from SCC to EN Admins via sms",
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_type": "sms_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
],
"updated_at": "2021-09-08T13:25:20.475437Z"
}
Autogenerated topic ID.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Description of the topic.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*()]*/
Name of the topic.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_]*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Number of sources.
List of sources.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] }
- sources
ID of the source.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Name of the source.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
List of rules.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "enabled": true, "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-08-20T10:08:46.060316Z", "id": "e7c3b3ee-78d9-4e02-95c3-c001a05e6ea5" }
- rules
Whether the rule is enabled or not.
Event type filter.
Possible values: 3 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Notification filter.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_$.=']*/
Last time the topic was updated.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[0-9A-Z:]*/
Autogenerated rule ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Number of subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Status Code
Payload describing the Topic
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate topic
Request body type is not application/json
Internal server error
Unexpected Error
{ "description": "This topic is used for routing all compliance related notifications to the appropriate destinations", "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "Admin Topic Compliance", "source_count": 1, "sources": [ { "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": false, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": true, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] } ], "subscription_count": 1, "subscriptions": [ { "description": "This subscription is to send events from SCC to EN Admins via sms", "destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "destination_type": "sms_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "SMS Subscription on new change", "topic_id": "7b23362d-6d48-47ef-847a-c8b291220306", "updated_at": "2021-08-20T10:08:46.060316Z" } ], "updated_at": "2021-09-08T13:25:20.475437Z" }
{ "description": "This topic is used for routing all compliance related notifications to the appropriate destinations", "id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "name": "Admin Topic Compliance", "source_count": 1, "sources": [ { "id": "96dbf538-9fa7-4745-b9e4-32bb6f1dc47a:api", "name": "Compliance source", "rules": [ { "enabled": true, "id": "218f4e30-9af2-4f70-b38b-738f923b0c4b", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'LOW'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": false, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'test'", "notification_filter": "$.notification.findings[0].severity == 'HIGH'", "updated_at": "2021-09-08T13:25:20.523533Z" }, { "enabled": true, "id": "6a061e40-cf93-47b5-809b-59f11e9a4433", "event_type_filter": "$.notification_event_info.event_type == 'cert_manager'", "notification_filter": "$.notification.findings[0].severity == 'MODERATE'", "updated_at": "2021-09-08T13:25:20.523533Z" } ] } ], "subscription_count": 1, "subscriptions": [ { "description": "This subscription is to send events from SCC to EN Admins via sms", "destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "destination_type": "sms_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "SMS Subscription on new change", "topic_id": "7b23362d-6d48-47ef-847a-c8b291220306", "updated_at": "2021-08-20T10:08:46.060316Z" } ], "updated_at": "2021-09-08T13:25:20.475437Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "topic_conflict", "message": "Duplicate topic name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "9e948d31-a5be-42be-9dc1-a1006ba9d542", "status_code": 409, "errors": [ { "code": "topic_conflict", "message": "Duplicate topic name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a Topic
Delete a Topic
Delete a Topic.
Delete a Topic.
Delete a Topic.
Delete a Topic.
DELETE /v1/instances/{instance_id}/topics/{id}
(eventNotifications *EventNotificationsV1) DeleteTopic(deleteTopicOptions *DeleteTopicOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteTopicWithContext(ctx context.Context, deleteTopicOptions *DeleteTopicOptions) (response *core.DetailedResponse, err error)
deleteTopic(params)
delete_topic(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteTopic(DeleteTopicOptions deleteTopicOptions)
Request
Instantiate the DeleteTopicOptions
struct and set the fields to provide parameter values for the DeleteTopic
method.
Use the DeleteTopicOptions.Builder
to create a DeleteTopicOptions
object that contains the parameter values for the deleteTopic
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Topic
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The deleteTopic options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Topic.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl -X DELETE --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/topics/{id}"
deleteTopicOptions := eventNotificationsService.NewDeleteTopicOptions( instanceID, topicID, ) response, err := eventNotificationsService.DeleteTopic(deleteTopicOptions) if err != nil { panic(err) }
const params = { instanceId, id: topicId, }; try { await eventNotificationsService.deleteTopic(params); } catch (err) { console.warn(err); }
DeleteTopicOptions deleteTopicOptions = new DeleteTopicOptions.Builder() .instanceId(instanceId) .id(topicId) .build(); Response<Void> response = eventNotificationsService.deleteTopic(deleteTopicOptions).execute();
response = event_notifications_service.delete_topic( instance_id, id=topic_id )
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new Template
Create a new Template
Create a new Template.
Create a new Template.
Create a new Template.
Create a new Template.
POST /v1/instances/{instance_id}/templates
(eventNotifications *EventNotificationsV1) CreateTemplate(createTemplateOptions *CreateTemplateOptions) (result *TemplateResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateTemplateWithContext(ctx context.Context, createTemplateOptions *CreateTemplateOptions) (result *TemplateResponse, response *core.DetailedResponse, err error)
createTemplate(params)
create_template(self,
instance_id: str,
name: str,
type: str,
params: 'TemplateConfigOneOf',
*,
description: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<TemplateResponse> createTemplate(CreateTemplateOptions createTemplateOptions)
Request
Instantiate the CreateTemplateOptions
struct and set the fields to provide parameter values for the CreateTemplate
method.
Use the CreateTemplateOptions.Builder
to create a CreateTemplateOptions
object that contains the parameter values for the createTemplate
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Payload describing a template create request
{
"name": "Message Template",
"type": "smtp_custom.notification",
"description": "Template description",
"params": {
"body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==",
"subject": "HI This is the template subject for the invitation"
}
}
The Message Template
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The type of template
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$
The Template description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Message Template.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- Params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Message Template.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Message Template.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The createTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Message Template.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/templates" --data-raw '{ "name": "template", "description": "This is template", "type": "smtp_custom.invitation|smtp_custom.notification", "params": { "body": "PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PHRpdGxlPklCTSBFdmVudCBOb3RpZmljYXRpb25zPC90aXRsZT48L2hlYWQ+PGJvZHk+PHA+SGVsbG8hIEludml0YXRpb24gdGVtcGxhdGU8L3A+PHRhYmxlPjx0cj48dGQ+SGVsbG8gaW52aXRhdGlvbiBsaW5rOnt7IGlibWVuX2ludml0YXRpb24gfX0gPC90ZD48L3RyPjwvdGFibGU+PC9ib2R5PjwvaHRtbD4=", "subject": "Hi this is invitation for invitation message", } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/templates" --data-raw '{ "name": "template", "description": "This is template", "type": "slack.notification", "params": { "body": "ewogICJib2R5IjogIjxodG1sPmhlbGxvIFdvcmxkPC9odG1sPiIsCiAgInN1YmplY3QiOiAiSGkgdGhpcyBpcyBpbnZpdGF0aW9uIGZvciBpbnZpdGF0aW9uIG1lc3NhZ2UiCn0=", } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/templates" --data-raw '{ "name": "template", "description": "This is template", "type": "webhook.notification", "params": { "body": "eyJuYW1lIjoie3tkYXRhLm5hbWV9fSIifQ==", } }'
name := "template invitation" description := "template invitation description" templConfig := &eventnotificationsv1.TemplateConfig{ Body: core.StringPtr("PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg=="), Subject: core.StringPtr("Hi this is invitation for invitation message"), } createTemplateOptions := &eventnotificationsv1.CreateTemplateOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(name), Type: core.StringPtr(eventnotificationsv1.CreateTemplateOptionsTypeSMTPCustomInvitationConst), Description: core.StringPtr(description), Params: templConfig, } templateResponse, response, err := eventNotificationsService.CreateTemplate(createTemplateOptions) templateInvitationID = *templateResponse.ID name = "template notification" description = "template notification description" templConfig = &eventnotificationsv1.TemplateConfig{ Body: core.StringPtr("PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg=="), Subject: core.StringPtr("Hi this is template for notification"), } createTemplateOptions = &eventnotificationsv1.CreateTemplateOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(name), Type: core.StringPtr(eventnotificationsv1.CreateTemplateOptionsTypeSMTPCustomNotificationConst), Description: core.StringPtr(description), Params: templConfig, } templateResponse, response, err = eventNotificationsService.CreateTemplate(createTemplateOptions)
name = "slack template" description = "slack template description" slackTemplConfig := &eventnotificationsv1.TemplateConfigOneOfSlackTemplateConfig{ Body: core.StringPtr(slackTemplateBody), } createTemplateOptions = &eventnotificationsv1.CreateTemplateOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(name), Type: core.StringPtr(templateTypeSlack), Description: core.StringPtr(description), Params: slackTemplConfig, } templateResponse, response, err = eventNotificationsService.CreateTemplate(createTemplateOptions) if err != nil { panic(err) }
name = "webhook template" description = "webhook template description" webhookTemplConfig := &eventnotificationsv1.TemplateConfigOneOfWebhookTemplateConfig{ Body: core.StringPtr(webhookTemplateBody), } createTemplateOptions = &eventnotificationsv1.CreateTemplateOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(name), Type: core.StringPtr("webhook.notification"), Description: core.StringPtr(description), Params: webhookTemplConfig, } templateResponse, response, err = eventNotificationsService.CreateTemplate(createTemplateOptions) if err != nil { panic(err) }
const templateConfigModel = { params: { body: 'PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==', subject: 'Hi this is invitation for invitation message', }, }; let name = 'template name invitation'; let description = 'template destination'; let type = 'smtp_custom.invitation'; let createTemplateParams = { instanceId, name, type, params: templateConfigModel, description, }; let createTemplateResult; try { createTemplateResult = await eventNotificationsService.createTemplate(createTemplateParams); console.log(JSON.stringify(createTemplateResult.result, null, 2)); templateInvitationID = createTemplateResult.result.id; } catch (err) { console.warn(err); } name = 'template name notification'; description = 'template destination'; type = 'smtp_custom.notification'; createTemplateParams = { instanceId, name, type, params: templateConfigModel, description, }; try { createTemplateResult = await eventNotificationsService.createTemplate(createTemplateParams); console.log(JSON.stringify(createTemplateResult.result, null, 2)); templateNotificationID = createTemplateResult.result.id; } catch (err) { console.warn(err); }
const slackTemplateConfigModel = { body: slackTemplateBody, }; name = 'slack template name'; description = 'slack template description'; type = 'slack.notification'; createTemplateParams = { instanceId, name, type, params: slackTemplateConfigModel, description, }; try { createTemplateResult = await eventNotificationsService.createTemplate(createTemplateParams); console.log(JSON.stringify(createTemplateResult.result, null, 2)); slackTemplateID = createTemplateResult.result.id; } catch (err) { console.warn(err); }
const webhookTemplateConfigModel = { body: webhookTemplateBody, }; name = 'webhook template name'; description = 'webhook template description'; type = 'webhook.notification'; createTemplateParams = { instanceId, name, type, params: webhookTemplateConfigModel, description, }; try { createTemplateResult = await eventNotificationsService.createTemplate(createTemplateParams); console.log(JSON.stringify(createTemplateResult.result, null, 2)); webhookTemplateID = createTemplateResult.result.id; } catch (err) { console.warn(err); }
String name = "template name"; String description = "template description"; TemplateConfig templateConfig = new TemplateConfig.Builder() .body("PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==") .subject("Hi this is invitation for invitation message") .build(); CreateTemplateOptions createTemplateInvitationOptions = new CreateTemplateOptions.Builder() .instanceId(instanceId) .name(name) .description(description) .type(CreateTemplateOptions.Type.SMTP_CUSTOM_INVITATION) .params(templateConfig) .build(); Response<TemplateResponse> invitationResponse = eventNotificationsService.createTemplate(createTemplateInvitationOptions).execute(); TemplateResponse invitationTemplateResult = invitationResponse.getResult(); templateInvitationID = invitationTemplateResult.getId(); CreateTemplateOptions createTemplateNotificationOptions = new CreateTemplateOptions.Builder() .instanceId(instanceId) .name(name) .description(description) .type(CreateTemplateOptions.Type.SMTP_CUSTOM_NOTIFICATION) .params(templateConfig) .build(); Response<TemplateResponse> notificationResponse = eventNotificationsService.createTemplate(createTemplateNotificationOptions).execute(); TemplateResponse notificationTemplateResult = notificationResponse.getResult(); templateNotificationID = notificationTemplateResult.getId();
TemplateConfigOneOfSlackTemplateConfig slackTemplateConfig = new TemplateConfigOneOfSlackTemplateConfig.Builder() .body(slackTemplateBody) .build(); name = "slack template notification name"; CreateTemplateOptions createSlackTemplateNotificationOptions = new CreateTemplateOptions.Builder() .instanceId(instanceId) .name(name) .description(description) .type("slack.notification") .params(slackTemplateConfig) .build(); Response<TemplateResponse> slackTemplatenotificationResponse = eventNotificationsService.createTemplate(createSlackTemplateNotificationOptions).execute(); TemplateResponse slackTemplateResult = slackTemplatenotificationResponse.getResult();
TemplateConfigOneOfWebhookTemplateConfig webhookTemplateConfig = new TemplateConfigOneOfWebhookTemplateConfig.Builder() .body(webhookTemplateBody) .build(); name = "webhook template notification name"; CreateTemplateOptions createWebhookTemplateNotificationOptions = new CreateTemplateOptions.Builder() .instanceId(instanceId) .name(name) .description(description) .type("webhook.notification") .params(webhookTemplateConfig) .build(); Response<TemplateResponse> webhookTemplatenotificationResponse = eventNotificationsService.createTemplate(createWebhookTemplateNotificationOptions).execute(); TemplateResponse webhookTemplateResult = webhookTemplatenotificationResponse.getResult();
template_config_model = { 'body': 'PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==', 'subject': 'Hi this is invitation for invitation message', } name = "template_invitation" typeval = "smtp_custom.invitation" description = "invitation template" create_template_response = event_notifications_service.create_template( instance_id, name, type=typeval, params=template_config_model, description=description ).get_result() print(json.dumps(create_template_response, indent=2)) template = TemplateResponse.from_dict(create_template_response) template_invitation_id = template.id name = "template_notification" typeval = "smtp_custom.notification" description = "notification template" create_template_response = event_notifications_service.create_template( instance_id, name, type=typeval, params=template_config_model, description=description ).get_result()
slack_template_config_model_json = {'body': slack_template_body} slack_template_config_model = TemplateConfigOneOfSlackTemplateConfig.from_dict( slack_template_config_model_json ) name = "template_slack" typeval = "slack.notification" description = "slack template" create_template_response = self.event_notifications_service.create_template( instance_id, name, type=typeval, params=slack_template_config_model, description=description, ).get_result() print(json.dumps(create_template_response, indent=2)) template = TemplateResponse.from_dict(create_template_response)
webhook_template_config_model_json = {'body': webhook_template_body} webhook_template_config_model = TemplateConfigOneOfWebhookTemplateConfig.from_dict( webhook_template_config_model_json ) name = "template_webhook" typeval = "webhook.notification" description = "webhook template" create_template_response = self.event_notifications_service.create_template( instance_id, name, type=typeval, params=webhook_template_config_model, description=description, ).get_result() print(json.dumps(create_template_response, indent=2)) template = TemplateResponse.from_dict(create_template_response)
Response
Payload describing a template get request
Template ID
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Template name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The type of template
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$
Created time
Template description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Payload describing a template get request.
{
"params": {
"body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==",
"subject": "This is the template subject"
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "Template description",
"id": "fd72a88a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"type": "smtp_custom.notification"
}
Template ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- Params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Created time.
Payload describing a template get request.
{
"params": {
"body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==",
"subject": "This is the template subject"
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "Template description",
"id": "fd72a88a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"type": "smtp_custom.notification"
}
Template ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Created time.
Payload describing a template get request.
{
"params": {
"body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==",
"subject": "This is the template subject"
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "Template description",
"id": "fd72a88a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"type": "smtp_custom.notification"
}
Template ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Created time.
Payload describing a template get request.
{
"params": {
"body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==",
"subject": "This is the template subject"
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "Template description",
"id": "fd72a88a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"type": "smtp_custom.notification"
}
Template ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
Created time.
Status Code
New Template created successfully
Bad or incorrect request body
Trying to access the API with unauthorized token
Request body type is not application/json
Internal server error
Unexpected Error
{ "params": { "body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==", "subject": "This is the template subject" }, "created_at": "2021-10-07T07:05:52.098388257Z", "description": "Template description", "id": "fd72a88a-1111-0000-0000-e63141ce8b4a", "name": "template name", "type": "smtp_custom.notification" }
{ "params": { "body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==", "subject": "This is the template subject" }, "created_at": "2021-10-07T07:05:52.098388257Z", "description": "Template description", "id": "fd72a88a-1111-0000-0000-e63141ce8b4a", "name": "template name", "type": "smtp_custom.notification" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all templates
List all Templates
List all Templates.
List all Templates.
List all Templates.
List all Templates.
GET /v1/instances/{instance_id}/templates
(eventNotifications *EventNotificationsV1) ListTemplates(listTemplatesOptions *ListTemplatesOptions) (result *TemplateList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListTemplatesWithContext(ctx context.Context, listTemplatesOptions *ListTemplatesOptions) (result *TemplateList, response *core.DetailedResponse, err error)
listTemplates(params)
list_templates(self,
instance_id: str,
*,
limit: int = None,
offset: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<TemplateList> listTemplates(ListTemplatesOptions listTemplatesOptions)
Request
Instantiate the ListTemplatesOptions
struct and set the fields to provide parameter values for the ListTemplates
method.
Use the ListTemplatesOptions.Builder
to create a ListTemplatesOptions
object that contains the parameter values for the listTemplates
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
offset for paginated results
Possible values: value ≥ 0
Default:
0
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListTemplates options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listTemplates options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/templates"
listTemplatesOptions := eventNotificationsService.NewListTemplatesOptions( instanceID, ) templatesList, response, err := eventNotificationsService.ListTemplates(listTemplatesOptions)
const params = { instanceId, }; let res; try { res = await eventNotificationsService.listTemplates(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
boolean moreResults = true; int limit = 1; int offset = 0; ListTemplatesOptions listTemplatesOptions = new ListTemplatesOptions.Builder() .instanceId(instanceId) .offset(offset) .limit(limit) .search(search) .build(); // Invoke operation Response<TemplateList> response = eventNotificationsService.listTemplates(listTemplatesOptions).execute();
list_templates_response = self.event_notifications_service.list_templates( instance_id, limit=limit, offset=offset, search=search ) templates_list = list_templates_response.get_result()
Response
Payload describing a template list request
Total number of templates
Current offset
limit to show templates
List of templates
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Payload describing a template list request.
{
"templates": [
{
"id": "11fe18ba-0000-0000-9f07-355e8052a813",
"name": "template name",
"description": "Template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"abc",
"xyz"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-0000-4d02-0000-e45c974bb422",
"name": "template name",
"description": "template description",
"type": "smtp_custom.invitation",
"subscription_count": 1,
"subscription_names": [
"abc"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of templates.
Current offset.
limit to show templates.
List of templates.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- Templates
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Payload describing a template list request.
{
"templates": [
{
"id": "11fe18ba-0000-0000-9f07-355e8052a813",
"name": "template name",
"description": "Template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"abc",
"xyz"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-0000-4d02-0000-e45c974bb422",
"name": "template name",
"description": "template description",
"type": "smtp_custom.invitation",
"subscription_count": 1,
"subscription_names": [
"abc"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of templates.
Current offset.
limit to show templates.
List of templates.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- templates
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a template list request.
{
"templates": [
{
"id": "11fe18ba-0000-0000-9f07-355e8052a813",
"name": "template name",
"description": "Template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"abc",
"xyz"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-0000-4d02-0000-e45c974bb422",
"name": "template name",
"description": "template description",
"type": "smtp_custom.invitation",
"subscription_count": 1,
"subscription_names": [
"abc"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of templates.
Current offset.
limit to show templates.
List of templates.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- templates
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a template list request.
{
"templates": [
{
"id": "11fe18ba-0000-0000-9f07-355e8052a813",
"name": "template name",
"description": "Template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"abc",
"xyz"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-0000-4d02-0000-e45c974bb422",
"name": "template name",
"description": "template description",
"type": "smtp_custom.invitation",
"subscription_count": 1,
"subscription_names": [
"abc"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of templates.
Current offset.
limit to show templates.
List of templates.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- templates
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Get list of all templates
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "templates": [ { "id": "11fe18ba-0000-0000-9f07-355e8052a813", "name": "template name", "description": "Template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "abc", "xyz" ], "updated_at": "2021-09-05T00:25:19.599884Z" }, { "id": "1e99ad0e-0000-4d02-0000-e45c974bb422", "name": "template name", "description": "template description", "type": "smtp_custom.invitation", "subscription_count": 1, "subscription_names": [ "abc" ], "updated_at": "2021-09-17T01:06:04.565646Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 9 }
{ "templates": [ { "id": "11fe18ba-0000-0000-9f07-355e8052a813", "name": "template name", "description": "Template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "abc", "xyz" ], "updated_at": "2021-09-05T00:25:19.599884Z" }, { "id": "1e99ad0e-0000-4d02-0000-e45c974bb422", "name": "template name", "description": "template description", "type": "smtp_custom.invitation", "subscription_count": 1, "subscription_names": [ "abc" ], "updated_at": "2021-09-17T01:06:04.565646Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/templates?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 9 }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of a Template
Get details of a Template
Get details of a Template.
Get details of a Template.
Get details of a Template.
Get details of a Template.
GET /v1/instances/{instance_id}/templates/{id}
(eventNotifications *EventNotificationsV1) GetTemplate(getTemplateOptions *GetTemplateOptions) (result *Template, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetTemplateWithContext(ctx context.Context, getTemplateOptions *GetTemplateOptions) (result *Template, response *core.DetailedResponse, err error)
getTemplate(params)
get_template(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Template> getTemplate(GetTemplateOptions getTemplateOptions)
Request
Instantiate the GetTemplateOptions
struct and set the fields to provide parameter values for the GetTemplate
method.
Use the GetTemplateOptions.Builder
to create a GetTemplateOptions
object that contains the parameter values for the getTemplate
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Template
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The getTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/templates/{id}"
getTemplateOptions := &eventnotificationsv1.GetTemplateOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(templateInvitationID), } template, response, err := eventNotificationsService.GetTemplate(getTemplateOptions)
const params = { instanceId, id: templateInvitationID, }; let res; try { res = await eventNotificationsService.getTemplate(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetTemplateOptions getTemplateOptions = new GetTemplateOptions.Builder() .instanceId(instanceId) .id(templateInvitationID) .build(); // Invoke operation Response<Template> response = eventNotificationsService.getTemplate(getTemplateOptions).execute(); Template template = response.getResult();
get_template_response = event_notifications_service.get_template( instance_id, id=template_invitation_id ).get_result()
Response
Template object
Template ID
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Template name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Template description
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The type of template
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$
Subscription count
Names of subscriptions
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
[a-zA-Z0-9-:_].*
Updated at
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Status Code
Template information
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update details of a Template
Update details of a Template
Update details of a Template.
Update details of a Template.
Update details of a Template.
Update details of a Template.
PUT /v1/instances/{instance_id}/templates/{id}
(eventNotifications *EventNotificationsV1) ReplaceTemplate(replaceTemplateOptions *ReplaceTemplateOptions) (result *Template, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ReplaceTemplateWithContext(ctx context.Context, replaceTemplateOptions *ReplaceTemplateOptions) (result *Template, response *core.DetailedResponse, err error)
replaceTemplate(params)
replace_template(self,
instance_id: str,
id: str,
*,
name: str = None,
description: str = None,
type: str = None,
params: 'TemplateConfigOneOf' = None,
**kwargs
) -> DetailedResponse
ServiceCall<Template> replaceTemplate(ReplaceTemplateOptions replaceTemplateOptions)
Request
Instantiate the ReplaceTemplateOptions
struct and set the fields to provide parameter values for the ReplaceTemplate
method.
Use the ReplaceTemplateOptions.Builder
to create a ReplaceTemplateOptions
object that contains the parameter values for the replaceTemplate
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Template
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Payload describing a template update request
{
"name": "Message Template update",
"type": "smtp_custom.invitation",
"description": "Template description",
"params": {
"body": "PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==",
"subject": "HI This is the template subject for the invitation"
}
}
Template name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Template description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The type of template
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ReplaceTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- Params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
The replaceTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Payload describing an email template configuration.
- params
Template body(Base64 encoded).
Possible values: 1 ≤ length ≤ 4000000, Value must match regular expression
/.*/
The template subject.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/.*/
curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/templates/{id}" --data-raw '{ "name": "template name", "id": "template id", "description": "template description", "params": { "body": "PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PHRpdGxlPklCTSBFdmVudCBOb3RpZmljYXRpb25zPC90aXRsZT48L2hlYWQ+PGJvZHk+PHA+SGVsbG8hIEludml0YXRpb24gdGVtcGxhdGU8L3A+PHRhYmxlPjx0cj48dGQ+SGVsbG8gaW52aXRhdGlvbiBsaW5rOnt7IGlibWVuX2ludml0YXRpb24gfX0gPC90ZD48L3RyPjwvdGFibGU+PC9ib2R5PjwvaHRtbD4=", "subject": "Hi this is invitation for invitation message" } }'
curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/templates/{id}" --data-raw '{ "name": "template name", "id": "template id", "description": "template description", "params": { "body": "ewogICJib2R5IjogIjxodG1sPmhlbGxvIFdvcmxkPC9odG1sPiIsCiAgInN1YmplY3QiOiAiSGkgdGhpcyBpcyBpbnZpdGF0aW9uIGZvciBpbnZpdGF0aW9uIG1lc3NhZ2UiCn0=", } }'
curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/templates/{id}" --data-raw '{ "name": "template name", "id": "webhook template id", "description": "template description", "params": { "body": "eyJuYW1lIjoie3tkYXRhLm5hbWV9fSIifQ==", } }'
name := "template invitation" description := "template invitation description" templateConfig := &eventnotificationsv1.TemplateConfig{ Body: core.StringPtr("PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg=="), Subject: core.StringPtr("Hi this is invitation for invitation message"), } replaceTemplateOptions := &eventnotificationsv1.ReplaceTemplateOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(templateInvitationID), Name: core.StringPtr(name), Type: core.StringPtr(eventnotificationsv1.CreateTemplateOptionsTypeSMTPCustomInvitationConst), Description: core.StringPtr(description), Params: templateConfig, } templateResponse, response, err := eventNotificationsService.ReplaceTemplate(replaceTemplateOptions) name = "template notification" description = "template notification description" templateConfig = &eventnotificationsv1.TemplateConfig{ Body: core.StringPtr("PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg=="), Subject: core.StringPtr("Hi this is template for notification"), } replaceTemplateOptions = &eventnotificationsv1.ReplaceTemplateOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(templateNotificationID), Name: core.StringPtr(name), Type: core.StringPtr(eventnotificationsv1.CreateTemplateOptionsTypeSMTPCustomNotificationConst), Description: core.StringPtr(description), Params: templateConfig, } templateResponse, response, err = eventNotificationsService.ReplaceTemplate(replaceTemplateOptions)
name = "slack template" description = "slack template description" slackTemplateConfig := &eventnotificationsv1.TemplateConfigOneOfSlackTemplateConfig{ Body: core.StringPtr(slackTemplateBody), } replaceTemplateOptions = &eventnotificationsv1.ReplaceTemplateOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(slackTemplateID), Name: core.StringPtr(name), Type: core.StringPtr(templateTypeSlack), Description: core.StringPtr(description), Params: slackTemplateConfig, } templateResponse, response, err = eventNotificationsService.ReplaceTemplate(replaceTemplateOptions) if err != nil { panic(err) }
name = "webhook template" description = "webhook template description" webhookTemplateConfig := &eventnotificationsv1.TemplateConfigOneOfWebhookTemplateConfig{ Body: core.StringPtr(webhookTemplateBody), } replaceTemplateOptions = &eventnotificationsv1.ReplaceTemplateOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(webhookTemplateID), Name: core.StringPtr(name), Type: core.StringPtr("webhook.notification"), Description: core.StringPtr(description), Params: webhookTemplateConfig, } templateResponse, response, err = eventNotificationsService.ReplaceTemplate(replaceTemplateOptions) if err != nil { panic(err) }
const templateConfigModel = { params: { body: 'PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==', subject: 'Hi this is invitation for invitation message', }, }; let name = 'template name invitation update'; let description = 'template destination update'; let type = 'smtp_custom.invitation'; let replaceTemplateParams = { instanceId, name, type, params: templateConfigModel, description, }; let replaceTemplateResult; try { replaceTemplateResult = await eventNotificationsService.replaceTemplate(replaceTemplateParams); console.log(JSON.stringify(replaceTemplateResult.result, null, 2)); templateInvitationID = replaceTemplateResult.result.id; } catch (err) { console.warn(err); } name = 'template name notification update'; description = 'template destination update'; type = 'smtp_custom.notification'; replaceTemplateParams = { instanceId, name, type, params: templateConfigModel, description, }; try { replaceTemplateResult = await eventNotificationsService.replaceTemplate(replaceTemplateParams); console.log(JSON.stringify(replaceTemplateResult.result, null, 2)); templateNotificationID = replaceTemplateResult.result.id; } catch (err) { console.warn(err); }
name = 'slack template name update'; description = 'slack template description update'; type = 'slack.notification'; replaceTemplateParams = { instanceId, id: slackTemplateID, name, type, params: slackTemplateConfigModel, description, }; try { replaceTemplateResult = await eventNotificationsService.replaceTemplate(replaceTemplateParams); console.log(JSON.stringify(replaceTemplateResult.result, null, 2)); slackTemplateID = replaceTemplateResult.result.id; } catch (err) { console.warn(err); }
name = 'webhook template name update'; description = 'webhook template description update'; type = 'webhook.notification'; replaceTemplateParams = { instanceId, id: webhookTemplateID, name, type, params: webhookTemplateConfigModel, description, }; try { replaceTemplateResult = await eventNotificationsService.replaceTemplate(replaceTemplateParams); console.log(JSON.stringify(replaceTemplateResult.result, null, 2)); webhoookTemplateID = replaceTemplateResult.result.id; } catch (err) { console.warn(err); }
String name = "template name"; String description = "template description"; TemplateConfig templateConfig = new TemplateConfig.Builder() .body("PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==") .subject("Hi this is invitation for invitation message") .build(); ReplaceTemplateOptions replaceTemplateInvitationOptions = new ReplaceTemplateOptions.Builder() .instanceId(instanceId) .id(templateInvitationID) .name(name) .description(description) .type(CreateTemplateOptions.Type.SMTP_CUSTOM_INVITATION) .params(templateConfig) .build(); Response<Template> invitationResponse = eventNotificationsService.replaceTemplate(replaceTemplateInvitationOptions).execute(); Template invitationTemplateResult = invitationResponse.getResult(); ReplaceTemplateOptions replaceTemplateNotificationOptions = new ReplaceTemplateOptions.Builder() .instanceId(instanceId) .id(templateNotificationID) .name(name) .description(description) .type(CreateTemplateOptions.Type.SMTP_CUSTOM_NOTIFICATION) .params(templateConfig) .build(); Response<Template> notificationResponse = eventNotificationsService.replaceTemplate(replaceTemplateNotificationOptions).execute(); Template notificationTemplateResult = notificationResponse.getResult();
TemplateConfigOneOfSlackTemplateConfig slackTemplateConfig = new TemplateConfigOneOfSlackTemplateConfig.Builder() .body(slackTemplateBody) .build(); ReplaceTemplateOptions updateSlackTemplateOptions = new ReplaceTemplateOptions.Builder() .instanceId(instanceId) .id(slackTemplateID) .name(name) .description(description) .type("slack.notification") .params(slackTemplateConfig) .build(); Response<Template> slackTemplateResponse = eventNotificationsService.replaceTemplate(updateSlackTemplateOptions).execute(); Template slackTemplateResult = slackTemplateResponse.getResult();
TemplateConfigOneOfWebhookTemplateConfig webhookTemplateConfig = new TemplateConfigOneOfWebhookTemplateConfig.Builder() .body(webhookTemplateBody) .build(); ReplaceTemplateOptions updateWebhookTemplateOptions = new ReplaceTemplateOptions.Builder() .instanceId(instanceId) .id(webhookTemplateID) .name(name) .description(description) .type("webhook.notification") .params(webhookTemplateConfig) .build(); Response<Template> webhookTemplateResponse = eventNotificationsService.replaceTemplate(updateWebhookTemplateOptions).execute(); Template webhookTemplateResult = webhookTemplateResponse.getResult();
template_config_model = { 'body': 'PGh0bWw+CiAgaGVsbG8gd29ybGQKPC9odG1sPg==', 'subject': 'Hi this is invitation for invitation message', } template_name = "template_invitation" typeval = "smtp_custom.invitation" description = "invitation template" replace_template_response = event_notifications_service.replace_template( instance_id, id=template_invitation_id, name=template_name, type=typeval, description=description, params=template_config_model ).get_result() template_name = "template_notification" typeval = "smtp_custom.notification" description = "notification template" replace_template_response = event_notifications_service.replace_template( instance_id, id=template_notification_id, name=template_name, type=typeval, description=description, params=template_config_model ).get_result()
slack_template_config_model_json = {'body': slack_template_body} slack_template_config_model = TemplateConfigOneOfSlackTemplateConfig.from_dict( slack_template_config_model_json ) name = "template_slack" typeval = "slack.notification" description = "slack template" replace_template_response = self.event_notifications_service.replace_template( instance_id, name, type=typeval, params=slack_template_config_model, description=description, ).get_result() print(json.dumps(replace_template_response, indent=2))
webhook_template_config_model_json = {'body': webhook_template_body} webhook_template_config_model = TemplateConfigOneOfWebhookTemplateConfig.from_dict( webhook_template_config_model_json ) name = "template_webhook" typeval = "webhook.notification" description = "webhook template" replace_template_response = self.event_notifications_service.replace_template( instance_id, name, type=typeval, params=webhook_template_config_model, description=description, ).get_result() print(json.dumps(replace_template_response, indent=2))
Response
Template object
Template ID
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Template name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Template description
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The type of template
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$
Subscription count
Names of subscriptions
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
[a-zA-Z0-9-:_].*
Updated at
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Template object.
{
"id": "fd72a81a-1111-0000-0000-e63141ce8b4a",
"name": "template name",
"description": "This is for template description",
"type": "smtp_custom.notification",
"subscription_count": 2,
"subscription_names": [
"xyz",
"abc"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
}
Template ID.
Possible values: 32 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Template name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Template description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of template.
Possible values: 22 ≤ length ≤ 24, Value must match regular expression
/^(smtp_custom.notification|smtp_custom.invitation|slack.notification|webhook.notification)$/
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Status Code
Template information
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Request body type is not application/json
Internal server error
Unexpected Error
{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
{ "id": "fd72a81a-1111-0000-0000-e63141ce8b4a", "name": "template name", "description": "This is for template description", "type": "smtp_custom.notification", "subscription_count": 2, "subscription_names": [ "xyz", "abc" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a Template
Delete a Template
Delete a Template.
Delete a Template.
Delete a Template.
Delete a Template.
DELETE /v1/instances/{instance_id}/templates/{id}
(eventNotifications *EventNotificationsV1) DeleteTemplate(deleteTemplateOptions *DeleteTemplateOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteTemplateWithContext(ctx context.Context, deleteTemplateOptions *DeleteTemplateOptions) (response *core.DetailedResponse, err error)
deleteTemplate(params)
delete_template(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteTemplate(DeleteTemplateOptions deleteTemplateOptions)
Request
Instantiate the DeleteTemplateOptions
struct and set the fields to provide parameter values for the DeleteTemplate
method.
Use the DeleteTemplateOptions.Builder
to create a DeleteTemplateOptions
object that contains the parameter values for the deleteTemplate
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Template
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The deleteTemplate options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Template.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl -X DELETE --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/templates/{id}"
deleteTemplateOptions := &eventnotificationsv1.DeleteTemplateOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(ID), } response, err := eventNotificationsService.DeleteTemplate(deleteTemplateOptions)
const params = { instanceId, id: templates[i], }; try { await eventNotificationsService.deleteTemplate(params); } catch (err) { console.warn(err); } }
DeleteTemplateOptions deleteTemplateOptions = new DeleteTemplateOptions.Builder() .instanceId(instanceId) .id(template) .build(); // Invoke operation Response<Void> response = eventNotificationsService.deleteTemplate(deleteTemplateOptions).execute();
delete_template_response = event_notifications_service.delete_template( instance_id, id ).get_result()
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new Destination
Create a new Destination
Create a new Destination.
Create a new Destination.
Create a new Destination.
Create a new Destination.
POST /v1/instances/{instance_id}/destinations
(eventNotifications *EventNotificationsV1) CreateDestination(createDestinationOptions *CreateDestinationOptions) (result *DestinationResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateDestinationWithContext(ctx context.Context, createDestinationOptions *CreateDestinationOptions) (result *DestinationResponse, response *core.DetailedResponse, err error)
createDestination(params)
create_destination(self,
instance_id: str,
name: str,
type: str,
*,
description: str = None,
collect_failed_events: bool = None,
config: 'DestinationConfig' = None,
certificate: BinaryIO = None,
certificate_content_type: str = None,
icon_16x16: BinaryIO = None,
icon_16x16_content_type: str = None,
icon_16x16_2x: BinaryIO = None,
icon_16x16_2x_content_type: str = None,
icon_32x32: BinaryIO = None,
icon_32x32_content_type: str = None,
icon_32x32_2x: BinaryIO = None,
icon_32x32_2x_content_type: str = None,
icon_128x128: BinaryIO = None,
icon_128x128_content_type: str = None,
icon_128x128_2x: BinaryIO = None,
icon_128x128_2x_content_type: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<DestinationResponse> createDestination(CreateDestinationOptions createDestinationOptions)
Request
Instantiate the CreateDestinationOptions
struct and set the fields to provide parameter values for the CreateDestination
method.
Use the CreateDestinationOptions.Builder
to create a CreateDestinationOptions
object that contains the parameter values for the createDestination
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Form Parameters
The Destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
The type of Destination Webhook
Allowable values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The Destination description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Whether to collect the failed event in Cloud Object Storage bucket
Default:
false
Payload describing a destination configuration
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration
- params
Email Domain
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
.*
Certificate for APNS
Possible values: 1 ≤ length ≤ 5000
Safari icon 16x16
Possible values: 1 ≤ length ≤ 5000
Safari icon 16x16@2x
Possible values: 1 ≤ length ≤ 5000
Safari icon 32x32
Possible values: 1 ≤ length ≤ 5000
Safari icon 32x32@2x
Possible values: 1 ≤ length ≤ 5000
Safari icon 128x128
Possible values: 1 ≤ length ≤ 5000
Safari icon 128x128@2x
Possible values: 1 ≤ length ≤ 5000
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of Destination Webhook.
Allowable values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- Config
Payload describing a custom Domain Email destination configuration.
- Params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- Dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x16.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x162x.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x32.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x322x.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x128.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x1282x.
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of Destination Webhook.
Allowable values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x16.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x162x.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x32.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x322x.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x128.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x1282x.
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of Destination Webhook.
Allowable values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_16x16.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_16x16_2x.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_32x32.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_32x32_2x.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_128x128.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_128x128_2x.
The createDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of Destination Webhook.
Allowable values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x16. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x162x. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x32. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x322x. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x128. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x1282x. Values for this parameter can be obtained from the HttpMediaType class.
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Webhook Destination", "description": "This destination is for webhook purpose", "type": "webhook", "config": { "params": { "url": "https://webhook.site/00a4b674-c0cf-47a5-ab15-dca7e311127e", "verb": "POST", "plugin": "default", "custom_headers": { "authorization": "2c9a0cfb-bfd7-42e5-9274-94c3b9b0ce2f", "k1": "v1" } } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Android Destination", "description": "This destination is for android purpose", "type": "push_android", "config": { "params": { "sender_id": "1xxxxxxxxx912", "server_key": "38xx2xxxxxxxxxxxxxxxx802", "pre_prod": false } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Android Destination", "description": "This destination is for android purpose", "type": "push_android", "config": { "params": { "project_id": "1xxxxxxxxx912", "private_key": "38xx2xxxxxxxxxxxxxxxx802", "client_email": "abc@xyz" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: multipart/form-data" "{base_url}/v1/instances/{instance_id}/destinations" --form 'name="APNS Destination"' --form 'description="This destination is for apns purpose"' --form 'type="push_ios"' --form 'config="{"params": {"is_sandbox": true, "cert_type": "p8", "key_id": "8KVZMP5GUF", "team_id": "TN6YQNGLXP", "bundle_id": "com.ibm.cloud.en.app" }}"' --form 'certificate="<file_path>"'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Chrome Destination", "description": "This destination is for chrome purpose", "type": "push_chrome", "config": { "params": { "api_key": "AAxxxxxxxxxxxxxxxxx4z", "website_url": "https://www.xyz.pqr" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Firefox Destination", "description": "This destination is for firefox purpose", "type": "push_firefox", "config": { "params": { "website_url": "https://www.xyz.pqr" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: multipart/form-data" "{base_url}/v1/instances/{instance_id}/destinations"--form 'name="Safari Destination"' --form 'description="This destination is for safari purpose"' --form 'type="push_safari"' --form 'config="{ "params": { "password":"sxxxxxi", "cert_type": "p12", "website_name":"Great Website", "url_format_string":"https://en-agile-gorilla-eu.mybluemix.net/%@/", "website_push_id":"web.net.mybluemix.en-agile-gorilla-eu", "website_url":"https://en-agile-gorilla-eu.mybluemix.net" } }"' --form 'certificate=@/<filepath>/safari.p12' --form 'icon_16x16=@/<filepath>/icon_16x16.png' --form 'icon_16x16@2x=@/<filepath>/icon_16x16@2x.png' --form 'icon_32x32=@/<filepath>/icon_32x32.png' --form 'icon_32x32@2x=@/<filepath>/icon_32x32@2x.png' --form 'icon_128x128=@/<filepath>/icon_128x128.png' --form 'icon_128x128@2x=@/<filepath>/icon_128x128@2x.png'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw ' { "name": "Slack Destination", "description": "This destination is for slack purpose", "type": "slack", "config": { "params": { "url": "https://hooks.slack.xxxxxxxxxxxx/00a4b674-c0cf-47a5-ab15-dca7e311127e", "type": "incoming_webhook" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw ' { "name": "Slack Destination", "description": "This destination is for slack purpose", "type": "slack", "config": { "params": { "token": "xoxb-xxxxxx9970470-7671592175008-KprdjcN1u4XPZv9xxxxxxxx", "type": "direct_message" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "MSTeams Destination", "description": "This destination is for msteams purpose", "type": "msteams", "config": { "params": { "url": "https://xxxxxxxx.webhook.office.com/webhookb2/xxxxxxxxxxxxxxxxxxxx/IncomingWebhook/55xxxxxxxxx861ab4a/xxxxxxxxx" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "PagerDuty Destination", "description": "This destination is for PagerDuty purpose", "type": "pagerduty", "config": { "params": { "api_key": "AAxxxxxxxxxxxxxxxxx4z" , "routing_key": "SSxxxxxxxxxxxxxxxxx4z" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "ServiceNow Destination", "description": "This destination is for ServiceNow purpose", "type": "servicenow", "config": { "params": { "client_id": "AAxxxxxxxxxxx4z", "client_secret": "SSxxxxxxxxxxxxxxxxx4z", "username": "SSxxxxxxxxxxxxxxxxx4z", "password": "SSxxxxxxxxxxxxxxxxx4z", "instance_name": "SSxxxxxxxxxxxxxxxxx4z" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "CodeEngine Destination", "description": "This destination is for CodeEngine", "type": "ibmce", "config": { "params": { "type": "application", "url": "https://codeengine.site/00a4b674-c0cf-47a5-ab15-dca7e311127e", "verb": "POST", "custom_headers": { "authorization": "2xxxxxxb-bxx7-4xxx-9xxx-94xxxxxxxxxx", "k1": "v1" } } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "CodeEngine Destination", "description": "This destination is for CodeEngine", "type": "ibmce", "config": { "params": { "type": "job", "project_crn": "crn:v1:staging:public:codeengine:us-south:a/e7e5820aeccb40efb78fd69a7858ef23:xxxxxxxxxxxxxx::", "job_name": "custom-job", } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Cloud Object Storage Destination", "description": "This destination is for Cloud Object Storage purpose", "type": "ibmcos", "config": { "params": { "bucket_name": "encosbucket", "instance_id": "e8a6b5a3-xxxx-xxxx-xxxx-ea86a4d4axxx", "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Huawei Destination", "description": "This destination is for Huawei purpose", "type": "push_huawei", "config": { "params": { "client_id": "AAxxxxxxxxxxx4z", "client_secret": "SSxxxxxxxxxxxxxxxxx4z", "pre_prod": false } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Custom Domain Email Destination", "description": "This destination is for Custom Domain Email purpose", "type": "smtp_custom", "config": { "params": { "domain": "abc.test.xyz.com" } } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations" --data-raw '{ "name": "Custom SMS Destination", "description": "This destination is for Custom SMS purpose", "type": "sms_custom" }'
webHookDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfWebhookDestinationConfig{ URL: core.StringPtr("https://gcm.com"), Verb: core.StringPtr("get"), CustomHeaders: map[string]string{ "gcm_apikey": "api_key_value", }, SensitiveHeaders: []string{"gcm_apikey"}, } webHookDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: webHookDestinationConfigParamsModel, } name := "Webhook_destination" typeVal := "webhook" description := "Webhook Destination" createWebHookDestinationOptions := &eventnotificationsv1.CreateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(name), Type: core.StringPtr(typeVal), Description: core.StringPtr(description), Config: webHookDestinationConfigModel, } destinationResponse, response, err = eventNotificationsService.CreateDestination(createWebHookDestinationOptions)
createDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "FCM_destination", eventnotificationsv1.CreateDestinationOptionsTypePushAndroidConst, ) destinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfFcmDestinationConfig{ ServerKey: core.StringPtr(fcmServerKey), SenderID: core.StringPtr(fcmSenderId), } destinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsModel, } createDestinationOptions.SetConfig(destinationConfigModel) destinationResponse, response, err := eventNotificationsService.CreateDestination(createDestinationOptions)
createFCMV1DestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "FCM_destination_V1", eventnotificationsv1.CreateDestinationOptionsTypePushAndroidConst, ) destinationFCMV1ConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfFcmDestinationConfig{ ProjectID: core.StringPtr(fcmProjectID), PrivateKey: core.StringPtr(fcmPrivateKey), ClientEmail: core.StringPtr(fcmClientEmail), } destinationFCMV1ConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationFCMV1ConfigParamsModel, } createDestinationOptions.SetConfig(destinationFCMV1ConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(createFCMV1DestinationOptions)
chromeCreateDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "Chrome_destination", eventnotificationsv1.CreateDestinationOptionsTypePushChromeConst, ) destinationConfigParamsChromeModel := &eventnotificationsv1.DestinationConfigOneOfChromeDestinationConfig{ APIKey: core.StringPtr("sdslknsdlfnlsejifw900"), WebsiteURL: core.StringPtr("https://cloud.ibm.com"), } chromeDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsChromeModel, } chromeCreateDestinationOptions.SetConfig(chromeDestinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(chromeCreateDestinationOptions)
fireCreateDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "Firefox_destination", eventnotificationsv1.CreateDestinationOptionsTypePushFirefoxConst, ) destinationConfigParamsfireModel := &eventnotificationsv1.DestinationConfigOneOfFirefoxDestinationConfig{ WebsiteURL: core.StringPtr("https://cloud.ibm.com"), } fireDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsfireModel, } fireCreateDestinationOptions.SetConfig(fireDestinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(fireCreateDestinationOptions)
createDestinationOptions = eventNotificationsService.NewCreateDestinationOptions( instanceID, "Safari_destination", eventnotificationsv1.CreateDestinationOptionsTypePushSafariConst, ) certificatefile, err := os.Open(safariCertificatePath) if err != nil { panic(err) } createDestinationOptions.Certificate = certificatefile destinationConfigParamsSafariModel := &eventnotificationsv1.DestinationConfigOneOfSafariDestinationConfig{ CertType: core.StringPtr("p12"), Password: core.StringPtr("safari"), WebsiteURL: core.StringPtr("https://ensafaripush.mybluemix.net"), WebsiteName: core.StringPtr("NodeJS Starter Application"), URLFormatString: core.StringPtr("https://ensafaripush.mybluemix.net/%@/?flight=%@"), WebsitePushID: core.StringPtr("web.net.mybluemix.ensafaripush"), } destinationConfigModel = &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsSafariModel, } createDestinationOptions.SetConfig(destinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(createDestinationOptions)
createSlackDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "Slack_destination", eventnotificationsv1.CreateDestinationOptionsTypeSlackConst, ) destinationConfigParamsSlackModel := &eventnotificationsv1.DestinationConfigOneOfSlackDestinationConfig{ URL: core.StringPtr("https://api.slack.com/myslack"), Type: core.StringPtr("incoming_webhook"), } slackDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsSlackModel, } createSlackDestinationOptions.SetConfig(slackDestinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(createSlackDestinationOptions)
createSlackDMDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "Slack_DM_destination", eventnotificationsv1.CreateDestinationOptionsTypeSlackConst, ) destinationConfigParamsSlackDMModel := &eventnotificationsv1.DestinationConfigOneOfSlackDirectMessageDestinationConfig{ Token: core.StringPtr(slackDMToken), Type: core.StringPtr("direct_message"), } slackDMDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsSlackDMModel, } createSlackDMDestinationOptions.SetConfig(slackDMDestinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(createSlackDMDestinationOptions)
createMSTeamsDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "MSTeams_destination", eventnotificationsv1.CreateDestinationOptionsTypeMsteamsConst, ) destinationConfigParamsMSTeaMSModel := &eventnotificationsv1.DestinationConfigOneOfMsTeamsDestinationConfig{ URL: core.StringPtr("https://teams.microsoft.com"), } msTeamsDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsMSTeaMSModel, } createMSTeamsDestinationOptions.SetConfig(msTeamsDestinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(createMSTeamsDestinationOptions)
pagerDutyCreateDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "PagerDuty_destination", eventnotificationsv1.CreateDestinationOptionsTypePagerdutyConst, ) destinationConfigParamsPDModel := &eventnotificationsv1.DestinationConfigOneOfPagerDutyDestinationConfig{ APIKey: core.StringPtr("insert API key here"), RoutingKey: core.StringPtr("insert Routing Key here"), } pagerDutyDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsPDModel, } pagerDutyCreateDestinationOptions.SetConfig(pagerDutyDestinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(pagerDutyCreateDestinationOptions)
serviceNowCreateDestinationOptions := eventNotificationsService.NewCreateDestinationOptions( instanceID, "servicenow_destination", eventnotificationsv1.CreateDestinationOptionsTypeServicenowConst, ) destinationConfigParamsServiceNowModel := &eventnotificationsv1.DestinationConfigOneOfServiceNowDestinationConfig{ ClientID: core.StringPtr(sNowClientID), ClientSecret: core.StringPtr(sNowClientSecret), Username: core.StringPtr(sNowUserName), Password: core.StringPtr(sNowPassword), InstanceName: core.StringPtr(sNowInstanceName), } serviceNowDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsServiceNowModel, } serviceNowCreateDestinationOptions.SetConfig(serviceNowDestinationConfigModel) destinationResponse, response, err = eventNotificationsService.CreateDestination(serviceNowCreateDestinationOptions)
destinationConfigCEParamsModel := &eventnotificationsv1.DestinationConfigOneOfCodeEngineDestinationConfig{ URL: core.StringPtr(codeEngineURL), Verb: core.StringPtr("get"), Type: core.StringPtr("application"), CustomHeaders: map[string]string{ "authorization": "api_key_value", }, SensitiveHeaders: []string{"authorization"}, } destinationConfigCEModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigCEParamsModel, } ceName := "codeengine_destination" ceTypeVal := "ibmce" ceDescription := "codeengine Destination" createCEDestinationOptions := &eventnotificationsv1.CreateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(ceName), Type: core.StringPtr(ceTypeVal), Description: core.StringPtr(ceDescription), Config: destinationConfigCEModel, } destinationResponse, response, err = eventNotificationsService.CreateDestination(createCEDestinationOptions)
ceName = "codeengine_job_destination" ceDescription = "codeengine job Destination" destinationConfigCEJobParamsModel := &eventnotificationsv1.DestinationConfigOneOfCodeEngineDestinationConfig{ ProjectCRN: core.StringPtr(codeEngineProjectCRN), JobName: core.StringPtr("custom-job"), Type: core.StringPtr("job"), } destinationConfigCEJobsModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigCEJobParamsModel, } createCEJobDestinationOptions := &eventnotificationsv1.CreateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(ceName), Type: core.StringPtr(ceTypeVal), Description: core.StringPtr(ceDescription), Config: destinationConfigCEJobsModel, } destinationCEJobResponse, response, err := eventNotificationsService.CreateDestination(createCEJobDestinationOptions)
cosDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfIBMCloudObjectStorageDestinationConfig{ BucketName: core.StringPtr("encosbucket"), InstanceID: core.StringPtr("e8a6b5a3-3ff4-xxxx-xxxx-eaxxa4d4a3b6"), Endpoint: core.StringPtr("https://s3.us-west.cloud-object-storage.test.appdomain.cloud"), } cosDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: cosDestinationConfigParamsModel, } cosName := "cos_destination" costypeVal := eventnotificationsv1.CreateDestinationOptionsTypeIbmcosConst cosDescription := "cos Destination" cosCreateDestinationOptions := &eventnotificationsv1.CreateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(cosName), Type: core.StringPtr(costypeVal), Description: core.StringPtr(cosDescription), Config: cosDestinationConfigModel, } destinationResponse, response, err = eventNotificationsService.CreateDestination(cosCreateDestinationOptions)
huaweiDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfHuaweiDestinationConfig{ ClientID: core.StringPtr(huaweiClientID), ClientSecret: core.StringPtr(huaweiClientSecret), PreProd: core.BoolPtr(false), } huaweiDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: huaweiDestinationConfigParamsModel, } huaweiName := "huawei_destination" huaweitypeVal := eventnotificationsv1.CreateDestinationOptionsTypePushHuaweiConst huaweiDescription := "huawei Destination" huaweiCreateDestinationOptions := &eventnotificationsv1.CreateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(huaweiName), Type: core.StringPtr(huaweitypeVal), Description: core.StringPtr(huaweiDescription), Config: huaweiDestinationConfigModel, } destinationResponse, response, err = eventNotificationsService.CreateDestination(huaweiCreateDestinationOptions)
customDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfCustomDomainEmailDestinationConfig{ Domain: core.StringPtr("abc.event-notifications.test.cloud.ibm.com"), } customDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: customDestinationConfigParamsModel, } customName := "custom_email_destination" customtypeVal := eventnotificationsv1.CreateDestinationOptionsTypeSMTPCustomConst customDescription := "custom Destination" customCreateDestinationOptions := &eventnotificationsv1.CreateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(customName), Type: core.StringPtr(customtypeVal), Description: core.StringPtr(customDescription), Config: customDestinationConfigModel, } destinationResponse, response, err = eventNotificationsService.CreateDestination(customCreateDestinationOptions)
customSMSName := "custom_sms_destination" customSMSTypeVal := eventnotificationsv1.CreateDestinationOptionsTypeSmsCustomConst customSMSDescription := "custom sms Destination" customSMSCreateDestinationOptions := &eventnotificationsv1.CreateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(customSMSName), Type: core.StringPtr(customSMSTypeVal), Description: core.StringPtr(customSMSDescription), CollectFailedEvents: core.BoolPtr(false), } destinationResponse, response, err = eventNotificationsService.CreateDestination(customSMSCreateDestinationOptions)
const webDestinationConfigParamsModel = { url: 'https://gcm.com', verb: 'get', custom_headers: { 'Authorization': 'aaa-r-t-fdsfs-55kfjsd-fsdfs' }, sensitive_headers: ['Authorization'], }; const webDestinationConfigModel = { params: webDestinationConfigParamsModel, }; let name = 'GCM_destination'; let description = 'GCM Destination'; let type = 'webhook'; params = { instanceId, name, type, description, config: webDestinationConfigModel, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigParamsModel = { server_key: fcmServerKey, sender_id: fcmSenderId, }; const destinationConfigModel = { params: destinationConfigParamsModel, }; let params = { instanceId, name: 'FCM_destination', type: 'push_android', description: 'FCM Destination', config: destinationConfigModel, }; res = await eventNotificationsService.createDestination(params);
destinationConfigParamsModel = { private_key: fcmPrivateKey, project_id: fcmProjectId, client_email: fcmClientEmail, }; destinationConfigModel = { params: destinationConfigParamsModel, }; name = 'FCM_V1_destination'; description = 'FCM V1 Destination'; type = 'push_android'; params = { instanceId, name, type, description, config: destinationConfigModel, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigModelChrome = { params: { website_url: 'https://cloud.ibm.com', api_key: 'efwewerwerkwer89werj', }, }; name = 'Chrome_destination'; description = 'Chrome Destination'; type = 'push_chrome'; params = { instanceId, name, type, description, config: destinationConfigModelChrome, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigModelFirefox = { params: { website_url: 'https://cloud.ibm.com', }, }; name = 'Firefox_destination'; description = 'Firefox Destination'; type = 'push_firefox'; params = { instanceId, name, type, description, config: destinationConfigModelFirefox, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigModelSafari = { params: { cert_type: 'p12', password: 'safari', website_url: 'https://ensafaripush.mybluemix.net', website_name: 'NodeJS Starter Application', url_format_string: 'https://ensafaripush.mybluemix.net/%@/?flight=%@', website_push_id: 'web.net.mybluemix.ensafaripush', }, }; let readStream = ''; try { readStream = fs.createReadStream(safariCertificatePath); console.log(readStream); } catch (err) { console.error(err); } description = 'Safari Destination'; type = 'push_safari'; const safariparams = { instanceId, name: 'safari_destination', type, description, config: destinationConfigModelSafari, certificate: readStream, }; res = await eventNotificationsService.createDestination(safariparams);
const destinationConfigModelSlack = { params: { url: 'https://api.slack.com/myslack', type: 'incoming_webhook', }, }; name = 'slack_destination'; description = 'Slack Destination'; type = 'slack'; params = { instanceId, name, type, description, config: destinationConfigModelSlack, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigModelSlackDM = { params: { token: slackDmToken, type: 'direct_message', }, }; name = 'slack_DM_destination'; description = 'Slack DM Destination'; type = 'slack'; params = { instanceId, name, type, description, config: destinationConfigModelSlackDM, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigModelMSTeams = { params: { url: 'https://teams.microsoft.com', }, }; name = 'MSTeams_destination'; description = 'MSTeams Destination'; type = 'msteams'; params = { instanceId, name, type, description, config: destinationConfigModelMSTeams, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigModelPagerDuty = { params: { api_key: 'insert API key here', routing_key: 'insert Routing Key here', }, }; name = 'PagerDuty_destination'; description = 'PagerDuty Destination'; type = 'pagerduty'; params = { instanceId, name, type, description, config: destinationConfigModelPagerDuty, }; res = await eventNotificationsService.createDestination(params);
const destinationConfigModelServiceNow = { params: { client_id: sNowClientId, client_secret: sNowClientSecret, username: sNowUserName, password: sNowPassword, instance_name: sNowInstanceName, }, }; name = 'ServiceNow_destination'; description = 'Service Now Destination'; type = 'servicenow'; params = { instanceId, name, type, description, config: destinationConfigModelServiceNow, }; res = await eventNotificationsService.createDestination(params);
const destinationCEConfigParamsModel = { url: codeEngineURL, verb: 'post', type: 'application', custom_headers: { authorization: 'xxx-tye67-yyy' }, sensitive_headers: ['authorization'], }; const destinationCEConfigModel = { params: destinationCEConfigParamsModel, }; name = 'code_engine_destination'; description = 'code engine Destination'; type = 'ibmce'; params = { instanceId, name, type, description, config: destinationCEConfigModel, }; res = await eventNotificationsService.createDestination(params);
const destinationCEJobConfigParamsModel = { type: 'job', project_crn: codeEngineProjectCRN, job_name: 'custom-job', }; const destinationCEJobConfigModel = { params: destinationCEJobConfigParamsModel, }; name = 'code_engine_job_destination'; description = 'code engine job Destination'; type = 'ibmce'; params = { instanceId, name, type, description, config: destinationCEJobConfigModel, }; res = await eventNotificationsService.createDestination(params);
const cosdestinationConfigModel = { params: { bucket_name: 'encosbucket', instance_id: 'e8a6b5a3-3ff4-xxxx-xxxx-ea86a4d4a3b6', endpoint: 'https://s3.us-west.cloud-object-storage.test.appdomain.cloud' } }; name = 'COS_destination'; description = 'COS Destination'; type = 'ibmcos'; params = { instanceId, name, type, description, config: cosdestinationConfigModel, }; res = await eventNotificationsService.createDestination(params);
const huaweidestinationConfigModel = { params: { client_id: huaweiClientId, client_secret: huaweiClientSecret, pre_prod: false, }, }; name = 'Huawei_destination'; description = 'Huawei Destination'; type = 'push_huawei'; params = { instanceId, name, type, description, config: huaweidestinationConfigModel, }; res = await eventNotificationsService.createDestination(params);
const customdestinationConfigModel = { params: { domain: 'abc.event-notifications.test.cloud.ibm.com', }, }; name = 'Custom_Email_destination'; description = 'Custom Email Destination'; type = 'smtp_custom'; params = { instanceId, name, type, description, config: customdestinationConfigModel, }; res = await eventNotificationsService.createDestination(params);
name = 'Custom_sms_destination'; description = 'Custom sms Destination'; type = 'sms_custom'; let collectFailedEvents = false; collectFailedEvents = false; params = { instanceId, name, type, description, collectFailedEvents, }; res = await eventNotificationsService.createDestination(params);
DestinationConfigOneOfWebhookDestinationConfig destinationConfigParamsModel = new DestinationConfigOneOfWebhookDestinationConfig.Builder() .url("https://gcm.com") .verb("get") .customHeaders(new java.util.HashMap<String, String>() { { put("gcm_apikey", "testString"); } }) .sensitiveHeaders(new java.util.ArrayList<String>(java.util.Arrays.asList("gcm_apikey"))) .build(); DestinationConfig destinationConfigModel = new DestinationConfig.Builder() .params(destinationConfigParamsModel) .build(); String name = "webhook_destination"; String typeVal = "webhook"; String description = "webhook Destination"; CreateDestinationOptions createDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(name) .type(typeVal) .description(description) .config(destinationConfigModel) .certificate(new FileInputStream(new File("/path"))) .certificateContentType("contentype") .build(); Response<DestinationResponse> response = eventNotificationsService.createDestination(createDestinationOptions).execute(); DestinationResponse destinationResponseResult = response.getResult(); System.out.println(destinationResponseResult);
DestinationConfigOneOfFCMDestinationConfig fcmConfig = new DestinationConfigOneOfFCMDestinationConfig.Builder() .senderId(fcmSenderId) .serverKey(fcmServerKey) .build(); DestinationConfig destinationFcmConfigModel = new DestinationConfig.Builder() .params(fcmConfig) .build(); String fcmName = "FCM_destination"; String fcmTypeVal = "push_android"; String fcmDescription = "Fcm Destination"; CreateDestinationOptions createFCMDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(fcmName) .type(fcmTypeVal) .description(fcmDescription) .config(destinationFcmConfigModel) .build(); // Invoke operation Response<DestinationResponse> fcmResponse = eventNotificationsService.createDestination(createFCMDestinationOptions).execute(); DestinationResponse destinationResponse = fcmResponse.getResult();
DestinationConfigOneOfFCMDestinationConfig fcmV1Config = new DestinationConfigOneOfFCMDestinationConfig.Builder() .clientEmail(fcmClientEmail) .privateKey(fcmPrivateKey) .projectId(fcmProjectID) .preProd(false) .build(); DestinationConfig destinationFCMV1ConfigModel = new DestinationConfig.Builder() .params(fcmConfig) .build(); String fcmV1Name = "FCM_destination_v1"; String fcmV1TypeVal = "push_android"; String fcmV1Description = "Fcm Destination_v1"; CreateDestinationOptions createFCMV1DestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(fcmV1Name) .type(fcmV1TypeVal) .description(fcmV1Description) .config(destinationFCMV1ConfigModel) .build(); // Invoke operation Response<DestinationResponse> fcmV1Response = eventNotificationsService.createDestination(createFCMV1DestinationOptions).execute(); // Validate response DestinationResponse destinationV1Response = fcmV1Response.getResult();
DestinationConfigOneOfChromeDestinationConfig chromeDestinationConfig = new DestinationConfigOneOfChromeDestinationConfig.Builder() .websiteUrl("https://cloud.ibm.com") .apiKey("aksndkasdnkasd") .build(); DestinationConfig chromeDestinationConfigModel = new DestinationConfig.Builder() .params(chromeDestinationConfig) .build(); String chromeName = "Chrome_destination"; String chromeTypeVal = "push_chrome"; String chromeDescription = "Google Chrome Destination"; CreateDestinationOptions createChromeDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(chromeName) .type(chromeTypeVal) .description(chromeDescription) .config(chromeDestinationConfigModel) .build(); Response<DestinationResponse> chromeResponse = eventNotificationsService.createDestination(createChromeDestinationOptions).execute(); DestinationResponse chromeDestinationResponseResult = chromeResponse.getResult();
DestinationConfigOneOfFirefoxDestinationConfig firefoxDestinationConfig = new DestinationConfigOneOfFirefoxDestinationConfig.Builder() .websiteUrl("https://cloud.ibm.com") .build(); DestinationConfig fireFoxDestinationConfigModel = new DestinationConfig.Builder() .params(firefoxDestinationConfig) .build(); String firefoxName = "Firefox_destination"; String firefoxTypeVal = "push_firefox"; String firefoxDescription = "Firefox Destination"; CreateDestinationOptions createFireDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(firefoxName) .type(firefoxTypeVal) .description(firefoxDescription) .config(fireFoxDestinationConfigModel) .build(); Response<DestinationResponse> firefoxResponse = eventNotificationsService.createDestination(createFireDestinationOptions).execute(); DestinationResponse destinationFirefoxResponseResult = firefoxResponse.getResult();
DestinationConfigOneOfSafariDestinationConfig safariDestinationConfig = new DestinationConfigOneOfSafariDestinationConfig.Builder() .certType("p12") .password("safari") .websiteUrl("https://ensafaripush.mybluemix.net") .websiteName("NodeJS Starter Application") .urlFormatString("https://ensafaripush.mybluemix.net/%@/?flight=%@") .websitePushId("web.net.mybluemix.ensafaripush") .build(); DestinationConfig destinationSafariConfigModel = new DestinationConfig.Builder() .params(safariDestinationConfig) .build(); String safariName = "Safari_destination"; String safariTypeVal = "push_safari"; String safariDescription = "Safari Destination"; File file = new File(safariCertificatePath); InputStream stream = new FileInputStream(file); CreateDestinationOptions createSafariDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(safariName) .type(safariTypeVal) .description(safariDescription) .config(destinationSafariConfigModel) .certificate(stream) .build(); Response<DestinationResponse> safariResponse = eventNotificationsService.createDestination(createSafariDestinationOptions).execute(); DestinationResponse safariDestinationResponse = safariResponse.getResult();
DestinationConfigOneOfSlackDestinationConfig slackDestinationConfig= new DestinationConfigOneOfSlackDestinationConfig.Builder() .url("https://api.slack.com/myslack") .type("incoming_webhook") .build(); DestinationConfig destinationSlackConfigModel = new DestinationConfig.Builder() .params(slackDestinationConfig) .build(); String slackName = "Slack_destination"; String slackTypeVal = "slack"; String slackDescription = "Slack Destination"; CreateDestinationOptions createSlackDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(slackName) .type(slackTypeVal) .description(slackDescription) .config(destinationSlackConfigModel) .build(); Response<DestinationResponse> slackResponse = eventNotificationsService.createDestination(createSlackDestinationOptions).execute(); DestinationResponse slackDestinationResponseResult = slackResponse.getResult();
DestinationConfigOneOfSlackDirectMessageDestinationConfig slackDMDestinationConfig = new DestinationConfigOneOfSlackDirectMessageDestinationConfig.Builder() .token(slackDMToken) .type("direct_message") .build(); DestinationConfig destinationSlackDMConfigModel = new DestinationConfig.Builder() .params(slackDMDestinationConfig) .build(); String slackDMName = "Slack_DM_destination"; String slackDMTypeVal = "slack"; String slackDMDescription = "Slack DM Destination"; CreateDestinationOptions createSlackDMDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(slackDMName) .type(slackDMTypeVal) .description(slackDMDescription) .config(destinationSlackDMConfigModel) .build(); // Invoke operation Response<DestinationResponse> slackDMResponse = eventNotificationsService.createDestination(createSlackDMDestinationOptions).execute(); DestinationResponse slackDMDestinationResponseResult = slackDMResponse.getResult();
DestinationConfigOneOfMSTeamsDestinationConfig msTeamsDestinationConfig= new DestinationConfigOneOfMSTeamsDestinationConfig.Builder() .url("https://teams.microsoft.com") .build(); DestinationConfig destinationMsTeamsConfigModel = new DestinationConfig.Builder() .params(msTeamsDestinationConfig) .build(); String msTeamsName = "MSTeams_destination"; String msTeamsTypeVal = "msteams"; String msTeamsDescription = "MSTeams Destination"; CreateDestinationOptions createMsTeamsDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(msTeamsName) .type(msTeamsTypeVal) .description(msTeamsDescription) .config(destinationMsTeamsConfigModel) .build(); Response<DestinationResponse> teamsResponse = eventNotificationsService.createDestination(createMsTeamsDestinationOptions).execute(); DestinationResponse msTeamsDestinationResponseResult = teamsResponse.getResult();
DestinationConfigOneOfPagerDutyDestinationConfig pdDestinationConfig = new DestinationConfigOneOfPagerDutyDestinationConfig.Builder() .apiKey("insert apikey here") .routingKey("insert routing key here") .build(); DestinationConfig pagerDutyDestinationConfigModel = new DestinationConfig.Builder() .params(pdDestinationConfig) .build(); String pdName = "Pager_Duty_destination"; String pdTypeVal = "pagerduty"; String pdDescription = "PagerDuty Destination"; CreateDestinationOptions createPagerDutyDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(pdName) .type(pdTypeVal) .description(pdDescription) .config(pagerDutyDestinationConfigModel) .build(); // Invoke operation Response<DestinationResponse> pdResponse = eventNotificationsService.createDestination(createPagerDutyDestinationOptions).execute(); DestinationResponse destinationPagerDutyResponseResult = pdResponse.getResult();
DestinationConfigOneOfServiceNowDestinationConfig serviceNowDestinationConfig = new DestinationConfigOneOfServiceNowDestinationConfig.Builder() .clientId(sNowClientId) .clientSecret(sNowClientSecret) .username(sNowUserName) .password(sNowPassword) .instanceName(sNowInstanceName) .build(); DestinationConfig serviceNowDestinationConfigModel = new DestinationConfig.Builder() .params(serviceNowDestinationConfig) .build(); String serviceNowName = "servicenow_destination"; String serviceNowTypeVal = "servicenow"; String serviceNowDescription = "ServiceNow Destination"; CreateDestinationOptions createServiceNowDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(serviceNowName) .type(serviceNowTypeVal) .description(serviceNowDescription) .config(serviceNowDestinationConfigModel) .build(); // Invoke operation Response<DestinationResponse> serviceNowResponse = eventNotificationsService.createDestination(createServiceNowDestinationOptions).execute(); // Validate response DestinationResponse destinationServiceNowResponseResult = serviceNowResponse.getResult();
DestinationConfigOneOfCodeEngineDestinationConfig destinationCEConfigParamsModel = new DestinationConfigOneOfCodeEngineDestinationConfig.Builder() .url(codeEngineURL) .verb("get") .type("application") .customHeaders(new java.util.HashMap<String, String>() { { put("authorization", "testString"); } }) .sensitiveHeaders(new java.util.ArrayList<String>(java.util.Arrays.asList("authorization"))) .build(); DestinationConfig destinationCEConfigModel = new DestinationConfig.Builder() .params(destinationCEConfigParamsModel) .build(); String codeEngineName = "code-engine_destination"; String codeEngineTypeVal = "ibmce"; String codeEngineDescription = "code engine Destination"; CreateDestinationOptions createCEDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(codeEngineName) .type(codeEngineTypeVal) .description(codeEngineDescription) .config(destinationCEConfigModel) .build(); // Invoke operation Response<DestinationResponse> ceResponse = eventNotificationsService.createDestination(createCEDestinationOptions).execute(); DestinationResponse destinationCEResponseResult = ceResponse.getResult();
DestinationConfigOneOfCodeEngineDestinationConfig destinationCEJobConfigParamsModel = new DestinationConfigOneOfCodeEngineDestinationConfig.Builder() .type("job") .projectCrn(codeEngineProjectCRN) .jobName("custom-job") .build(); DestinationConfig destinationCEJobConfigModel = new DestinationConfig.Builder() .params(destinationCEJobConfigParamsModel) .build(); codeEngineName = "code-engine_job_destination"; codeEngineDescription = "code engine job Destination"; CreateDestinationOptions createCEJobDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(codeEngineName) .type(codeEngineTypeVal) .description(codeEngineDescription) .config(destinationCEJobConfigModel) .build(); // Invoke operation Response<DestinationResponse> ceJobResponse = eventNotificationsService.createDestination(createCEJobDestinationOptions).execute();
DestinationConfigOneOfIBMCloudObjectStorageDestinationConfig destinationCOSConfigParamsModel = new DestinationConfigOneOfIBMCloudObjectStorageDestinationConfig.Builder() .bucketName("encosbucket") .instanceId("e8a6b5a3-xxxx-xxxx-xxxx-ea86a4d4axxx") .endpoint("https://s3.us-west.cloud-object-storage.test.appdomain.cloud") .build(); DestinationConfig destinationCOSConfigModel = new DestinationConfig.Builder() .params(destinationCOSConfigParamsModel) .build(); String cosName = "Cloud Object Storage"; String cosTypeVal = "ibmcos"; String cosDescription = "Cloud Object Storage Destination"; CreateDestinationOptions createCOSDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(cosName) .type(cosTypeVal) .description(cosDescription) .config(destinationCOSConfigModel) .build(); // Invoke operation Response<DestinationResponse> cosResponse = eventNotificationsService.createDestination(createCOSDestinationOptions).execute(); DestinationResponse destinationCOSResponseResult = cosResponse.getResult();
DestinationConfigOneOfHuaweiDestinationConfig destinationHuaweiConfigParamsModel = new DestinationConfigOneOfHuaweiDestinationConfig.Builder() .clientId(huaweiClientId) .clientSecret(huaweiClientSecret) .preProd(false) .build(); DestinationConfig destinationHuaweiConfigModel = new DestinationConfig.Builder() .params(destinationHuaweiConfigParamsModel) .build(); String huaweiName = "Huawei"; String huaweiTypeVal = "push_huawei"; String huaweiDescription = "Huawei Destination"; CreateDestinationOptions createHuaweiDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(huaweiName) .type(huaweiTypeVal) .description(huaweiDescription) .config(destinationHuaweiConfigModel) .build(); // Invoke operation Response<DestinationResponse> huaweiResponse = eventNotificationsService.createDestination(createHuaweiDestinationOptions).execute(); DestinationResponse destinationHuaweiResponseResult = huaweiResponse.getResult();
DestinationConfigOneOfCustomDomainEmailDestinationConfig destinationCustomConfigParamsModel = new DestinationConfigOneOfCustomDomainEmailDestinationConfig.Builder() .domain("abc.event-notifications.test.cloud.ibm.com").build(); DestinationConfig destinationcustomConfigModel = new DestinationConfig.Builder() .params(destinationCustomConfigParamsModel) .build(); String customName = "Custom Email"; String customTypeVal = "smtp_custom"; String customDescription = "Custom Email Destination"; CreateDestinationOptions createCustomEmailDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(customName) .type(customTypeVal) .description(customDescription) .config(destinationcustomConfigModel) .build(); // Invoke operation Response<DestinationResponse> customResponse = eventNotificationsService.createDestination(createCustomEmailDestinationOptions).execute(); DestinationResponse destinationCustomResponseResult = customResponse.getResult();
String customSMSName = "Custom SMS"; String customSMSTypeVal = "sms_custom"; String customSMSDescription = "Custom SMS Destination"; CreateDestinationOptions createCustomSMSDestinationOptions = new CreateDestinationOptions.Builder() .instanceId(instanceId) .name(customSMSName) .type(customSMSTypeVal) .collectFailedEvents(false) .description(customSMSDescription) .build(); Response<DestinationResponse> customSMSResponse = eventNotificationsService.createDestination(createCustomSMSDestinationOptions).execute(); DestinationResponse destinationCustomSMSResponseResult = customSMSResponse.getResult();
destination_config_params_model = { 'url': 'https://gcm.com', 'verb': 'get', 'custom_headers': {'gcm_apikey': 'apikey'}, 'sensitive_headers': ['gcm_apikey'], } # Construct a dict representation of a DestinationConfig model destination_config_model = { 'params': destination_config_params_model, } name = "Webhook_destination" typeval = "webhook" description = "Webhook Destination" destination = event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result() destination = DestinationResponse.from_dict(destination)
destination_config_params_model = { "server_key": fcmServerKey, "sender_id": fcmSenderId, "pre_prod": False } destination_config_model = { 'params': destination_config_params_model, } name = "FCM_destination" typeVal = "push_android" description = "FCM Destination" destination = event_notifications_service.create_destination( instance_id, name, type=typeVal, description=description, config=destination_config_model ).get_result() destination = DestinationResponse.from_dict(destination)
fcm_config_params = { "project_id": fcm_project_id, "private_key": fcm_private_key, "client_email": fcm_client_email, } destination_config_model = { 'params': fcm_config_params, } name = "FCM_V1_destination" typeval = "push_android" description = "FCM V1 Destination" create_destination_response = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ) assert create_destination_response.get_status_code() == 201 destination_response = create_destination_response.get_result() destination = DestinationResponse.from_dict(destination_response)
chrome_config_params = { "website_url": "https://www.ibmcfendpoint.com/", "api_key": "wedleknlwenwern9832jhde", } destination_config_model = { 'params': chrome_config_params, } name = "Chrome_destination" typeval = "push_chrome" description = "This is a Chrome Destination" destination = event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result() destination = DestinationResponse.from_dict(destination)
fire_config_params = { "website_url": "https://cloud.ibm.com", } destination_config_model = { 'params': fire_config_params, } name = "Firefox_destination" typeval = "push_firefox" description = "This is a Firefox Destination" destination = event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result() destination = DestinationResponse.from_dict(destination)
safari_config_params = { 'cert_type': 'p12', 'password': 'safari', 'website_url': 'https://ensafaripush.mybluemix.net', 'website_name': 'NodeJS Starter Application', 'url_format_string': 'https://ensafaripush.mybluemix.net/%@/?flight=%@', 'website_push_id': 'web.net.mybluemix.ensafaripush', "pre_prod": False } destination_config_model = { 'params': safari_config_params, } name = "Safari_destination" typeVal = "push_safari" description = "Safari Destination" certificatefile = open(safariCertificatePath, 'rb') destination = event_notifications_service.create_destination( instance_id, name, type=typeVal, description=description, config=destination_config_model, certificate=certificatefile, ).get_result() destination = DestinationResponse.from_dict(destination)
slack_config_params = { 'url': 'https://api.slack.com/myslack', 'type': 'incoming_webhook', } destination_config_model = { 'params': slack_config_params, } name = "Slack_destination" typeval = "slack" description = "Slack Destination" destination = event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result() destination = DestinationResponse.from_dict(destination)
slack_config_params = {"token": slack_dm_token, "type": "direct_message"} destination_config_model = { "params": slack_config_params, } name = "Slack_DM_destination" typeval = "slack" description = "Slack DM Destination" create_destination_response = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model, ) destination_response = create_destination_response.get_result() destination = DestinationResponse.from_dict(destination_response)
msteams_config_params = { 'url': 'https://teams.microsoft.com', } destination_config_model = { 'params': msteams_config_params, } name = "MSTeams_destination" typeval = "msteams" description = "MSteams Destination" destination = event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result() destination = DestinationResponse.from_dict(destination)
pd_config_params = { "api_key": "insert API Key here", "routing_key": "insert Routing Key here" } destination_config_model = { 'params': pd_config_params, } name = "Pager_Duty_destination" typeval = "pagerduty" description = "This is a PagerDuty Destination" destination = event_notifications_service.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result()
snow_config_params = { "client_id": snow_client_id, "client_secret": snow_client_secret, "username": snow_user_name, "password": snow_password, "instance_name": snow_password } destination_config_model = { 'params': snow_config_params, } name = "Service_Now_destination" typeval = "servicenow" description = "This is a ServiceNow Destination" destination = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result()
destination_config_params_model = { "url": code_engine_URL, "verb": "get", "type": "application", "custom_headers": {"authorization": "apikey"}, "sensitive_headers": ["authorization"], } # Construct a dict representation of a DestinationConfig model destination_config_model = { 'params': destination_config_params_model, } name = "code_engine_destination" typeval = "ibmce" description = "code engine Destination" destination = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result()
destination_config_params_model = { "type": "job", "project_crn": code_engine_project_CRN, "job_name": "custom-job", } # Construct a dict representation of a DestinationConfig model destination_config_model = { "params": destination_config_params_model, } name = "code_engine_destination_job" typeval = "ibmce" description = "code engine Destination job" create_destination_response = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model, ) destination_response = create_destination_response.get_result()
destination_config_model = { 'params': { 'bucket_name': 'encosbucket', 'instance_id': 'e8a6b5a3-3ff4-xxxx-xxxx-ea86a4d4a3b6', 'endpoint': 'https://s3.us-west.cloud-object-storage.test.appdomain.cloud' } } name = "COS_destination" typeval = "ibmcos" description = "COS Destination" destination = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result()
destination_config_model = { 'params': { 'client_id': huawei_client_id, 'client_secret': huawei_client_secret, 'pre_prod': False, } } name = "Huawei_destination" typeval = "push_huawei" description = "Huawei Destination" destination = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result()
destination_config_model = { 'params': { 'domain': 'abc.event-notifications.test.cloud.ibm.com', } } name = "custom_email_destination" typeval = "smtp_custom" description = "Custom Email Destination" destination = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, config=destination_config_model ).get_result()
name = "custom_sms_destination" typeval = "sms_custom" description = "Custom sms Destination" create_destination_response = self.event_notifications_service.create_destination( instance_id, name, type=typeval, description=description, collect_failed_events=False, ) destination_response = create_destination_response.get_result()
Response
Payload describing a destination get request
Destination ID
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination type
Possible values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Payload describing a destination configuration
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
Last updated time
Whether to collect the failed event in Cloud Object Storage bucket
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "2c9a0cfb-bfd7-xx43a-9274-94cjk8a9b0ce2f"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "This destination is for webhook test purpose in e2e",
"id": "fd72a88a-bc88-491d-bb75-e63141ce8b4a",
"name": "Admin Webhook Compliance",
"type": "webhook"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- Config
Payload describing a custom Domain Email destination configuration.
- Params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- Dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "2c9a0cfb-bfd7-xx43a-9274-94cjk8a9b0ce2f"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "This destination is for webhook test purpose in e2e",
"id": "fd72a88a-bc88-491d-bb75-e63141ce8b4a",
"name": "Admin Webhook Compliance",
"type": "webhook"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "2c9a0cfb-bfd7-xx43a-9274-94cjk8a9b0ce2f"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "This destination is for webhook test purpose in e2e",
"id": "fd72a88a-bc88-491d-bb75-e63141ce8b4a",
"name": "Admin Webhook Compliance",
"type": "webhook"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "2c9a0cfb-bfd7-xx43a-9274-94cjk8a9b0ce2f"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"created_at": "2021-10-07T07:05:52.098388257Z",
"description": "This destination is for webhook test purpose in e2e",
"id": "fd72a88a-bc88-491d-bb75-e63141ce8b4a",
"name": "Admin Webhook Compliance",
"type": "webhook"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Status Code
New destination created successfully
Bad or incorrect request body
Trying to access the API with unauthorized token
Trying to create duplicate destination
Request body type is not application/json
Internal server error
Unexpected Error
{ "config": { "params": { "custom_headers": { "authorization": "2c9a0cfb-bfd7-xx43a-9274-94cjk8a9b0ce2f" }, "sensitive_headers": [ "authorization" ], "url": "https://cloud.ibm.com/nhwebhook/sendwebhook", "verb": "post" } }, "created_at": "2021-10-07T07:05:52.098388257Z", "description": "This destination is for webhook test purpose in e2e", "id": "fd72a88a-bc88-491d-bb75-e63141ce8b4a", "name": "Admin Webhook Compliance", "type": "webhook" }
{ "config": { "params": { "custom_headers": { "authorization": "2c9a0cfb-bfd7-xx43a-9274-94cjk8a9b0ce2f" }, "sensitive_headers": [ "authorization" ], "url": "https://cloud.ibm.com/nhwebhook/sendwebhook", "verb": "post" } }, "created_at": "2021-10-07T07:05:52.098388257Z", "description": "This destination is for webhook test purpose in e2e", "id": "fd72a88a-bc88-491d-bb75-e63141ce8b4a", "name": "Admin Webhook Compliance", "type": "webhook" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "55372994-3e42-4129-9c7b-aa2aa0820c53", "status_code": 409, "errors": [ { "code": "destination_conflict", "message": "Duplicate destination name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "55372994-3e42-4129-9c7b-aa2aa0820c53", "status_code": 409, "errors": [ { "code": "destination_conflict", "message": "Duplicate destination name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all Destinations
List all Destinations
List all Destinations.
List all Destinations.
List all Destinations.
List all Destinations.
GET /v1/instances/{instance_id}/destinations
(eventNotifications *EventNotificationsV1) ListDestinations(listDestinationsOptions *ListDestinationsOptions) (result *DestinationList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListDestinationsWithContext(ctx context.Context, listDestinationsOptions *ListDestinationsOptions) (result *DestinationList, response *core.DetailedResponse, err error)
listDestinations(params)
list_destinations(self,
instance_id: str,
*,
limit: int = None,
offset: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<DestinationList> listDestinations(ListDestinationsOptions listDestinationsOptions)
Request
Instantiate the ListDestinationsOptions
struct and set the fields to provide parameter values for the ListDestinations
method.
Use the ListDestinationsOptions.Builder
to create a ListDestinationsOptions
object that contains the parameter values for the listDestinations
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
offset for paginated results
Possible values: value ≥ 0
Default:
0
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListDestinations options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listDestinations options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/destinations"
listDestinationsOptions := eventNotificationsService.NewListDestinationsOptions( instanceID, ) destinationList, response, err := eventNotificationsService.ListDestinations(listDestinationsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(destinationList, "", " ") fmt.Println(string(b))
const params = { instanceId, }; let res; try { res = await eventNotificationsService.listDestinations(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
ListDestinationsOptions listDestinationsOptions = new ListDestinationsOptions.Builder() .instanceId(instanceId) .build(); Response<DestinationList> response = eventNotificationsService.listDestinations(listDestinationsOptions).execute(); DestinationList destinationList = response.getResult();
destination_list = event_notifications_service.list_destinations( instance_id ).get_result()
Response
Payload describing a destination list request
Total number of destinations
Current offset
limit to show destinations
List of destinations
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Payload describing a destination list request.
{
"destinations": [
{
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "SL Web",
"description": "This destination is for webhook purpose new",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-f1ec-4d02-9162-e45c974bb422",
"name": "SMTP apireview updated",
"description": "wow this is amazing",
"type": "smtp_ibm",
"subscription_count": 1,
"subscription_names": [
"smtp apireview sub"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "47d31664-0943-41a4-a174-9fdf60716e8d",
"name": "SMS destination apireview",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"sms sub apireview"
],
"updated_at": "2021-09-17T01:03:55.313179Z"
},
{
"id": "81ed6419-e7fd-44c6-9d7e-79df74f282d6",
"name": "webhook destination encrypt again2",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook sub",
"Webhook new payload test"
],
"updated_at": "2021-08-23T06:29:49.020232Z"
},
{
"id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"name": "email destination",
"description": "This destination is for email purpose",
"type": "smtp_ibm",
"subscription_count": 2,
"subscription_names": [
"Test subscription",
"Email Subscription on new change"
],
"updated_at": "2021-08-17T11:20:01.296323Z"
},
{
"id": "be9709a4-aa74-4e41-89ef-762c3780ef26",
"name": "Webhook Dest apireview",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 1,
"subscription_names": [
"webhook sub apireview"
],
"updated_at": "2021-09-17T00:49:03.659326Z"
},
{
"id": "d4ff1d27-4c0d-4e32-9706-567015d7e531",
"name": "webhook revamped",
"description": "",
"type": "webhook",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-17T01:52:41.568987Z"
},
{
"id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"name": "sms destination",
"description": "This destination is for sms purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"SMS Subscription on new change"
],
"updated_at": "2021-08-17T11:19:56.293221Z"
},
{
"id": "eda2e472-86ae-494f-83c0-4990ba79790d",
"name": "SMS destination 5",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-08T13:13:55.183553Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of destinations.
Current offset.
limit to show destinations.
List of destinations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Slack Webhook", "description": "This destination is for webhook purpose new", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- Destinations
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
Whether to collect the failed event in Cloud Object Storage bucket.
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Payload describing a destination list request.
{
"destinations": [
{
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "SL Web",
"description": "This destination is for webhook purpose new",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-f1ec-4d02-9162-e45c974bb422",
"name": "SMTP apireview updated",
"description": "wow this is amazing",
"type": "smtp_ibm",
"subscription_count": 1,
"subscription_names": [
"smtp apireview sub"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "47d31664-0943-41a4-a174-9fdf60716e8d",
"name": "SMS destination apireview",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"sms sub apireview"
],
"updated_at": "2021-09-17T01:03:55.313179Z"
},
{
"id": "81ed6419-e7fd-44c6-9d7e-79df74f282d6",
"name": "webhook destination encrypt again2",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook sub",
"Webhook new payload test"
],
"updated_at": "2021-08-23T06:29:49.020232Z"
},
{
"id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"name": "email destination",
"description": "This destination is for email purpose",
"type": "smtp_ibm",
"subscription_count": 2,
"subscription_names": [
"Test subscription",
"Email Subscription on new change"
],
"updated_at": "2021-08-17T11:20:01.296323Z"
},
{
"id": "be9709a4-aa74-4e41-89ef-762c3780ef26",
"name": "Webhook Dest apireview",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 1,
"subscription_names": [
"webhook sub apireview"
],
"updated_at": "2021-09-17T00:49:03.659326Z"
},
{
"id": "d4ff1d27-4c0d-4e32-9706-567015d7e531",
"name": "webhook revamped",
"description": "",
"type": "webhook",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-17T01:52:41.568987Z"
},
{
"id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"name": "sms destination",
"description": "This destination is for sms purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"SMS Subscription on new change"
],
"updated_at": "2021-08-17T11:19:56.293221Z"
},
{
"id": "eda2e472-86ae-494f-83c0-4990ba79790d",
"name": "SMS destination 5",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-08T13:13:55.183553Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of destinations.
Current offset.
limit to show destinations.
List of destinations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Slack Webhook", "description": "This destination is for webhook purpose new", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- destinations
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
Whether to collect the failed event in Cloud Object Storage bucket.
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a destination list request.
{
"destinations": [
{
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "SL Web",
"description": "This destination is for webhook purpose new",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-f1ec-4d02-9162-e45c974bb422",
"name": "SMTP apireview updated",
"description": "wow this is amazing",
"type": "smtp_ibm",
"subscription_count": 1,
"subscription_names": [
"smtp apireview sub"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "47d31664-0943-41a4-a174-9fdf60716e8d",
"name": "SMS destination apireview",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"sms sub apireview"
],
"updated_at": "2021-09-17T01:03:55.313179Z"
},
{
"id": "81ed6419-e7fd-44c6-9d7e-79df74f282d6",
"name": "webhook destination encrypt again2",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook sub",
"Webhook new payload test"
],
"updated_at": "2021-08-23T06:29:49.020232Z"
},
{
"id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"name": "email destination",
"description": "This destination is for email purpose",
"type": "smtp_ibm",
"subscription_count": 2,
"subscription_names": [
"Test subscription",
"Email Subscription on new change"
],
"updated_at": "2021-08-17T11:20:01.296323Z"
},
{
"id": "be9709a4-aa74-4e41-89ef-762c3780ef26",
"name": "Webhook Dest apireview",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 1,
"subscription_names": [
"webhook sub apireview"
],
"updated_at": "2021-09-17T00:49:03.659326Z"
},
{
"id": "d4ff1d27-4c0d-4e32-9706-567015d7e531",
"name": "webhook revamped",
"description": "",
"type": "webhook",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-17T01:52:41.568987Z"
},
{
"id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"name": "sms destination",
"description": "This destination is for sms purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"SMS Subscription on new change"
],
"updated_at": "2021-08-17T11:19:56.293221Z"
},
{
"id": "eda2e472-86ae-494f-83c0-4990ba79790d",
"name": "SMS destination 5",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-08T13:13:55.183553Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of destinations.
Current offset.
limit to show destinations.
List of destinations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Slack Webhook", "description": "This destination is for webhook purpose new", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- destinations
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
Whether to collect the failed event in Cloud Object Storage bucket.
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a destination list request.
{
"destinations": [
{
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "SL Web",
"description": "This destination is for webhook purpose new",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "1e99ad0e-f1ec-4d02-9162-e45c974bb422",
"name": "SMTP apireview updated",
"description": "wow this is amazing",
"type": "smtp_ibm",
"subscription_count": 1,
"subscription_names": [
"smtp apireview sub"
],
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "47d31664-0943-41a4-a174-9fdf60716e8d",
"name": "SMS destination apireview",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"sms sub apireview"
],
"updated_at": "2021-09-17T01:03:55.313179Z"
},
{
"id": "81ed6419-e7fd-44c6-9d7e-79df74f282d6",
"name": "webhook destination encrypt again2",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook sub",
"Webhook new payload test"
],
"updated_at": "2021-08-23T06:29:49.020232Z"
},
{
"id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"name": "email destination",
"description": "This destination is for email purpose",
"type": "smtp_ibm",
"subscription_count": 2,
"subscription_names": [
"Test subscription",
"Email Subscription on new change"
],
"updated_at": "2021-08-17T11:20:01.296323Z"
},
{
"id": "be9709a4-aa74-4e41-89ef-762c3780ef26",
"name": "Webhook Dest apireview",
"description": "This destination is for webhook test purpose",
"type": "webhook",
"subscription_count": 1,
"subscription_names": [
"webhook sub apireview"
],
"updated_at": "2021-09-17T00:49:03.659326Z"
},
{
"id": "d4ff1d27-4c0d-4e32-9706-567015d7e531",
"name": "webhook revamped",
"description": "",
"type": "webhook",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-17T01:52:41.568987Z"
},
{
"id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"name": "sms destination",
"description": "This destination is for sms purpose",
"type": "sms_ibm",
"subscription_count": 1,
"subscription_names": [
"SMS Subscription on new change"
],
"updated_at": "2021-08-17T11:19:56.293221Z"
},
{
"id": "eda2e472-86ae-494f-83c0-4990ba79790d",
"name": "SMS destination 5",
"description": "This destination is for sms test purpose",
"type": "sms_ibm",
"subscription_count": 0,
"subscription_names": [],
"updated_at": "2021-09-08T13:13:55.183553Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 9
}
Total number of destinations.
Current offset.
limit to show destinations.
List of destinations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Slack Webhook", "description": "This destination is for webhook purpose new", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-09-05T00:25:19.599884Z" }
- destinations
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
Whether to collect the failed event in Cloud Object Storage bucket.
Subscription count.
Names of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z0-9-:_].*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Get list of all destinations
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "destinations": [ { "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "SL Web", "description": "This destination is for webhook purpose new", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-09-05T00:25:19.599884Z" }, { "id": "1e99ad0e-f1ec-4d02-9162-e45c974bb422", "name": "SMTP apireview updated", "description": "wow this is amazing", "type": "smtp_ibm", "subscription_count": 1, "subscription_names": [ "smtp apireview sub" ], "updated_at": "2021-09-17T01:06:04.565646Z" }, { "id": "47d31664-0943-41a4-a174-9fdf60716e8d", "name": "SMS destination apireview", "description": "This destination is for sms test purpose", "type": "sms_ibm", "subscription_count": 1, "subscription_names": [ "sms sub apireview" ], "updated_at": "2021-09-17T01:03:55.313179Z" }, { "id": "81ed6419-e7fd-44c6-9d7e-79df74f282d6", "name": "webhook destination encrypt again2", "description": "This destination is for webhook test purpose", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook sub", "Webhook new payload test" ], "updated_at": "2021-08-23T06:29:49.020232Z" }, { "id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "name": "email destination", "description": "This destination is for email purpose", "type": "smtp_ibm", "subscription_count": 2, "subscription_names": [ "Test subscription", "Email Subscription on new change" ], "updated_at": "2021-08-17T11:20:01.296323Z" }, { "id": "be9709a4-aa74-4e41-89ef-762c3780ef26", "name": "Webhook Dest apireview", "description": "This destination is for webhook test purpose", "type": "webhook", "subscription_count": 1, "subscription_names": [ "webhook sub apireview" ], "updated_at": "2021-09-17T00:49:03.659326Z" }, { "id": "d4ff1d27-4c0d-4e32-9706-567015d7e531", "name": "webhook revamped", "description": "", "type": "webhook", "subscription_count": 0, "subscription_names": [], "updated_at": "2021-09-17T01:52:41.568987Z" }, { "id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "name": "sms destination", "description": "This destination is for sms purpose", "type": "sms_ibm", "subscription_count": 1, "subscription_names": [ "SMS Subscription on new change" ], "updated_at": "2021-08-17T11:19:56.293221Z" }, { "id": "eda2e472-86ae-494f-83c0-4990ba79790d", "name": "SMS destination 5", "description": "This destination is for sms test purpose", "type": "sms_ibm", "subscription_count": 0, "subscription_names": [], "updated_at": "2021-09-08T13:13:55.183553Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 9 }
{ "destinations": [ { "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "SL Web", "description": "This destination is for webhook purpose new", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-09-05T00:25:19.599884Z" }, { "id": "1e99ad0e-f1ec-4d02-9162-e45c974bb422", "name": "SMTP apireview updated", "description": "wow this is amazing", "type": "smtp_ibm", "subscription_count": 1, "subscription_names": [ "smtp apireview sub" ], "updated_at": "2021-09-17T01:06:04.565646Z" }, { "id": "47d31664-0943-41a4-a174-9fdf60716e8d", "name": "SMS destination apireview", "description": "This destination is for sms test purpose", "type": "sms_ibm", "subscription_count": 1, "subscription_names": [ "sms sub apireview" ], "updated_at": "2021-09-17T01:03:55.313179Z" }, { "id": "81ed6419-e7fd-44c6-9d7e-79df74f282d6", "name": "webhook destination encrypt again2", "description": "This destination is for webhook test purpose", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook sub", "Webhook new payload test" ], "updated_at": "2021-08-23T06:29:49.020232Z" }, { "id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "name": "email destination", "description": "This destination is for email purpose", "type": "smtp_ibm", "subscription_count": 2, "subscription_names": [ "Test subscription", "Email Subscription on new change" ], "updated_at": "2021-08-17T11:20:01.296323Z" }, { "id": "be9709a4-aa74-4e41-89ef-762c3780ef26", "name": "Webhook Dest apireview", "description": "This destination is for webhook test purpose", "type": "webhook", "subscription_count": 1, "subscription_names": [ "webhook sub apireview" ], "updated_at": "2021-09-17T00:49:03.659326Z" }, { "id": "d4ff1d27-4c0d-4e32-9706-567015d7e531", "name": "webhook revamped", "description": "", "type": "webhook", "subscription_count": 0, "subscription_names": [], "updated_at": "2021-09-17T01:52:41.568987Z" }, { "id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "name": "sms destination", "description": "This destination is for sms purpose", "type": "sms_ibm", "subscription_count": 1, "subscription_names": [ "SMS Subscription on new change" ], "updated_at": "2021-08-17T11:19:56.293221Z" }, { "id": "eda2e472-86ae-494f-83c0-4990ba79790d", "name": "SMS destination 5", "description": "This destination is for sms test purpose", "type": "sms_ibm", "subscription_count": 0, "subscription_names": [], "updated_at": "2021-09-08T13:13:55.183553Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 9 }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of a Destination
Get details of a Destination
Get details of a Destination.
Get details of a Destination.
Get details of a Destination.
Get details of a Destination.
GET /v1/instances/{instance_id}/destinations/{id}
(eventNotifications *EventNotificationsV1) GetDestination(getDestinationOptions *GetDestinationOptions) (result *Destination, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetDestinationWithContext(ctx context.Context, getDestinationOptions *GetDestinationOptions) (result *Destination, response *core.DetailedResponse, err error)
getDestination(params)
get_destination(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Destination> getDestination(GetDestinationOptions getDestinationOptions)
Request
Instantiate the GetDestinationOptions
struct and set the fields to provide parameter values for the GetDestination
method.
Use the GetDestinationOptions.Builder
to create a GetDestinationOptions
object that contains the parameter values for the getDestination
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The getDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/destinations/{id}"
getDestinationOptions := eventNotificationsService.NewGetDestinationOptions( instanceID, destinationID, ) destination, response, err := eventNotificationsService.GetDestination(getDestinationOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(destination, "", " ") fmt.Println(string(b))
const params = { instanceId, id: destinationId, }; let res; try { res = await eventNotificationsService.getDestination(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetDestinationOptions getDestinationOptions = new GetDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId) .build(); Response<Destination> response = eventNotificationsService.getDestination(getDestinationOptions).execute(); Destination destination = response.getResult(); System.out.println(destination);
destination = event_notifications_service.get_destination( instance_id, id=destination_id ).get_result() print(json.dumps(destination, indent=2))
Response
Payload describing a destination get request
Destination ID
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Last updated time
Number of subscriptions
Possible values: value ≥ 0
List of subscriptions
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Whether to collect the failed event in Cloud Object Storage bucket
Payload describing a destination configuration
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- Config
Payload describing a custom Domain Email destination configuration.
- Params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- Dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Status Code
Destination information
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "config": { "params": { "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ], "url": "https://cloud.ibm.com/nhwebhook/sendwebhook", "verb": "post" } }, "description": "This destination is for creating admin webhook to receive compliance related notifications", "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Admin Webhook Compliance", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-08-17T14:06:53.078389Z" }
{ "config": { "params": { "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ], "url": "https://cloud.ibm.com/nhwebhook/sendwebhook", "verb": "post" } }, "description": "This destination is for creating admin webhook to receive compliance related notifications", "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Admin Webhook Compliance", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-08-17T14:06:53.078389Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update details of a Destination
Update details of a Destination
Update details of a Destination.
Update details of a Destination.
Update details of a Destination.
Update details of a Destination.
PATCH /v1/instances/{instance_id}/destinations/{id}
(eventNotifications *EventNotificationsV1) UpdateDestination(updateDestinationOptions *UpdateDestinationOptions) (result *Destination, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) UpdateDestinationWithContext(ctx context.Context, updateDestinationOptions *UpdateDestinationOptions) (result *Destination, response *core.DetailedResponse, err error)
updateDestination(params)
update_destination(self,
instance_id: str,
id: str,
*,
name: str = None,
description: str = None,
collect_failed_events: bool = None,
config: 'DestinationConfig' = None,
certificate: BinaryIO = None,
certificate_content_type: str = None,
icon_16x16: BinaryIO = None,
icon_16x16_content_type: str = None,
icon_16x16_2x: BinaryIO = None,
icon_16x16_2x_content_type: str = None,
icon_32x32: BinaryIO = None,
icon_32x32_content_type: str = None,
icon_32x32_2x: BinaryIO = None,
icon_32x32_2x_content_type: str = None,
icon_128x128: BinaryIO = None,
icon_128x128_content_type: str = None,
icon_128x128_2x: BinaryIO = None,
icon_128x128_2x_content_type: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<Destination> updateDestination(UpdateDestinationOptions updateDestinationOptions)
Request
Instantiate the UpdateDestinationOptions
struct and set the fields to provide parameter values for the UpdateDestination
method.
Use the UpdateDestinationOptions.Builder
to create a UpdateDestinationOptions
object that contains the parameter values for the updateDestination
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Form Parameters
Destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Whether to collect the failed event in Cloud Object Storage bucket
Default:
false
Payload describing a destination configuration
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration
- params
Email Domain
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
.*
Certificate for APNS
Possible values: 1 ≤ length ≤ 5000
Safari icon 16x16
Possible values: 1 ≤ length ≤ 5000
Safari icon 16x16@2x
Possible values: 1 ≤ length ≤ 5000
Safari icon 32x32
Possible values: 1 ≤ length ≤ 5000
Safari icon 32x32@2x
Possible values: 1 ≤ length ≤ 5000
Safari icon 128x128
Possible values: 1 ≤ length ≤ 5000
Safari icon 128x128@2x
Possible values: 1 ≤ length ≤ 5000
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- Config
Payload describing a custom Domain Email destination configuration.
- Params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- Dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x16.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x162x.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x32.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x322x.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x128.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x1282x.
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x16.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x162x.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x32.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x322x.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x128.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x1282x.
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_16x16.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_16x16_2x.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_32x32.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_32x32_2x.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_128x128.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon_128x128_2x.
The updateDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Whether to collect the failed event in Cloud Object Storage bucket.
Default:
false
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Certificate for APNS.
Possible values: 1 ≤ length ≤ 5000
The content type of certificate. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 16x16.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x16. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 16x16@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon16x162x. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 32x32.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x32. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 32x32@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon32x322x. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 128x128.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x128. Values for this parameter can be obtained from the HttpMediaType class.
Safari icon 128x128@2x.
Possible values: 1 ≤ length ≤ 5000
The content type of icon128x1282x. Values for this parameter can be obtained from the HttpMediaType class.
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Webhook Destination", "description": "This destination is for webhook purpose", "config": { "params": { "url": "https://webhook.site/00a4b674-c0cf-47a5-ab15-dca7e311127e", "verb": "POST", "plugin": "default", "custom_headers": { "authorization": "2c9a0cfb-bfd7-42e5-9274-94c3b9b0ce2f", "k1": "v1" } } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Android Destination", "description": "This destination is for android purpose", "config": { "params": { "sender_id": "1xxxxxxxxx912", "server_key": "38xx2xxxxxxxxxxxxxxxx802", "pre_prod": false } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Android Destination", "description": "This destination is for android purpose", "config": { "params": { "project_id": "1xxxxxxxxx912", "private_key": "38xx2xxxxxxxxxxxxxxxx802", "client_email": "abc@xyz" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: multipart/form-data" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --form 'name="APNS Destination"' --form 'description="This destination is for apns purpose"' --form 'config="{"params": {"is_sandbox": true, "cert_type": "p8", "key_id": "8KVZMP5GUF", "team_id": "TN6YQNGLXP", "bundle_id": "com.ibm.cloud.en.app" }}"' --form 'certificate="<file_path>"'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Chrome Destination", "description": "This destination is for chrome purpose", "config": { "params": { "api_key": "AAxxxxxxxxxxxxxxxxx4z", "website_url": "https://www.xyz.pqr" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Firefox Destination", "description": "This destination is for firefox purpose", "config": { "params": { "website_url": "https://www.xyz.pqr" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: multipart/form-data" "{base_url}/v1/instances/{instance_id}/destinations/{id}"--form 'name="Safari Destination"' --form 'description="This destination is for safari purpose"' --form 'config="{ "params": { "password":"sxxxxxi", "cert_type": "p12", "website_name":"Great Website", "url_format_string":"https://en-agile-gorilla-eu.mybluemix.net/%@/", "website_push_id":"web.net.mybluemix.en-agile-gorilla-eu", "website_url":"https://en-agile-gorilla-eu.mybluemix.net" } }"' --form 'certificate=@/<filepath>/safari.p12' --form 'icon_16x16=@/<filepath>/icon_16x16.png' --form 'icon_16x16@2x=@/<filepath>/icon_16x16@2x.png' --form 'icon_32x32=@/<filepath>/icon_32x32.png' --form 'icon_32x32@2x=@/<filepath>/icon_32x32@2x.png' --form 'icon_128x128=@/<filepath>/icon_128x128.png' --form 'icon_128x128@2x=@/<filepath>/icon_128x128@2x.png'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw ' { "name": "Slack Destination", "description": "This destination is for slack purpose", "config": { "params": { "url": "https://hooks.slack.xxxxxxxxxxxx/00a4b674-c0cf-47a5-ab15-dca7e311127e", "type": "incoming_webhook" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw ' { "name": "Slack Destination", "description": "This destination is for slack purpose", "config": { "params": { "token": "xoxb-xxxxx89970470-7671592175008-KprdjcN1u4XPZv9PCnecxxxx", "type": "direct_message" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "MSTeams Destination", "description": "This destination is for msteams purpose", "config": { "params": { "url": "https://xxxxxxxx.webhook.office.com/webhookb2/xxxxxxxxxxxxxxxxxxxx/IncomingWebhook/55xxxxxxxxx861ab4a/xxxxxxxxx" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "PagerDuty Destination", "description": "This destination is for pagerduty purpose", "config": { "params": { "api_key": "AAxxxxxxxxxxxxxxxxx4z" , "routing_key": "SSxxxxxxxxxxxxxxxxx4z" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "ServiceNow Destination", "description": "This destination is for ServiceNow purpose", "type": "servicenow", "config": { "params": { "client_id": "AAxxxxxxxxxxx4z", "client_secret": "SSxxxxxxxxxxxxxxxxx4z", "username": "SSxxxxxxxxxxxxxxxxx4z", "password": "SSxxxxxxxxxxxxxxxxx4z", "instance_name": "SSxxxxxxxxxxxxxxxxx4z" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "CodeEngine Destination", "description": "This destination is for codeengine purpose", "config": { "params": { "type": "application", "url": "https://codengine.site/00a4b674-c0cf-47a5-ab15-dca7xxxx11127e", "verb": "POST", "plugin": "default", "custom_headers": { "authorization": "2xxxxxxb-bxx7-4xxx-9xxx-94xxxxxxxxxx", "k1": "v1" } } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "CodeEngine Destination", "description": "This destination is for CodeEngine", "type": "ibmce", "config": { "params": { "type": "job", "project_crn": "crn:v1:staging:public:codeengine:us-south:a/e7e5820aeccb40efb78fd69a7858ef23:xxxxxxxxxxxxxx::", "job_name": "custom-job", } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Cloud Object Storage Destination", "description": "This destination is for Cloud Object Storage purpose", "config": { "params": { "bucket_name": "encosbucket", "instance_id": "e8a6b5a3-xxxx-xxxx-xxxx-ea86a4d4axxx", "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Huawei Destination", "description": "This destination is for Huawei purpose", "config": { "params": { "client_id": "AAxxxxxxxxxxx4z", "client_secret": "SSxxxxxxxxxxxxxxxxx4z", "pre_prod": false } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Custom Domain Email Destination", "description": "This destination is for Custom Domain Email purpose", "config": { "params": { "domain": "abc.test.xyz.com" } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}" --data-raw '{ "name": "Custom SMS Destination", "description": "This destination is for Custom SMS purpose" }'
webHookDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfWebhookDestinationConfig{ URL: core.StringPtr("https://cloud.ibm.com/nhwebhook/sendwebhook"), Verb: core.StringPtr("post"), CustomHeaders: map[string]string{ "authorization": "authorization key", }, SensitiveHeaders: []string{"authorization"}, } webHookDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: webHookDestinationConfigParamsModel, } webName := "Admin Webhook Compliance" webDescription := "This destination is for creating admin Webhook to receive compliance notifications" webUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID3), Name: core.StringPtr(webName), Description: core.StringPtr(webDescription), Config: webHookDestinationConfigModel, } destination, response, err := eventNotificationsService.UpdateDestination(webUpdateDestinationOptions)
destinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfFcmDestinationConfig{ ServerKey: core.StringPtr(fcmServerKey), SenderID: core.StringPtr(fcmSenderId), } destinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsModel, } updateDestinationOptions := eventNotificationsService.NewUpdateDestinationOptions( instanceID, destinationID, ) updateDestinationOptions.SetName("Admin FCM Compliance") updateDestinationOptions.SetDescription("This destination is for creating admin FCM to receive compliance notifications") updateDestinationOptions.SetConfig(destinationConfigModel) destination, response, err = eventNotificationsService.UpdateDestination(updateDestinationOptions)
destinationConfigFCMV1ParamsModel := &eventnotificationsv1.DestinationConfigOneOfFcmDestinationConfig{ ProjectID: core.StringPtr(fcmProjectID), PrivateKey: core.StringPtr(fcmPrivateKey), ClientEmail: core.StringPtr(fcmClientEmail), } destinationConfigFCMV1Model := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigFCMV1ParamsModel, } updateFCMV1DestinationOptions := eventNotificationsService.NewUpdateDestinationOptions( instanceID, destinationID12, ) updateFCMV1DestinationOptions.SetName("Admin FCM V1 Compliance") updateFCMV1DestinationOptions.SetDescription("This destination is for creating admin FCM V1 to receive compliance notifications") updateFCMV1DestinationOptions.SetConfig(destinationConfigFCMV1Model) destination, response, err = eventNotificationsService.UpdateDestination(updateFCMV1DestinationOptions)
destinationConfigParamsChromeModel := &eventnotificationsv1.DestinationConfigOneOfChromeDestinationConfig{ APIKey: core.StringPtr("sdslknsdlfnlsejifw900"), WebsiteURL: core.StringPtr("https://cloud.ibm.com"), } chromeDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsChromeModel, } chromeName := "chrome_dest" chromeDescription := "This destination is for chrome" chromeupdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID8), Name: core.StringPtr(chromeName), Description: core.StringPtr(chromeDescription), Config: chromeDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(chromeupdateDestinationOptions)
destinationConfigParamsfireModel := &eventnotificationsv1.DestinationConfigOneOfFirefoxDestinationConfig{ WebsiteURL: core.StringPtr("https://cloud.ibm.com"),} fireDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsfireModel, } fireName := "Firefox_destination" fireDescription := "This destination is for Firefox" fireUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID9), Name: core.StringPtr(fireName), Description: core.StringPtr(fireDescription), Config: fireDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(fireUpdateDestinationOptions)
safaridestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfSafariDestinationConfig{ CertType: core.StringPtr("p12"), Password: core.StringPtr("safari"), URLFormatString: core.StringPtr("https://ensafaripush.mybluemix.net/%@/?flight=%@"), WebsiteName: core.StringPtr("NodeJS Starter Application"), WebsiteURL: core.StringPtr("https://ensafaripush.mybluemix.net"), WebsitePushID: core.StringPtr("web.net.mybluemix.ensafaripush"), } safaridestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: safaridestinationConfigParamsModel, } name := "Safari_dest" description := "This destination is for Safari" safariupdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID5), Name: core.StringPtr(name), Description: core.StringPtr(description), Config: safaridestinationConfigModel, } certificatefile, err := os.Open(safariCertificatePath) if err != nil { panic(err) } safariupdateDestinationOptions.Certificate = certificatefile safaridestination, safariresponse, err := eventNotificationsService.UpdateDestination(safariupdateDestinationOptions)
destinationConfigParamsSlackModel := &eventnotificationsv1.DestinationConfigOneOfSlackDestinationConfig{ URL: core.StringPtr("https://api.slack.com/myslack"), Type: core.StringPtr("incoming_webhook"), } slackDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsSlackModel, } slackName := "slack_destination_update" slackDescription := "This destination is for slack" slackUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID4), Name: core.StringPtr(slackName), Description: core.StringPtr(slackDescription), Config: slackDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(slackUpdateDestinationOptions)
destinationConfigParamsSlackDMModel := &eventnotificationsv1.DestinationConfigOneOfSlackDirectMessageDestinationConfig{ Token: core.StringPtr(slackDMToken), Type: core.StringPtr("direct_message"), } slackDMDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsSlackDMModel, } slackDMName := "slack_DM_destination_update" slackDMDescription := "This destination is for slack DM" slackDMUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID19), Name: core.StringPtr(slackDMName), Description: core.StringPtr(slackDMDescription), Config: slackDMDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(slackDMUpdateDestinationOptions)
destinationConfigParamsMSTeaMSModel := &eventnotificationsv1.DestinationConfigOneOfMsTeamsDestinationConfig{ URL: core.StringPtr("https://teams.microsoft.com"), } msTeamsDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsMSTeaMSModel, } teamsName := "Msteams_dest" teamsDescription := "This destination is for MSTeams" msTeamsupdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID6), Name: core.StringPtr(teamsName), Description: core.StringPtr(teamsDescription), Config: msTeamsDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(msTeamsupdateDestinationOptions)
destinationConfigParamsPDModel := &eventnotificationsv1.DestinationConfigOneOfPagerDutyDestinationConfig{ APIKey: core.StringPtr("insert API Key here"), RoutingKey: core.StringPtr("insert Routing Key here"), } pagerDutyDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsPDModel, } pdName := "Pagerduty_dest_update" pdDescription := "This destination update is for Pagerduty" pagerDutyUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID10), Name: core.StringPtr(pdName), Description: core.StringPtr(pdDescription), Config: pagerDutyDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(pagerDutyUpdateDestinationOptions)
serviceNowDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigParamsServiceNowModel, } serviceNowName := "ServiceNow_dest_update" serviceNowDescription := "This destination update is for ServiceNow" serviceNowUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID11), Name: core.StringPtr(serviceNowName), Description: core.StringPtr(serviceNowDescription), Config: serviceNowDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(serviceNowUpdateDestinationOptions)
destinationConfigCEParamsModel := &eventnotificationsv1.DestinationConfigOneOfCodeEngineDestinationConfig{ URL: core.StringPtr(codeEngineURL), Verb: core.StringPtr("get"), Type: core.StringPtr("application"), CustomHeaders: map[string]string{ "authorization": "authorization key", }, SensitiveHeaders: []string{"authorization"}, } destinationConfigCEModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigCEParamsModel, } ceName := "code engine updated" ceDescription := "This destination is updated for creating code engine notifications" updateCEDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID13), Name: core.StringPtr(ceName), Description: core.StringPtr(ceDescription), Config: destinationConfigCEModel, } destination, response, err = eventNotificationsService.UpdateDestination(updateCEDestinationOptions)
destinationConfigCEJobParamsModel := &eventnotificationsv1.DestinationConfigOneOfCodeEngineDestinationConfig{ ProjectCRN: core.StringPtr(codeEngineProjectCRN), JobName: core.StringPtr("custom-job"), Type: core.StringPtr("job"), } destinationConfigCEJobModel := &eventnotificationsv1.DestinationConfig{ Params: destinationConfigCEJobParamsModel, } ceName = "code engine job updated" ceDescription = "This destination is updated for creating code engine job" updateCEJobDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID18), Name: core.StringPtr(ceName), Description: core.StringPtr(ceDescription), Config: destinationConfigCEJobModel, } ceJobDestination, response, err := eventNotificationsService.UpdateDestination(updateCEJobDestinationOptions)
cosDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfIBMCloudObjectStorageDestinationConfig{ BucketName: core.StringPtr("encosbucket"), InstanceID: core.StringPtr("e8a6b5a3-xxxx-xxxx-ad88-ea86a4d4a3b6"), Endpoint: core.StringPtr("https://s3.us-west.cloud-object-storage.test.appdomain.cloud"), } cosDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: cosDestinationConfigParamsModel, } cosName := "cos_destination update" cosDescription := "cos Destination updated" cosUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(cosName), ID: core.StringPtr(destinationID14), Description: core.StringPtr(cosDescription), Config: cosDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(cosUpdateDestinationOptions)
huaweiDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfHuaweiDestinationConfig{ ClientID: core.StringPtr(huaweiClientID), ClientSecret: core.StringPtr(huaweiClientSecret), PreProd: core.BoolPtr(false), } huaweiDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: huaweiDestinationConfigParamsModel, } huaweiName := "huawei_destination update" huaweiDescription := "huawei Destination updated" huaweiUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(huaweiName), ID: core.StringPtr(destinationID15), Description: core.StringPtr(huaweiDescription), Config: huaweiDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(huaweiUpdateDestinationOptions)
customDestinationConfigParamsModel := &eventnotificationsv1.DestinationConfigOneOfCustomDomainEmailDestinationConfig{ Domain: core.StringPtr("abc.event-notifications.test.cloud.ibm.com"), } customDestinationConfigModel := &eventnotificationsv1.DestinationConfig{ Params: customDestinationConfigParamsModel, } customName := "custom_email_destination update" customDescription := "custom email Destination updated" customUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(customName), ID: core.StringPtr(destinationID16), Description: core.StringPtr(customDescription), Config: customDestinationConfigModel, } destination, response, err = eventNotificationsService.UpdateDestination(customUpdateDestinationOptions)
customSMSName := "custom_sms_destination update" customSMSDescription := "custom sms Destination updated" customSMSUpdateDestinationOptions := &eventnotificationsv1.UpdateDestinationOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(customSMSName), ID: core.StringPtr(destinationID17), Description: core.StringPtr(customSMSDescription), CollectFailedEvents: core.BoolPtr(false), } customSMSDestination, response, err := eventNotificationsService.UpdateDestination(customSMSUpdateDestinationOptions)
const webDestinationConfigParamsModel = { url: 'https://cloud.ibm.com/nhwebhook/sendwebhook', verb: 'post', custom_headers: { authorization: 'xxx-tye67-yyy' }, sensitive_headers: ['authorization'], }; const webDestinationConfigModel = { params: webDestinationConfigParamsModel, }; let name = 'Admin Webhook Compliance'; let description = 'This destination is for creating admin webhook to receive compliance notifications'; params = { instanceId, id: destinationId3, name, description, config: webDestinationConfigModel, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigParamsModel = { server_key: fcmServerKey, sender_id: fcmSenderId, }; const destinationConfigModel = { params: destinationConfigParamsModel, }; let params = { instanceId, id: destinationId, name: 'Admin FCM Compliance', description: 'This destination is for creating admin FCM to receive compliance notifications', config: destinationConfigModel, }; res = await eventNotificationsService.updateDestination(params);
destinationConfigParamsModel = { private_key: fcmPrivateKey, project_id: fcmProjectId, client_email: fcmClientEmail, }; destinationConfigModel = { params: destinationConfigParamsModel, }; params = { instanceId, id: destinationId12, name: 'Admin FCM V1 Compliance', description: 'This destination is for creating admin FCM V1 to receive compliance notifications', config: destinationConfigModel, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelChrome = { params: { website_url: 'https://cloud.ibm.com', api_key: 'efwewerwerkwer89werj', }, }; name = 'Chrome_destination_update'; description = 'Chrome Destination update'; params = { instanceId, id: destinationId8, name, description, config: destinationConfigModelChrome, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelFirefox = { params: { website_url: 'https://cloud.ibm.com', }, }; name = 'Firefox_destination'; description = 'Firefox Destination'; params = { instanceId, id: destinationId9, name, description, config: destinationConfigModelFirefox, }; res = await eventNotificationsService.updateDestination(params);
const safariDestinationConfigModel = { params: { cert_type: 'p12', password: 'safari', website_url: 'https://ensafaripush.mybluemix.net', website_name: 'NodeJS Starter Application', url_format_string: 'https://ensafaripush.mybluemix.net/%@/?flight=%@', website_push_id: 'web.net.mybluemix.ensafaripush', }, }; description = 'This Destination is for safari'; let readStream = ''; try { readStream = fs.createReadStream(safariCertificatePath); console.log(readStream); } catch (err) { console.error(err); } params = { instanceId, id: destinationId5, name: 'safari_Dest', description, config: safariDestinationConfigModel, certificate: readStream, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelSlack = { params: { url: 'https://api.slack.com/myslack', type: 'incoming_webhook', }, }; name = 'slack_destination_update'; description = 'Slack Destination update'; params = { instanceId, id: destinationId4, name, description, config: destinationConfigModelSlack, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelSlackDM = { params: { token: slackDmToken, type: 'direct_message', }, }; name = 'slack_DM_destination_update'; description = 'Slack DM Destination update'; params = { instanceId, id: destinationId19, name, description, config: destinationConfigModelSlackDM, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelMSTeams = { params: { url: 'https://teams.microsoft.com', }, }; name = 'MSTeams_destination_update'; description = 'MSTeams Destination_updated'; params = { instanceId, id: destinationId6, name, description, config: destinationConfigModelMSTeams, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelPagerDuty = { params: { api_key: 'insert API Key here', routing_key: 'insert Routing Key here', }, }; name = 'Pager_Duty_destination'; description = 'PagerDuty Destination'; params = { instanceId, id: destinationId10, name, description, config: destinationConfigModelPagerDuty, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelServiceNow = { params: { client_id: sNowClientId, client_secret: sNowClientSecret, username: sNowUserName, password: sNowPassword, instance_name: sNowInstanceName, }, }; name = 'ServiceNow_destination'; description = 'Service Now Destination'; params = { instanceId, id: destinationId11, name, description, config: destinationConfigModelServiceNow, }; res = await eventNotificationsService.updateDestination(params);
const destinationCEConfigParamsModel = { url: codeEngineURL, verb: 'post', type: 'application', custom_headers: { authorization: 'xxx-tye67-yyy' }, sensitive_headers: ['authorization'], }; const destinationCEConfigModel = { params: destinationConfigParamsModel, }; name = 'code engine updated'; description = 'This destination is for code engine notifications'; params = { instanceId, id: destinationId13, name, description, config: destinationCEConfigModel, }; res = await eventNotificationsService.updateDestination(params);
const destinationCEJobConfigParamsModel = { type: 'job', project_crn: codeEngineProjectCRN, job_name: 'custom-job', }; const destinationCEJobConfigModel = { params: destinationCEJobConfigParamsModel, }; name = 'code engine job updated'; description = 'This destination is for code engine job notifications'; params = { instanceId, id: destinationId18, name, description, config: destinationCEJobConfigModel, }; res = await eventNotificationsService.updateDestination(params);
const destinationConfigModelCOS = { params: { bucket_name: 'encosbucket', instance_id: 'e8a6b5a3-xxxx-xxxx-ad88-ea86a4d4a3b6', endpoint: 'https://s3.us-west.cloud-object-storage.test.appdomain.cloud' }, }; name = 'COS_destination_update'; description = 'COS Destination_update'; params = { instanceId, id: destinationId14, name, description, config: destinationConfigModelCOS, }; res = await eventNotificationsService.updateDestination(params);
const huaweiDestinationConfigModel = { params: { client_id: huaweiClientId, client_secret: huaweiClientSecret, pre_prod: false, }, }; name = 'Huawei_destination_update'; description = 'Huawei Destination_update'; params = { instanceId, id: destinationId15, name, description, config: huaweiDestinationConfigModel, }; res = await eventNotificationsService.updateDestination(params);
const customDestinationConfigModel = { params: { domain: 'abc.event-notifications.test.cloud.ibm.com', }, }; name = 'custom_email_destination_update'; description = 'custom email Destination_update'; params = { instanceId, id: destinationId16, name, description, config: customDestinationConfigModel, }; res = await eventNotificationsService.updateDestination(params);
name = 'custom_sms_destination_update'; description = 'custom sms Destination_update'; params = { instanceId, id: destinationId17, name, description, }; res = await eventNotificationsService.updateDestination(params);
DestinationConfigOneOfWebhookDestinationConfig destinationConfigParamsModel = new DestinationConfigOneOfWebhookDestinationConfig.Builder() .url("https://cloud.ibm.com/nhwebhook/sendwebhook") .verb("get") .customHeaders(new java.util.HashMap<String, String>() { { put("authorization", "testString"); } }) .sensitiveHeaders(new java.util.ArrayList<String>(java.util.Arrays.asList("authorization"))) .build(); DestinationConfig destinationConfigModel = new DestinationConfig.Builder() .params(destinationConfigParamsModel) .build(); String webName = "Admin GCM Compliance"; String webDescription = "This destination is for creating admin GCM webhook to receive compliance notifications"; UpdateDestinationOptions updateWebhookDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId3) .name(webName) .description(webDescription) .config(destinationConfigModel) .certificate(new FileInputStream(new File("/path"))) .certificateContentType("testString") .build(); // Invoke operation Response<Destination> webhookResponse = eventNotificationsService.updateDestination(updateWebhookDestinationOptions).execute(); Destination webhookDestinationResult = webhookResponse.getResult();
DestinationConfigOneOfFCMDestinationConfig fcmConfig = new DestinationConfigOneOfFCMDestinationConfig.Builder() .senderId(fcmSenderId) .serverKey(fcmServerKey) .build(); DestinationConfig destinationFcmConfigModel = new DestinationConfig.Builder() .params(fcmConfig) .build(); String fcmName = "FCM_Admin Compliance"; String fcmDescription = "This is a Destination for FCM compliance"; UpdateDestinationOptions updateDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId) .name(fcmName) .description(fcmDescription) .config(destinationFcmConfigModel) .build(); Response<Destination> response = eventNotificationsService.updateDestination(updateDestinationOptions).execute(); Destination destination = response.getResult();
UpdateDestinationOptions updateServiceNowDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId11) .name(serviceNowName) .description(serviceNowDescription) .config(serviceNowDestinationConfigModel) .build(); Response<Destination> sNowResponse = eventNotificationsService.updateDestination(updateServiceNowDestinationOptions).execute(); Destination sNowDestinationResult = sNowResponse.getResult(); System.out.println(sNowDestinationResult); DestinationConfigOneOfFCMDestinationConfig fcmV1Config = new DestinationConfigOneOfFCMDestinationConfig.Builder() .clientEmail(fcmClientEmail) .privateKey(fcmPrivateKey) .projectId(fcmProjectID) .build(); DestinationConfig destinationFcmV1ConfigModel = new DestinationConfig.Builder() .params(fcmV1Config) .build(); String fcmV1Name = "FCM destination v1"; String fcmV1Description = "This is a Destination for FCM V1"; UpdateDestinationOptions updateV1DestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId12) .name(fcmV1Name) .description(fcmV1Description) .config(destinationFcmV1ConfigModel) .build(); Response<Destination> fcmV1Response = eventNotificationsService.updateDestination(updateV1DestinationOptions).execute();; Destination fcmV1destination = fcmV1Response.getResult();
DestinationConfigOneOfChromeDestinationConfig chromeDestinationConfig = new DestinationConfigOneOfChromeDestinationConfig.Builder() .websiteUrl("https://cloud.ibm.com") .apiKey("aksndkasdnkasd") .build(); DestinationConfig destinationChromeConfigModel = new DestinationConfig.Builder() .params(chromeDestinationConfig) .build(); String chromeName = "Chrome_destination_updated"; String chromeDescription = "Google Chrome Destination updated"; UpdateDestinationOptions updateChromeDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId8) .name(chromeName) .description(chromeDescription) .config(destinationChromeConfigModel) .build(); Response<Destination> chromeResponse = eventNotificationsService.updateDestination(updateChromeDestinationOptions).execute(); Destination chromeDestinationResult = chromeResponse.getResult();
DestinationConfigOneOfFirefoxDestinationConfig firefoxDestinationConfig = new DestinationConfigOneOfFirefoxDestinationConfig.Builder() .websiteUrl("https://cloud.ibm.com") .build(); DestinationConfig destinationFirefoxConfigModel = new DestinationConfig.Builder() .params(firefoxDestinationConfig) .build(); String firefoxName = "Firefox_destination_update"; String firefoxDescription = "Firefox Destination updated"; UpdateDestinationOptions updateFireFoxDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId9) .name(firefoxName) .description(firefoxDescription) .config(destinationFirefoxConfigModel) .build(); Response<Destination> fireFoxResponse = eventNotificationsService.updateDestination(updateFireFoxDestinationOptions).execute();; Destination firefoxDestinationResult = fireFoxResponse.getResult();
DestinationConfigOneOfSafariDestinationConfig destinationConfig = new DestinationConfigOneOfSafariDestinationConfig.Builder() .certType("p12") .password("safari") .urlFormatString("https://ensafaripush.mybluemix.net/%@/?flight=%@") .websitePushId("web.net.mybluemix.ensafaripush") .websiteUrl("https://ensafaripush.mybluemix.net") .websiteName("NodeJS Starter Application") .build(); DestinationConfig destinationsafariConfigModel = new DestinationConfig.Builder() .params(destinationConfig) .build(); String name = "Safari_dest"; String description = "This destination is for Safari"; File file = new File(safariCertificatePath); InputStream stream = new FileInputStream(file); UpdateDestinationOptions updateSafariDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId5) .name(name) .description(description) .config(destinationsafariConfigModel) .certificate(stream) .certificateContentType("testString") .build(); // Invoke operation Response<Destination> safariResponse = eventNotificationsService.updateDestination(updateSafariDestinationOptions).execute(); Destination safariDestination = safariResponse.getResult();
DestinationConfigOneOfSlackDestinationConfig slackDestinationConfig= new DestinationConfigOneOfSlackDestinationConfig.Builder() .url("https://api.slack.com/myslack") .type("incoming_webhook") .build(); DestinationConfig destinationSlackConfigModel = new DestinationConfig.Builder() .params(slackDestinationConfig) .build(); String slackName = "Slack_destination"; String slackDescription = "Slack Destination"; UpdateDestinationOptions updateSlackDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId4) .name(slackName) .description(slackDescription) .config(destinationSlackConfigModel) .build(); // Invoke operation Response<Destination> slackResponse = eventNotificationsService.updateDestination(updateSlackDestinationOptions).execute(); Destination slackDestinationResponseResult = slackResponse.getResult();
DestinationConfigOneOfSlackDirectMessageDestinationConfig slackDMDestinationConfig = new DestinationConfigOneOfSlackDirectMessageDestinationConfig.Builder() .token(slackDMToken) .type("direct_message") .build(); DestinationConfig destinationSlackDMConfigModel = new DestinationConfig.Builder() .params(slackDMDestinationConfig) .build(); String slackDMName = "Slack_DM_destination"; String slackDMDescription = "Slack DM Destination"; UpdateDestinationOptions updateSlackDMDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId19) .name(slackDMName) .description(slackDMDescription) .config(destinationSlackDMConfigModel) .build(); Response<Destination> slackDMResponse = eventNotificationsService.updateDestination(updateSlackDMDestinationOptions).execute(); Destination slackDMDestinationResponseResult = slackDMResponse.getResult();
DestinationConfigOneOfMSTeamsDestinationConfig msTeamsDestinationConfig= new DestinationConfigOneOfMSTeamsDestinationConfig.Builder() .url("https://teams.microsoft.com") .build(); DestinationConfig destinationMsTeamsConfigModel = new DestinationConfig.Builder() .params(msTeamsDestinationConfig) .build(); String msTeamsName = "MSTeams_destination_update"; String msTeamsDescription = "MSTeams Destination update"; UpdateDestinationOptions updateMsTeamsDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId6) .name(msTeamsName) .description(msTeamsDescription) .config(destinationMsTeamsConfigModel) .build(); // Invoke operation Response<Destination> teamsResponse = eventNotificationsService.updateDestination(updateMsTeamsDestinationOptions).execute(); Destination msTeamsDestinationResponseResult = teamsResponse.getResult();
DestinationConfigOneOfPagerDutyDestinationConfig pagerDutyDestinationConfig = new DestinationConfigOneOfPagerDutyDestinationConfig.Builder() .apiKey("insert apiKey here") .routingKey("insert routing key here") .build(); DestinationConfig destinationPagerDutyConfigModel = new DestinationConfig.Builder() .params(pagerDutyDestinationConfig) .build(); String pdName = "Pager_Duty_destination_update"; String pdDescription = "PagerDuty Destination updated"; UpdateDestinationOptions updatePDDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId10) .name(pdName) .description(pdDescription) .config(destinationPagerDutyConfigModel) .build(); Response<Destination> pdResponse = eventNotificationsService.updateDestination(updatePDDestinationOptions).execute(); Destination pdDestinationResult = pdResponse.getResult();
DestinationConfigOneOfServiceNowDestinationConfig serviceNowDestinationConfig = new DestinationConfigOneOfServiceNowDestinationConfig.Builder() .clientId(sNowClientId) .clientSecret(sNowClientSecret) .username(sNowUserName) .password(sNowPassword) .instanceName(sNowInstanceName) .build(); DestinationConfig serviceNowDestinationConfigModel = new DestinationConfig.Builder() .params(serviceNowDestinationConfig) .build(); String serviceNowName = "servicenow_destination_update"; String serviceNowDescription = "update ServiceNow Destination"; UpdateDestinationOptions updateServiceNowDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId11) .name(serviceNowName) .description(serviceNowDescription) .config(serviceNowDestinationConfigModel) .build(); Response<Destination> sNowResponse = eventNotificationsService.updateDestination(updateServiceNowDestinationOptions).execute(); Destination sNowDestinationResult = sNowResponse.getResult();
DestinationConfigOneOfCodeEngineDestinationConfig destinationConfigCEParamsModel = new DestinationConfigOneOfCodeEngineDestinationConfig.Builder() .url(codeEngineURL) .verb("get") .type("application") .customHeaders(new java.util.HashMap<String, String>() { { put("authorization1", "testString"); } }) .sensitiveHeaders(new java.util.ArrayList<String>(java.util.Arrays.asList("authorization1"))) .build(); DestinationConfig destinationCEConfigModel = new DestinationConfig.Builder() .params(destinationConfigCEParamsModel) .build(); String ceName = "code engine update"; String ceDescription = "This destination is for code engine to receive notifications"; UpdateDestinationOptions updateCEDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId13) .name(ceName) .description(ceDescription) .config(destinationCEConfigModel) .build(); // Invoke operation Response<Destination> ceResponse = eventNotificationsService.updateDestination(updateCEDestinationOptions).execute(); Destination ceDestinationResult = ceResponse.getResult();
DestinationConfigOneOfCodeEngineDestinationConfig destinationConfigCEJobParamsModel = new DestinationConfigOneOfCodeEngineDestinationConfig.Builder() .type("job") .projectCrn(codeEngineProjectCRN) .jobName("custom-job") .build(); DestinationConfig destinationCEJobConfigModel = new DestinationConfig.Builder() .params(destinationConfigCEJobParamsModel) .build(); ceName = "code engine job update"; ceDescription = "This destination is for code engine job to receive notifications"; UpdateDestinationOptions updateCEJobDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId18) .name(ceName) .description(ceDescription) .config(destinationCEJobConfigModel) .build(); // Invoke operation Response<Destination> ceJobResponse = eventNotificationsService.updateDestination(updateCEJobDestinationOptions).execute(); Destination destinationCEJobResult = ceJobResponse.getResult();
DestinationConfigOneOfIBMCloudObjectStorageDestinationConfig destinationCOSConfigParamsModel = new DestinationConfigOneOfIBMCloudObjectStorageDestinationConfig.Builder() .bucketName("encosbucket") .instanceId("e8a6b5a3-xxxx-xxxx-xxxx-ea86a4d4axxx") .endpoint("https://s3.us-west.cloud-object-storage.test.appdomain.cloud") .build(); DestinationConfig destinationCOSConfigModel = new DestinationConfig.Builder() .params(destinationCOSConfigParamsModel) .build(); String cosName = "Cloud Object Storage update"; String cosDescription = "Cloud Object Storage Destination updated"; UpdateDestinationOptions updateCOSDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId14) .name(cosName) .description(cosDescription) .config(destinationCOSConfigModel) .build(); // Invoke operation Response<Destination> cosResponse = eventNotificationsService.updateDestination(updateCOSDestinationOptions).execute(); Destination cosDestinationResult = cosResponse.getResult();
DestinationConfigOneOfHuaweiDestinationConfig destinationHuaweiConfigParamsModel = new DestinationConfigOneOfHuaweiDestinationConfig.Builder() .clientId(huaweiClientId) .clientSecret(huaweiClientSecret) .preProd(false) .build(); DestinationConfig destinationHuaweiConfigModel = new DestinationConfig.Builder() .params(destinationHuaweiConfigParamsModel) .build(); String huaweiName = "Huawei update"; String huaweiDescription = "Huawei Destination updated"; UpdateDestinationOptions updateHuaweiDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId15) .name(huaweiName) .description(huaweiDescription) .config(destinationHuaweiConfigModel) .build(); // Invoke operation Response<Destination> huaweiResponse = eventNotificationsService.updateDestination(updateHuaweiDestinationOptions).execute(); Destination huaweiDestinationResult = huaweiResponse.getResult();
DestinationConfigOneOfCustomDomainEmailDestinationConfig destinationCustomConfigParamsModel = new DestinationConfigOneOfCustomDomainEmailDestinationConfig.Builder() .domain("apprapp.test.cloud.ibm.com") .build(); DestinationConfig destinationCustomConfigModel = new DestinationConfig.Builder() .params(destinationCustomConfigParamsModel) .build(); String customName = "Custom email update"; String customDescription = "Custom Email Destination updated"; UpdateDestinationOptions updateCustomDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId16) .name(customName) .description(customDescription) .config(destinationCustomConfigModel) .build(); // Invoke operation Response<Destination> customResponse = eventNotificationsService.updateDestination(updateCustomDestinationOptions).execute(); Destination destinationCustomResult = customResponse.getResult();
String customSMSName = "Custom SMS update"; String customSMSDescription = "Custom SMS Destination update"; UpdateDestinationOptions updateCustomSMSDestinationOptions = new UpdateDestinationOptions.Builder() .instanceId(instanceId) .name(customSMSName) .id(destinationId17) .collectFailedEvents(false) .description(customSMSDescription) .build(); Response<Destination> customSMSResponse = eventNotificationsService.updateDestination(updateCustomSMSDestinationOptions).execute(); Destination destinationCustomSMSResponseResult = customSMSResponse.getResult();
destination_config_params_model = { 'url': 'https://cloud.ibm.com/nhwebhook/sendwebhook', 'verb': 'post', 'custom_headers': {'authorization': 'authorization token'}, 'sensitive_headers': ['authorization'], } # Construct a dict representation of a DestinationConfig model destination_config_model = { 'params': destination_config_params_model, } name = "Admin GCM Compliance" description = "This destination is for creating admin GCM webhook to receive compliance notifications" destination = event_notifications_service.update_destination( instance_id, id=destination_id3, name=name, description=description, config=destination_config_model ).get_result()
destination_config_params_model = { "server_key": fcmServerKey, "sender_id": fcmSenderId } destination_config_model = { 'params': destination_config_params_model, } name = "Admin FCM Compliance" description = "This destination is for creating admin FCM to receive compliance notifications" destination = event_notifications_service.update_destination( instance_id, id=destination_id, name=name, description=description, config=destination_config_model ).get_result()
destination_config_params_model = { "project_id": fcm_project_id, "private_key": fcm_private_key, "client_email": fcm_client_email } destination_config_model = { 'params': destination_config_params_model, } name = "Admin FCM Compliance" description = "This destination is for creating admin FCM to receive compliance notifications" destination = event_notifications_service.update_destination( instance_id, id=destination_id12, name=name, description=description, config=destination_config_model ).get_result()
chrome_config_params = { "website_url": "https://www.ibmcfendpoint.com/", "api_key": "wedleknlwenwern9832jhde", } destination_config_model = { 'params': chrome_config_params, } name = "Chrome_destination_update" description = "This is a Chrome Destination update" destination = event_notifications_service.update_destination( instance_id, id=destination_id8, name=name, description=description, config=destination_config_model ).get_result()
fire_config_params = { "website_url": "https://cloud.ibm.com", } destination_config_model = { 'params': fire_config_params, } name = "Firefox_destination_update" description = "This is a Firefox Destination update" destination = event_notifications_service.update_destination( instance_id, id=destination_id9, name=name, description=description, config=destination_config_model ).get_result()
safari_destination_config_params_model = { 'cert_type': 'p12', 'password': 'safari', 'website_url': 'https://ensafaripush.mybluemix.net', 'website_name': 'NodeJS Starter Application', 'url_format_string': 'https://ensafaripush.mybluemix.net/%@/?flight=%@', 'website_push_id': 'web.net.mybluemix.ensafaripush', } # Construct a dict representation of a DestinationConfig model safari_destination_config_model = { 'params': safari_destination_config_params_model, } certificatefile = open(safariCertificatePath, 'rb') name = "Safari Dest" description = "This destination is for Safari" update_destination_response = event_notifications_service.update_destination( instance_id, id=destination_id5, name=name, description=description, config=safari_destination_config_model, certificate=certificatefile ).get_result()
slack_config_params = { 'url': 'https://api.slack.com/myslack', 'type': 'incoming_webhook', } destination_config_model = { 'params': slack_config_params, } name = "Slack_destination_update" description = "Slack Destination update" destination = event_notifications_service.update_destination( instance_id, id=destination_id4, name=name, description=description, config=destination_config_model ).get_result()
slack_config_params = {"token": slack_dm_token, "type": "direct_message"} destination_config_model = { "params": slack_config_params, } name = "Slack_DM_destination_update" description = "Slack DM Destination update" update_destination_response = self.event_notifications_service.update_destination( instance_id, id=destination_id19, name=name, description=description, config=destination_config_model, ).get_result()
msteams_config_params = { 'url': 'https://teams.microsoft.com', } destination_config_model = { 'params': msteams_config_params, } name = "MSTeams_destination_update" description = "MSteams Destination update" destination = event_notifications_service.update_destination( instance_id, id=destination_id6, name=name, description=description, config=destination_config_model ).get_result()
pd_config_params = { "api_key": "insert API Key here", "routing_key": "insert Routing Key here" } destination_config_model = { 'params': pd_config_params, } name = "PagerDuty_destination_update" description = "This is a PagerDuty Destination update" destination = event_notifications_service.update_destination( instance_id, id=destination_id10, name=name, description=description, config=destination_config_model ).get_result()
snow_config_params = { "client_id": snow_client_id, "client_secret": snow_client_secret, "username": snow_user_name, "password": snow_password, "instance_name": snow_password } destination_config_model = { 'params': snow_config_params, } name = "Service_Now_destination_update" description = "This is a ServiceNow Destination update" destination = self.event_notifications_service.update_destination( instance_id, id=destination_id11, name=name, description=description, config=destination_config_model ).get_result()
destination_config_params_model = { "url": code_engine_URL, "verb": "post", "type": "application", "custom_headers": {"authorization": "authorization token"}, "sensitive_headers": ["authorization"], } # Construct a dict representation of a DestinationConfig model destination_config_model = { 'params': destination_config_params_model, } name = "code engine updated" description = "This destination is updated for code engine notifications" destination = self.event_notifications_service.update_destination( instance_id, id=destination_id13, name=name, description=description, config=destination_config_model ).get_result()
destination_config_params_model = { "type": "job", "project_crn": code_engine_project_CRN, "job_name": "custom-job", } # Construct a dict representation of a DestinationConfig model destination_config_model = { "params": destination_config_params_model, } name = "code engine job updated" description = "This destination is updated for code engine job notifications" update_destination_response = self.event_notifications_service.update_destination( instance_id, id=destination_id18, name=name, description=description, config=destination_config_model, ).get_result()
destination_config_model = { 'params': { 'bucket_name': 'encosbucket', 'instance_id': 'e8a6b5a3-3ff4-xxxx-xxxx-ea86a4d4a3b6', 'endpoint': 'https://s3.us-west.cloud-object-storage.test.appdomain.cloud' } } name = "COS_destination_update" description = "COS Destination update" destination = self.event_notifications_service.update_destination( instance_id, id=destination_id14, name=name, description=description, config=destination_config_model ).get_result()
destination_config_model = { 'params': { 'client_id': huawei_client_id, 'client_secret': huawei_client_secret, 'pre_prod': False, } } name = "Huawei_destination_update" description = "Huawei Destination update" update_destination_response = self.event_notifications_service.update_destination( instance_id, id=destination_id15, name=name, description=description, config=destination_config_model ).get_result()
destination_config_model = { 'params': { 'domain': 'abc.event-notifications.test.cloud.ibm.com' } } name = "Custom_Email_destination_update" description = "Custom Email Destination update" destination = self.event_notifications_service.update_destination( instance_id, id=destination_id16, name=name, description=description, config=destination_config_model ).get_result()
name = "Custom_SMS_destination_update" description = "Custom SMS Destination update" destination = self.event_notifications_service.update_destination( instance_id, id=destination_id17, name=name, description=description, ).get_result()
Response
Payload describing a destination get request
Destination ID
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Last updated time
Number of subscriptions
Possible values: value ≥ 0
List of subscriptions
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Whether to collect the failed event in Cloud Object Storage bucket
Payload describing a destination configuration
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- Config
Payload describing a custom Domain Email destination configuration.
- Params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- Dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Payload describing a destination get request.
{
"config": {
"params": {
"custom_headers": {
"authorization": "xyz"
},
"sensitive_headers": [
"authorization"
],
"url": "https://cloud.ibm.com/nhwebhook/sendwebhook",
"verb": "post"
}
},
"description": "This destination is for creating admin webhook to receive compliance related notifications",
"id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"name": "Admin Webhook Compliance",
"type": "webhook",
"subscription_count": 2,
"subscription_names": [
"Webhook Sub for new change"
],
"updated_at": "2021-08-17T14:06:53.078389Z"
}
Destination ID.
Possible values: 36 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination type Email/SMS/Webhook/FCM/Slack/MSTeams/PagerDuty/IBMCodeEngine/ServiceNow/IBMCloudObjectStorage/Huawei.
Possible values: [
webhook
,smtp_ibm
,sms_ibm
,push_android
,push_ios
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: 1 ≤ length ≤ 50
Whether to collect the failed event in Cloud Object Storage bucket.
Payload describing a destination configuration.
Examples:{ "params": { "url": "https://1ea472c0.us-south.apigw.appdomain.cloud/nhwebhook/sendwebhook", "verb": "post", "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ] } }
- config
Payload describing a custom Domain Email destination configuration.
- params
Email Domain.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
The DKIM attributes.
- dkim
dkim public key.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim selector.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
dkim verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Last updated time.
Number of subscriptions.
Possible values: value ≥ 0
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100, length ≥ 1, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Status Code
Destination information
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate destination
Request body type is not application/json
Internal server error
Unexpected Error
{ "config": { "params": { "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ], "url": "https://cloud.ibm.com/nhwebhook/sendwebhook", "verb": "post" } }, "description": "This destination is for creating admin webhook to receive compliance related notifications", "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Admin Webhook Compliance", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-08-17T14:06:53.078389Z" }
{ "config": { "params": { "custom_headers": { "authorization": "xyz" }, "sensitive_headers": [ "authorization" ], "url": "https://cloud.ibm.com/nhwebhook/sendwebhook", "verb": "post" } }, "description": "This destination is for creating admin webhook to receive compliance related notifications", "id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "name": "Admin Webhook Compliance", "type": "webhook", "subscription_count": 2, "subscription_names": [ "Webhook Sub for new change" ], "updated_at": "2021-08-17T14:06:53.078389Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "55372994-3e42-4129-9c7b-aa2aa0820c53", "status_code": 409, "errors": [ { "code": "destination_conflict", "message": "Duplicate destination name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "55372994-3e42-4129-9c7b-aa2aa0820c53", "status_code": 409, "errors": [ { "code": "destination_conflict", "message": "Duplicate destination name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a Destination
Delete a Destination
Delete a Destination.
Delete a Destination.
Delete a Destination.
Delete a Destination.
DELETE /v1/instances/{instance_id}/destinations/{id}
(eventNotifications *EventNotificationsV1) DeleteDestination(deleteDestinationOptions *DeleteDestinationOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteDestinationWithContext(ctx context.Context, deleteDestinationOptions *DeleteDestinationOptions) (response *core.DetailedResponse, err error)
deleteDestination(params)
delete_destination(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteDestination(DeleteDestinationOptions deleteDestinationOptions)
Request
Instantiate the DeleteDestinationOptions
struct and set the fields to provide parameter values for the DeleteDestination
method.
Use the DeleteDestinationOptions.Builder
to create a DeleteDestinationOptions
object that contains the parameter values for the deleteDestination
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The deleteDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
curl -X DELETE --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/destinations/{id}"
deleteDestinationOptions := eventNotificationsService.NewDeleteDestinationOptions( instanceID, destinationID, ) response, err := eventNotificationsService.DeleteDestination(deleteDestinationOptions) if err != nil { panic(err) }
let params = { instanceId, id: destinationId, }; try { await eventNotificationsService.deleteDestination(params); } catch (err) { console.warn(err); }
DeleteDestinationOptions deleteDestinationOptions = new DeleteDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId) .build(); Response<Void> response = eventNotificationsService.deleteDestination(deleteDestinationOptions).execute();
response = event_notifications_service.delete_destination( instance_id, id=destination_id )
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get enabled country details of SMS destination
Get enabled country details of SMS destination
Get enabled country details of SMS destination.
Get enabled country details of SMS destination.
Get enabled country details of SMS destination.
Get enabled country details of SMS destination.
GET /v1/instances/{instance_id}/destinations/{id}/enabled_countries
(eventNotifications *EventNotificationsV1) GetEnabledCountries(getEnabledCountriesOptions *GetEnabledCountriesOptions) (result *EnabledCountriesResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetEnabledCountriesWithContext(ctx context.Context, getEnabledCountriesOptions *GetEnabledCountriesOptions) (result *EnabledCountriesResponse, response *core.DetailedResponse, err error)
getEnabledCountries(params)
get_enabled_countries(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<EnabledCountriesResponse> getEnabledCountries(GetEnabledCountriesOptions getEnabledCountriesOptions)
Request
Instantiate the GetEnabledCountriesOptions
struct and set the fields to provide parameter values for the GetEnabledCountries
method.
Use the GetEnabledCountriesOptions.Builder
to create a GetEnabledCountriesOptions
object that contains the parameter values for the getEnabledCountries
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetEnabledCountries options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The getEnabledCountries options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/destinations/{destination_id}/enabled_countries' --header 'Authorization: Bearer {TOKEN}'
getEnabledCountriesOptions := &eventnotificationsv1.GetEnabledCountriesOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID17), } enabledCountries, response, err := eventNotificationsService.GetEnabledCountries(getEnabledCountriesOptions)
const params = { instanceId, id: destinationId7, }; let res; try { res = await eventNotificationsService.getEnabledCountries(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetEnabledCountriesOptions getEnabledCountriesOptions = new GetEnabledCountriesOptions.Builder() .instanceId(instanceId) .id(destinationId17) .build(); // Invoke operation Response<EnabledCountriesResponse> response = eventNotificationsService.getEnabledCountries(getEnabledCountriesOptions).execute(); EnabledCountriesResponse enabledCountriesResult = response.getResult(); System.out.println(enabledCountriesResult);
try: get_enabled_countries_response = self.event_notifications_service.get_enabled_countries( instance_id, id=destination_id17 ) enabled_countries_response = get_enabled_countries_response.get_result() print(json.dumps(enabled_countries_response, indent=2)) except ApiException as e: pytest.fail(str(e))
Response
Payload describing a custom SMS Configuration
The SMS destination status
Possible values: length ≥ 1, Value must match regular expression
^(UNINITIALISED|INITIALISED|DISABLED)$
List enabled countries
Possible values: 0 ≤ number of items ≤ 100
Payload describing a custom SMS Configuration.
{
"status": "UNINITIALISED",
"enabled_countries": [
{
"country": [
"USA",
"CH"
],
"number": "60454"
}
]
}
The SMS destination status.
Possible values: length ≥ 1, Value must match regular expression
/^(UNINITIALISED|INITIALISED|DISABLED)$/
List enabled countries.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "number": "60454", "country": [ "USA", "CH" ] }
- EnabledCountries
Phone number.
Possible values: length ≥ 0, Value must match regular expression
/.*/
List of Countries.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 15, Value must match regular expression
/[A-Z]/
Payload describing a custom SMS Configuration.
{
"status": "UNINITIALISED",
"enabled_countries": [
{
"country": [
"USA",
"CH"
],
"number": "60454"
}
]
}
The SMS destination status.
Possible values: length ≥ 1, Value must match regular expression
/^(UNINITIALISED|INITIALISED|DISABLED)$/
List enabled countries.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "number": "60454", "country": [ "USA", "CH" ] }
- enabled_countries
Phone number.
Possible values: length ≥ 0, Value must match regular expression
/.*/
List of Countries.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 15, Value must match regular expression
/[A-Z]/
Payload describing a custom SMS Configuration.
{
"status": "UNINITIALISED",
"enabled_countries": [
{
"country": [
"USA",
"CH"
],
"number": "60454"
}
]
}
The SMS destination status.
Possible values: length ≥ 1, Value must match regular expression
/^(UNINITIALISED|INITIALISED|DISABLED)$/
List enabled countries.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "number": "60454", "country": [ "USA", "CH" ] }
- enabled_countries
Phone number.
Possible values: length ≥ 0, Value must match regular expression
/.*/
List of Countries.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 15, Value must match regular expression
/[A-Z]/
Payload describing a custom SMS Configuration.
{
"status": "UNINITIALISED",
"enabled_countries": [
{
"country": [
"USA",
"CH"
],
"number": "60454"
}
]
}
The SMS destination status.
Possible values: length ≥ 1, Value must match regular expression
/^(UNINITIALISED|INITIALISED|DISABLED)$/
List enabled countries.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "number": "60454", "country": [ "USA", "CH" ] }
- enabledCountries
Phone number.
Possible values: length ≥ 0, Value must match regular expression
/.*/
List of Countries.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 15, Value must match regular expression
/[A-Z]/
Status Code
Enabled countries for the SMS destination
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "status": "UNINITIALISED", "enabled_countries": [ { "country": [ "USA", "CH" ], "number": "60454" } ] }
{ "status": "UNINITIALISED", "enabled_countries": [ { "country": [ "USA", "CH" ], "number": "60454" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Test a Destination
Test a Destination
Test a Destination.
Test a Destination.
Test a Destination.
Test a Destination.
POST /v1/instances/{instance_id}/destinations/{id}/test
(eventNotifications *EventNotificationsV1) TestDestination(testDestinationOptions *TestDestinationOptions) (result *TestDestinationResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) TestDestinationWithContext(ctx context.Context, testDestinationOptions *TestDestinationOptions) (result *TestDestinationResponse, response *core.DetailedResponse, err error)
testDestination(params)
test_destination(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<TestDestinationResponse> testDestination(TestDestinationOptions testDestinationOptions)
Request
Instantiate the TestDestinationOptions
struct and set the fields to provide parameter values for the TestDestination
method.
Use the TestDestinationOptions.Builder
to create a TestDestinationOptions
object that contains the parameter values for the testDestination
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The TestDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The testDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
curl --request POST --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/destinations/{destination_id}/test' --header 'Authorization: Bearer {TOKEN}'
testDestinationOptions := &eventnotificationsv1.TestDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID14), } _, response, err := eventNotificationsService.TestDestination(testDestinationOptions)
const testDestinationParams = { instanceId, id: destinationId10, }; try { const testDestinationResult = eventNotificationsService.testDestination(testDestinationParams); console.log(JSON.stringify(testDestinationResult.result, null, 2)); } catch (err) { console.warn(err); }
TestDestinationOptions testDestinationOptionsModel = new TestDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId4) .build(); Response<TestDestinationResponse> response = eventNotificationsService.testDestination(testDestinationOptionsModel).execute(); TestDestinationResponse testDestinationResponse = response.getResult(); System.out.println(testDestinationResponse);
try: test_destination_response = event_notifications_service.test_destination( instance_id, id=destination_id4 ) except ApiException as e: pytest.fail(str(e))
Response
Destination test object
test destiantion status
Possible values: 1 ≤ length ≤ 7, Value must match regular expression
[a-z]
Destination test object.
{
"status": "success"
}
test destiantion status.
Possible values: 1 ≤ length ≤ 7, Value must match regular expression
/[a-z]/
Destination test object.
{
"status": "success"
}
test destiantion status.
Possible values: 1 ≤ length ≤ 7, Value must match regular expression
/[a-z]/
Destination test object.
{
"status": "success"
}
test destiantion status.
Possible values: 1 ≤ length ≤ 7, Value must match regular expression
/[a-z]/
Destination test object.
{
"status": "success"
}
test destiantion status.
Possible values: 1 ≤ length ≤ 7, Value must match regular expression
/[a-z]/
Status Code
Test destination verificaton status
Destination test failed because of client error
Trying to access the API with unauthorized token
Request body type is not application/json
Internal server error
Unexpected Error
{ "status": "success" }
{ "status": "success" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "dest_test_failure", "message": "Destination test failed because of client error", "more_info": "https://test.cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "dest_test_failure", "message": "Destination test failed because of client error", "more_info": "https://test.cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of a custom_opt_in
Get details of a custom_opt_in
Get details of a custom_opt_in.
Get details of a custom_opt_in.
Get details of a custom_opt_in.
Get details of a custom_opt_in.
GET /v1/instances/{instance_id}/destinations/{id}/custom_opt_in
(eventNotifications *EventNotificationsV1) GetCustomOptIn(getCustomOptInOptions *GetCustomOptInOptions) (result *DestinationCustomOptInResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetCustomOptInWithContext(ctx context.Context, getCustomOptInOptions *GetCustomOptInOptions) (result *DestinationCustomOptInResponse, response *core.DetailedResponse, err error)
getCustomOptIn(params)
get_custom_opt_in(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<DestinationCustomOptInResponse> getCustomOptIn(GetCustomOptInOptions getCustomOptInOptions)
Request
Instantiate the GetCustomOptInOptions
struct and set the fields to provide parameter values for the GetCustomOptIn
method.
Use the GetCustomOptInOptions.Builder
to create a GetCustomOptInOptions
object that contains the parameter values for the getCustomOptIn
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetCustomOptIn options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The getCustomOptIn options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/destinations/{destination_id}/custom_opt_in' --header 'Authorization: Bearer {TOKEN}'
Response
Custom Email Destination custom_opt_in response object
destination type
Possible values: length ≥ 1, Value must match regular expression
.*
opt_in
Updated at
Custom Email Destination custom_opt_in response object.
{
"destination_type": "custom_email",
"opt_in": true,
"updated_at": "2023-09-08T13:25:20.523533Z"
}
destination type.
Possible values: length ≥ 1, Value must match regular expression
/.*/
opt_in.
Updated at.
Custom Email Destination custom_opt_in response object.
{
"destination_type": "custom_email",
"opt_in": true,
"updated_at": "2023-09-08T13:25:20.523533Z"
}
destination type.
Possible values: length ≥ 1, Value must match regular expression
/.*/
opt_in.
Updated at.
Custom Email Destination custom_opt_in response object.
{
"destination_type": "custom_email",
"opt_in": true,
"updated_at": "2023-09-08T13:25:20.523533Z"
}
destination type.
Possible values: length ≥ 1, Value must match regular expression
/.*/
opt_in.
Updated at.
Custom Email Destination custom_opt_in response object.
{
"destination_type": "custom_email",
"opt_in": true,
"updated_at": "2023-09-08T13:25:20.523533Z"
}
destination type.
Possible values: length ≥ 1, Value must match regular expression
/.*/
opt_in.
Updated at.
Status Code
Response body after destination verification
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "destination_type": "custom_email", "opt_in": true, "updated_at": "2023-09-08T13:25:20.523533Z" }
{ "destination_type": "custom_email", "opt_in": true, "updated_at": "2023-09-08T13:25:20.523533Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get public key of a Webhook Destination signing
Get public key of a Webhook Destination signing
GET /v1/instances/{instance_id}/destinations/{id}/public_key
Request
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/destinations/{destination_id}/public_key' --header 'Authorization: Bearer {TOKEN}'
Response
Payload describing public key
The Public Key must be used to decrypt and verify the Webhook payload received. PEM is in the form of Base64 encoded DER certificate. The response string contains one or more items in Base64 ASCII encoding, each with plain-text headers and footers
Possible values: length ≥ 1, Value must match regular expression
[a-zA-Z0-9-:_].*
Status Code
Payload describing the Destination public key
Requested resource not found
Internal server error
Unexpected Error
{ "public_key": "-----BEGIN PUBLIC KEY-----\nMIIag\np6PZt8DsRmJD2zR4+rfCUdUPYPN5dMOCA8Vm/48qj1GASNB6AXeHdZ3GDe/MYCT0\njVZOfnxxx3EMm8BsVHwrGkYPDs\nYtieyQdPt47+wDPlc2mY4/vxxxxxlgPS+rpUKaN0zxW3cP5xx\n2wIxxQAB\n-----END PUBLIC KEY-----\n" }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Verify SPF and DKIM records of custom domain
Verify SPF and DKIM records of custom domain
Verify SPF and DKIM records of custom domain.
Verify SPF and DKIM records of custom domain.
Verify SPF and DKIM records of custom domain.
Verify SPF and DKIM records of custom domain.
PATCH /v1/instances/{instance_id}/destinations/{id}/verify
(eventNotifications *EventNotificationsV1) UpdateVerifyDestination(updateVerifyDestinationOptions *UpdateVerifyDestinationOptions) (result *VerificationResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) UpdateVerifyDestinationWithContext(ctx context.Context, updateVerifyDestinationOptions *UpdateVerifyDestinationOptions) (result *VerificationResponse, response *core.DetailedResponse, err error)
updateVerifyDestination(params)
update_verify_destination(self,
instance_id: str,
id: str,
type: str,
**kwargs
) -> DetailedResponse
ServiceCall<VerificationResponse> updateVerifyDestination(UpdateVerifyDestinationOptions updateVerifyDestinationOptions)
Request
Instantiate the UpdateVerifyDestinationOptions
struct and set the fields to provide parameter values for the UpdateVerifyDestination
method.
Use the UpdateVerifyDestinationOptions.Builder
to create a UpdateVerifyDestinationOptions
object that contains the parameter values for the updateVerifyDestination
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Verification type
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
[a-z]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateVerifyDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
The updateVerifyDestination options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/destinations/{id}/verify?type=dkim"
customEmailUpdateDestinationOptions := &eventnotificationsv1.UpdateVerifyDestinationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(destinationID16), Type: core.StringPtr("spf/dkim"), } spfDkimResult, response, err := eventNotificationsService.UpdateVerifyDestination(customEmailUpdateDestinationOptions)
const updateSpfDkinVerifyDestinationParams = { instanceId, id: destinationId16, type: 'spf/dkim', }; res = await eventNotificationsService.updateVerifyDestination( updateSpfDkimVerifyDestinationParams );
UpdateVerifyDestinationOptions updateSpfDkimVerifyDestinationOptionsModel = new UpdateVerifyDestinationOptions.Builder() .instanceId(instanceId) .id(destinationId16) .type("dkim/spf") .build(); Response<VerificationResponse> spfDkimVerificationResponse = eventNotificationsService.updateVerifyDestination(updateSpfDkimVerifyDestinationOptionsModel).execute(); VerificationResponse spfDkimResponseObj = spfDkimVerificationResponse.getResult();
verification_response = self.event_notifications_service.update_verify_destination( instance_id, id=destination_id16, type="spf/dkim", ).get_result()
Response
Destination verification object
verification type
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
[a-z]
verification status
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
[A-Z]
Destination verification object.
{
"type": "dkim",
"verification": "SUCCESSFUL"
}
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Destination verification object.
{
"type": "dkim",
"verification": "SUCCESSFUL"
}
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Destination verification object.
{
"type": "dkim",
"verification": "SUCCESSFUL"
}
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Destination verification object.
{
"type": "dkim",
"verification": "SUCCESSFUL"
}
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[a-z]/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Status Code
Response body after destination verification
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Request body type is not application/json
Internal server error
Unexpected Error
{ "type": "dkim", "verification": "SUCCESSFUL" }
{ "type": "dkim", "verification": "SUCCESSFUL" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new tag subscription
Create a new tag subscription
Create a new tag subscription.
Create a new tag subscription.
Create a new tag subscription.
Create a new tag subscription.
POST /v1/instances/{instance_id}/destinations/{id}/tag_subscriptions
(eventNotifications *EventNotificationsV1) CreateTagsSubscription(createTagsSubscriptionOptions *CreateTagsSubscriptionOptions) (result *DestinationTagsSubscriptionResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateTagsSubscriptionWithContext(ctx context.Context, createTagsSubscriptionOptions *CreateTagsSubscriptionOptions) (result *DestinationTagsSubscriptionResponse, response *core.DetailedResponse, err error)
createTagsSubscription(params)
create_tags_subscription(self,
instance_id: str,
id: str,
device_id: str,
tag_name: str,
**kwargs
) -> DetailedResponse
ServiceCall<DestinationTagsSubscriptionResponse> createTagsSubscription(CreateTagsSubscriptionOptions createTagsSubscriptionOptions)
Request
Instantiate the CreateTagsSubscriptionOptions
struct and set the fields to provide parameter values for the CreateTagsSubscription
method.
Use the CreateTagsSubscriptionOptions.Builder
to create a CreateTagsSubscriptionOptions
object that contains the parameter values for the createTagsSubscription
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Payload describing a Tag Subscription create request
{
"device_id": "abcdef12-abc1-abc1-abc1-abcdef123456",
"tag_name": "sl_web"
}
Unique identifier of the device
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
The name of the tag its subscribed
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateTagsSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The createTagsSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
curl --request POST --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/destinations/{destination_id}/tag_subscriptions' --header 'Authorization: Bearer {TOKEN}' --data '{"device_id":"11fe18ba-d0c8-4108-9f07-355e8052a813","tag_name":"sl_web"}'
Response
Payload describing a destination get request
Subscription Tag ID
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Unique identifier of the device
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
The name of the tag its subscribed
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Last updated time
The user identifier for the device registration
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Payload describing a destination get request.
{
"created_at": "2021-10-07T07:05:52.098388257Z",
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "deveoper_fcm"
}
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time.
Payload describing a destination get request.
{
"created_at": "2021-10-07T07:05:52.098388257Z",
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "deveoper_fcm"
}
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time.
Payload describing a destination get request.
{
"created_at": "2021-10-07T07:05:52.098388257Z",
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "deveoper_fcm"
}
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time.
Payload describing a destination get request.
{
"created_at": "2021-10-07T07:05:52.098388257Z",
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "deveoper_fcm"
}
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time.
Status Code
New Tag subscription created successfully
Bad or incorrect request body
Trying to access the API with unauthorized token
Trying to create duplicate destination
Request body type is not application/json
Internal server error
Unexpected Error
{ "created_at": "2021-10-07T07:05:52.098388257Z", "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "deveoper_fcm" }
{ "created_at": "2021-10-07T07:05:52.098388257Z", "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "deveoper_fcm" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "55372994-3e42-4129-9c7b-aa2aa0820c53", "status_code": 409, "errors": [ { "code": "destination_conflict", "message": "Duplicate destination name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "55372994-3e42-4129-9c7b-aa2aa0820c53", "status_code": 409, "errors": [ { "code": "destination_conflict", "message": "Duplicate destination name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all tag subscriptions
List all tag subscriptions
List all tag subscriptions.
List all tag subscriptions.
List all tag subscriptions.
List all tag subscriptions.
GET /v1/instances/{instance_id}/destinations/{id}/tag_subscriptions
(eventNotifications *EventNotificationsV1) ListTagsSubscription(listTagsSubscriptionOptions *ListTagsSubscriptionOptions) (result *TagsSubscriptionList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListTagsSubscriptionWithContext(ctx context.Context, listTagsSubscriptionOptions *ListTagsSubscriptionOptions) (result *TagsSubscriptionList, response *core.DetailedResponse, err error)
listTagsSubscription(params)
list_tags_subscription(self,
instance_id: str,
id: str,
*,
device_id: str = None,
user_id: str = None,
tag_name: str = None,
limit: int = None,
offset: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<TagsSubscriptionList> listTagsSubscription(ListTagsSubscriptionOptions listTagsSubscriptionOptions)
Request
Instantiate the ListTagsSubscriptionOptions
struct and set the fields to provide parameter values for the ListTagsSubscription
method.
Use the ListTagsSubscriptionOptions.Builder
to create a ListTagsSubscriptionOptions
object that contains the parameter values for the listTagsSubscription
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Device ID of the destination tagsubscription
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
UserID of the destination
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
[a-z]
TagName of the subscription
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
[a-z]
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
offset for paginated results
Possible values: value ≥ 0
Default:
0
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListTagsSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
UserID of the destination.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
UserID of the destination.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
UserID of the destination.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listTagsSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
UserID of the destination.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/destinations/{destination_id}/tag_subscriptions?device_id="11fe18ba-d0c8-4108-9f07-355e8052a813"' --header 'Authorization: Bearer {TOKEN}'
Response
Payload describing a tags list request
Total number of tags
Current offset
limit to show tags
List of tags
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Payload describing a tags list request.
{
"tag_subscriptions": [
{
"id": "330cfdf8-7ae6-4afb-aac1-458243877d00",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "fcm_id_123",
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "9a7aa117-58ee-48ea-8b08-3ad4be22647c",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMTP_apireview",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMS_destination",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:03:55.313179Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of tags.
Current offset.
limit to show tags.
List of tags.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "deveoper_fcm", "updated_at": "2021-09-05T00:25:19.599884Z" }
- TagSubscriptions
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Updated at.
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Payload describing a tags list request.
{
"tag_subscriptions": [
{
"id": "330cfdf8-7ae6-4afb-aac1-458243877d00",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "fcm_id_123",
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "9a7aa117-58ee-48ea-8b08-3ad4be22647c",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMTP_apireview",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMS_destination",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:03:55.313179Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of tags.
Current offset.
limit to show tags.
List of tags.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "deveoper_fcm", "updated_at": "2021-09-05T00:25:19.599884Z" }
- tag_subscriptions
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a tags list request.
{
"tag_subscriptions": [
{
"id": "330cfdf8-7ae6-4afb-aac1-458243877d00",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "fcm_id_123",
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "9a7aa117-58ee-48ea-8b08-3ad4be22647c",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMTP_apireview",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMS_destination",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:03:55.313179Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of tags.
Current offset.
limit to show tags.
List of tags.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "deveoper_fcm", "updated_at": "2021-09-05T00:25:19.599884Z" }
- tag_subscriptions
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a tags list request.
{
"tag_subscriptions": [
{
"id": "330cfdf8-7ae6-4afb-aac1-458243877d00",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "sl_web",
"user_id": "fcm_id_123",
"updated_at": "2021-09-05T00:25:19.599884Z"
},
{
"id": "9a7aa117-58ee-48ea-8b08-3ad4be22647c",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMTP_apireview",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:06:04.565646Z"
},
{
"id": "cb82dc07-105c-441c-9fa0-ba22f6525318",
"device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"tag_name": "SMS_destination",
"user_id": "fcm_id_123",
"updated_at": "2021-09-17T01:03:55.313179Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of tags.
Current offset.
limit to show tags.
List of tags.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "deveoper_fcm", "updated_at": "2021-09-05T00:25:19.599884Z" }
- tagSubscriptions
Subscription Tag ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Unique identifier of the device.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The name of the tag its subscribed.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The user identifier for the device registration.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Updated at.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Get list of all Tags Subscription
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "tag_subscriptions": [ { "id": "330cfdf8-7ae6-4afb-aac1-458243877d00", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "fcm_id_123", "updated_at": "2021-09-05T00:25:19.599884Z" }, { "id": "9a7aa117-58ee-48ea-8b08-3ad4be22647c", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "SMTP_apireview", "user_id": "fcm_id_123", "updated_at": "2021-09-17T01:06:04.565646Z" }, { "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "SMS_destination", "user_id": "fcm_id_123", "updated_at": "2021-09-17T01:03:55.313179Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 3 }
{ "tag_subscriptions": [ { "id": "330cfdf8-7ae6-4afb-aac1-458243877d00", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "sl_web", "user_id": "fcm_id_123", "updated_at": "2021-09-05T00:25:19.599884Z" }, { "id": "9a7aa117-58ee-48ea-8b08-3ad4be22647c", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "SMTP_apireview", "user_id": "fcm_id_123", "updated_at": "2021-09-17T01:06:04.565646Z" }, { "id": "cb82dc07-105c-441c-9fa0-ba22f6525318", "device_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "tag_name": "SMS_destination", "user_id": "fcm_id_123", "updated_at": "2021-09-17T01:03:55.313179Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations/axxxxx-xxxxx-xxxxx-rtc4-xxxxx/tag_subscriptions?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 3 }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a tag subscription
Delete a tag subscription
Delete a tag subscription.
Delete a tag subscription.
Delete a tag subscription.
Delete a tag subscription.
DELETE /v1/instances/{instance_id}/destinations/{id}/tag_subscriptions
(eventNotifications *EventNotificationsV1) DeleteTagsSubscription(deleteTagsSubscriptionOptions *DeleteTagsSubscriptionOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteTagsSubscriptionWithContext(ctx context.Context, deleteTagsSubscriptionOptions *DeleteTagsSubscriptionOptions) (response *core.DetailedResponse, err error)
deleteTagsSubscription(params)
delete_tags_subscription(self,
instance_id: str,
id: str,
*,
device_id: str = None,
tag_name: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteTagsSubscription(DeleteTagsSubscriptionOptions deleteTagsSubscriptionOptions)
Request
Instantiate the DeleteTagsSubscriptionOptions
struct and set the fields to provide parameter values for the DeleteTagsSubscription
method.
Use the DeleteTagsSubscriptionOptions.Builder
to create a DeleteTagsSubscriptionOptions
object that contains the parameter values for the deleteTagsSubscription
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Destination
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Device ID of the destination tagsubscription
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
TagName of the subscription
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
[a-z]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteTagsSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
The deleteTagsSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Destination.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Device ID of the destination tagsubscription.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
TagName of the subscription.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/[a-z]/
curl --request DELETE --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/destinations/{destination_id}/tag_subscriptions?device_id="11fe18ba-d0c8-4108-9f07-355e8052a813"&tag_name="sl_web"' --header 'Authorization: Bearer {TOKEN}'
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new Subscription
Create a new Subscription
Create a new Subscription.
Create a new Subscription.
Create a new Subscription.
Create a new Subscription.
POST /v1/instances/{instance_id}/subscriptions
(eventNotifications *EventNotificationsV1) CreateSubscription(createSubscriptionOptions *CreateSubscriptionOptions) (result *Subscription, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateSubscriptionWithContext(ctx context.Context, createSubscriptionOptions *CreateSubscriptionOptions) (result *Subscription, response *core.DetailedResponse, err error)
createSubscription(params)
create_subscription(self,
instance_id: str,
name: str,
destination_id: str,
topic_id: str,
*,
description: str = None,
attributes: 'SubscriptionCreateAttributes' = None,
**kwargs
) -> DetailedResponse
ServiceCall<Subscription> createSubscription(CreateSubscriptionOptions createSubscriptionOptions)
Request
Instantiate the CreateSubscriptionOptions
struct and set the fields to provide parameter values for the CreateSubscription
method.
Use the CreateSubscriptionOptions.Builder
to create a CreateSubscriptionOptions
object that contains the parameter values for the createSubscription
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Subscription object
{
"attributes": {
"signing_enabled": true
},
"destination_id": "81ed6419-e7fd-44c6-9d7e-79df74f282d6",
"description": "This is test description5",
"name": "Webhook sub",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701"
}
Subscription name
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Destination ID
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Topic ID
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Subscription description
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Subscription name.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The attributes for an sms notification.
- Attributes
The sms id string.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Subscription name.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The attributes for an sms notification.
- attributes
The sms id string.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Subscription name.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The attributes for an sms notification.
- attributes
The sms id string.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The createSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Subscription name.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Destination ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic ID.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription description.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The attributes for an sms notification.
- attributes
The sms id string.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "Webhook subscription", "description": "This is for webhook subscription", "topic_id" : "3cf935e4-61a8-4d15-bf70-cc7275a1c2f1", "destination_id": "d596ea2e-9a5a-4258-b2be-4a558c543bd5", "attributes" :{ "signing_enabled": false , "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13" } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "Email invite check new", "description": "This is for email subscription", "topic_id" : "6310cfe7-6645-4933-a6ba-01a9e5cd8919", "destination_id": "ff30b401-56f7-4854-bc1b-281f614ed509", "attributes" :{ "invited" :["axxxxxxxxxxxx@ibm.com", "mxxxxxxxx@in.ibm.com" ], "add_notification_payload": true, "reply_to_mail": "rtxxxxx@ibm.com", "reply_to_name": "xxxxx", "from_name": "Ixxxxxp" } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "SMS Subscription", "description": "This is for sms subscription", "topic_id" : "1ecbbaa2-63da-4144-b7b0-b5cb8c76f8b2", "destination_id": "1994946b-2af2-418f-9fb0-ffd8eaccfeae", "attributes" :{ "to" :["+917xxxxxxxx7", "+1xxxxxxxxxx8"] } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "Push Subscription", "description": "This is for a push subscription", "topic_id" : "0febb541-dbe5-4bce-9f01-deaa00efc34e", "destination_id": "af644cfc-bee5-40be-9aa1-4aae58903064" }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "Slack subscription", "description": "This is for slack susbcripion", "topic_id" : "9e156484-601e-4ed3-941b-48af3d58af64", "destination_id": "be9709a4-aa74-4e41-89ef-762c3780ef26", "attributes" :{ "attachment_color": "#12345" , "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13" } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "Slack DM subscription", "description": "This is for slack DM susbcripion", "topic_id" : "9e156484-601e-4ed3-941b-48af3d58af64", "destination_id": "be9709a4-aa74-4e41-89ef-762c3780ef26", "attributes" :{ "channels": ["id":"B9013WO3XX4H","id":"B9013WO3XX4H"] , "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13" } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "PagerDuty Subscription", "description": "This is for a PagerDuty subscription", "topic_id" : "0febb541-dbe5-4bce-9f01-deaa00efc34e", "destination_id": "af644cfc-bee5-40be-9aa1-4aae58903064" }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "ServiceNow Subscription", "description": "This is for a ServiceNow subscription", "topic_id" : "0febb541-dbe5-4bce-9f01-deaa00efc34e", "destination_id": "af644cfc-bee5-40be-9aa1-4aae58903064", "attributes" :{ "assigned_to": "user" , "assignment_group": "group" } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "Email invite check new", "description": "This is for email subscription", "topic_id" : "xx10cfe7-6645-xxxx-a6ba-01a9e5cd8919", "destination_id": "ff30b401-xxx-4854-bc1b-281f614ed509", "attributes" :{ "invited" :["axxxxxxxxxxxx@ibm.com", "mxxxxxxxx@in.ibm.com" ], "add_notification_payload": true, "reply_to_mail": "rtxxxxx@ibm.com", "reply_to_name": "xxxxx", "from_name": "Ixxxxxp" , "from_email": "Ixxxxxp@abc.test.com" , "template_id_notification": "a59f6e38-7a48-0000-0000-3724afc5aaaa" , "template_id_invitation": "a59f6e38-7a48-0000-0000-3724afc5aaaa" } }'
curl -X POST --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions" --data '{ "name": "Custom SMS Subscription", "description": "This is for custom sms subscription", "topic_id" : "1ecbbaa2-63da-4144-b7b0-b5cb8c76f8b2", "destination_id": "1994946b-2af2-418f-9fb0-ffd8eaccfeae", "attributes" :{ "invited" :["+917xxxxxxxx7", "+1xxxxxxxxxx8"] } }'
webSubscriptionCreateAttributesModel := &eventnotificationsv1.SubscriptionCreateAttributes{ SigningEnabled: core.BoolPtr(false), TemplateIDNotification: core.StringPtr(webhookTemplateID), } webName := core.StringPtr("subscription_web") webDescription := core.StringPtr("Subscription for web") createWebSubscriptionOptions := &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: webName, Description: webDescription, DestinationID: core.StringPtr(destinationID3), TopicID: core.StringPtr(topicID), Attributes: webSubscriptionCreateAttributesModel, } subscription, response, err = eventNotificationsService.CreateSubscription(createWebSubscriptionOptions)
subscriptionCreateAttributesEmailModel := &eventnotificationsv1.SubscriptionCreateAttributesEmailAttributes{ Invited: []string{"tester1@gmail.com", "tester3@ibm.com"}, AddNotificationPayload: core.BoolPtr(true), ReplyToMail: core.StringPtr("testerreply@gmail.com"), ReplyToName: core.StringPtr("rester_reply"), FromName: core.StringPtr("Test IBM email"), } subscriptionName = "subscription_email" description := core.StringPtr("Subscription for email") createSubscriptionOptions = &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr(subscriptionName), Description: description, DestinationID: core.StringPtr(destinationID2), TopicID: core.StringPtr(topicID), Attributes: subscriptionCreateAttributesEmailModel, } subscription, response, err = eventNotificationsService.CreateSubscription(createSubscriptionOptions)
subscriptionCreateAttributesSMSModel := &eventnotificationsv1.SubscriptionCreateAttributesSmsAttributes{ Invited: []string{"+12064563059", "+12267054625"}, } smsName := core.StringPtr("subscription_sms") smsDescription := core.StringPtr("Subscription for sms") createSMSSubscriptionOptions := &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: smsName, Description: smsDescription, DestinationID: core.StringPtr(destinationID1), TopicID: core.StringPtr(topicID), Attributes: subscriptionCreateAttributesSMSModel, } subscription, response, err = eventNotificationsService.CreateSubscription(createSMSSubscriptionOptions)
subscriptionCreateSlackAttributesModel := &eventnotificationsv1.SubscriptionCreateAttributesSlackAttributes{ AttachmentColor: core.StringPtr("#0000FF"), TemplateIDNotification: core.StringPtr(slackTemplateID), } createSlackSubscriptionOptions := &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr("Slack subscription"), Description: core.StringPtr("Subscription for the Slack"), DestinationID: core.StringPtr(destinationID4), TopicID: core.StringPtr(topicID), Attributes: subscriptionCreateSlackAttributesModel, } subscription, response, err = eventNotificationsService.CreateSubscription(createSlackSubscriptionOptions)
slackDirectMessageChannel := &eventnotificationsv1.ChannelCreateAttributes{ ID: core.StringPtr(slackChannelID), } subscriptionCreateSlackDMAttributesModel := &eventnotificationsv1.SubscriptionCreateAttributesSlackDirectMessageAttributes{ Channels: []eventnotificationsv1.ChannelCreateAttributes{*slackDirectMessageChannel}, TemplateIDNotification: core.StringPtr(slackTemplateID), } createSlackDMSubscriptionOptions := &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr("Slack DM subscription"), Description: core.StringPtr("Subscription for the Slack DM"), DestinationID: core.StringPtr(destinationID19), TopicID: core.StringPtr(topicID), Attributes: subscriptionCreateSlackDMAttributesModel, } subscription, response, err = eventNotificationsService.CreateSubscription(createSlackDMSubscriptionOptions)
createSubscriptionOptions := eventNotificationsService.NewCreateSubscriptionOptions( instanceID, subscriptionName, destinationID, topicID, ) createSubscriptionOptions.SetDescription("Subscription for Push Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei ") subscription, response, err := eventNotificationsService.CreateSubscription(createSubscriptionOptions)
createServiceNowSubscriptionOptions := &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: core.StringPtr("Service Now subscription"), Description: core.StringPtr("Subscription for Service Now"), DestinationID: core.StringPtr(destinationID11), TopicID: core.StringPtr(topicID), Attributes: &eventnotificationsv1.SubscriptionCreateAttributesServiceNowAttributes{ AssignedTo: core.StringPtr("user"), AssignmentGroup: core.StringPtr("test"), }, } subscription, response, err = eventNotificationsService.CreateSubscription(createServiceNowSubscriptionOptions)
subscriptionCreateAttributesCustomEmailModel := &eventnotificationsv1.SubscriptionCreateAttributesCustomEmailAttributes{ Invited: []string{"abc@gmail.com", "tester3@ibm.com"}, AddNotificationPayload: core.BoolPtr(true), ReplyToMail: core.StringPtr("testerreply@gmail.com"), ReplyToName: core.StringPtr("rester_reply"), FromName: core.StringPtr("Test IBM email"), FromEmail: core.StringPtr("test@abc.event-notifications.test.cloud.ibm.com"), TemplateIDInvitation: core.StringPtr(templateInvitationID), TemplateIDNotification: core.StringPtr(templateNotificationID), } customEmailName := core.StringPtr("subscription_custom_email") customEmailDescription := core.StringPtr("Subscription for custom email") createCustomEmailSubscriptionOptions := &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: customEmailName, Description: customEmailDescription, DestinationID: core.StringPtr(destinationID16), TopicID: core.StringPtr(topicID), Attributes: subscriptionCreateAttributesCustomEmailModel, } subscription, response, err = eventNotificationsService.CreateSubscription(createCustomEmailSubscriptionOptions)
subscriptionCreateAttributesCustomSMSModel := &eventnotificationsv1.SubscriptionCreateAttributesCustomSmsAttributes{ Invited: []string{"+12064563059", "+12267054625"}, } customSMSName := core.StringPtr("subscription_custom_sms") customSMSDescription := core.StringPtr("Subscription for custom sms") createCustomSMSSubscriptionOptions := &eventnotificationsv1.CreateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: customSMSName, Description: customSMSDescription, DestinationID: core.StringPtr(destinationID17), TopicID: core.StringPtr(topicID), Attributes: subscriptionCreateAttributesCustomSMSModel, } subscription, response, err = eventNotificationsService.CreateSubscription(createCustomSMSSubscriptionOptions)
const subscriptionCreateAttributesModel = { signing_enabled: false, template_id_notification: webhookTemplateID, }; name = 'subscription_web'; description = 'Subscription for web'; params = { instanceId, name, destinationId: destinationId3, topicId, attributes: subscriptionCreateAttributesModel, description, }; res = await eventNotificationsService.createSubscription(params);
const subscriptionCreateAttributesModelSecond = { invited: ['tester1@gmail.com', 'tester3@ibm.com'], add_notification_payload: true, reply_to_mail: 'tester1@gmail.com', reply_to_name: 'US news', from_name: 'IBM', }; let name = 'subscription_email'; let description = 'Subscription for email'; params = { instanceId, name, destinationId: destinationId2, topicId, attributes: subscriptionCreateAttributesModelSecond, description, }; res = await eventNotificationsService.createSubscription(params);
const subscriptionCreateAttributesModelSMS = { invited: ['+12064563059', '+12267054625'], }; name = 'subscription_sms'; description = 'Subscription for sms'; params = { instanceId, name, destinationId: destinationId1, topicId, attributes: subscriptionCreateAttributesModelSMS, description, }; const resSMS = await eventNotificationsService.createSubscription(params);
name = 'slack subscription'; description = 'Subscription for the slack'; params = { instanceId, name, destinationId: destinationId4, topicId, description, attributes: { attachment_color: '#0000FF', template_id_notification: slackTemplateID, }, }; res = await eventNotificationsService.createSubscription(params);
const channelCreateAttribute = { id: slackChannelID, }; const channelDetails = [channelCreateAttribute]; name = 'slack DM subscription'; description = 'Subscription for the slack DM'; params = { instanceId, name, destinationId: destinationId19, topicId, description, attributes: { channels: channelDetails, template_id_notification: slackTemplateID, }, }; res = await eventNotificationsService.createSubscription(params);
let subscriptionName = 'subscription_Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object/Huawei Storage'; let subscriptionDescription = 'Subscription for Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei'; let params = { instanceId, name: subscriptionName, destinationId, topicId, description: subscriptionDescription, }; let res = await eventNotificationsService.createSubscription(params);
const subscriptionSNowCreateAttributesModel = { assigned_to: 'user', assignment_group: 'group', }; name = 'ServiceNow subscription'; description = 'Subscription for the ServiceNow'; params = { instanceId, name, destinationId: destinationId11, topicId, description, attributes: subscriptionSNowCreateAttributesModel, }; res = await eventNotificationsService.createSubscription(params);
const subscriptionCreateCustomAttributesModel = { invited: ['abc@gmail.com', 'tester3@ibm.com'], add_notification_payload: true, reply_to_mail: 'tester1@gmail.com', reply_to_name: 'US news', from_name: 'IBM', from_email: 'test@xyz.event-notifications.test.cloud.ibm.com', }; name = 'subscription_custom_email'; description = 'Subscription for custom email'; params = { instanceId, name, destinationId: destinationId16, topicId, attributes: subscriptionCreateCustomAttributesModel, description, }; res = await eventNotificationsService.createSubscription(params);
const SubscriptionCreateAttributesCustomSMSAttributes = { invited: ['+12064563059', '+12267054625'], }; name = 'subscription_custom_sms'; description = 'Subscription for custom sms'; params = { instanceId, name, destinationId: destinationId17, topicId, attributes: SubscriptionCreateAttributesCustomSMSAttributes, description, }; let resCustomSMS; resCustomSMS = await eventNotificationsService.createSubscription(params);
SubscriptionCreateAttributesWebhookAttributes subscriptionCreateWebAttributesModel = new SubscriptionCreateAttributesWebhookAttributes.Builder() .signingEnabled(true) .templateIdNotification(webhookTemplateID) .build(); String webName = "subscription_web"; String webDescription = "Subscription for web"; CreateSubscriptionOptions createWebSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(webName) .destinationId(destinationId3) .topicId(topicId) .description(webDescription) .attributes(subscriptionCreateWebAttributesModel) .build(); // Invoke operation Response<Subscription> webResponse = eventNotificationsService.createSubscription(createWebSubscriptionOptions).execute(); Subscription subscriptionResult = webResponse.getResult();
ArrayList<String> toMail = new ArrayList<String>(); toMail.add("tester1@gmail.com"); toMail.add("tester3@ibm.com"); SubscriptionCreateAttributesEmailAttributes subscriptionCreateEmailAttributesModel = new SubscriptionCreateAttributesEmailAttributes.Builder() .invited(toMail) .addNotificationPayload(true) .replyToMail("reply_to_mail@us.com") .replyToName("US News") .fromName("IBM") .build(); String emailName = "subscription_email_update"; String emailDescription = "Subscription email update"; createSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(emailName) .destinationId(destinationId2) .topicId(topicId) .attributes(subscriptionCreateEmailAttributesModel) .description(emailDescription) .build(); Response<Subscription> emailResponse = eventNotificationsService.createSubscription(createSubscriptionOptions).execute(); Subscription emailSubscription = emailResponse.getResult();
ArrayList<String> toNumber = new ArrayList<String>(); toNumber.add("+12064563059"); toNumber.add("+12267054625"); SubscriptionCreateAttributesSMSAttributes subscriptionCreateSMSAttributesModel = new SubscriptionCreateAttributesSMSAttributes.Builder() .invited(toNumber) .build(); String smsName = "subscription_sms"; String smsDescription = "Subscription sms"; createSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(smsName) .destinationId(destinationId1) .topicId(topicId) .attributes(subscriptionCreateSMSAttributesModel) .description(smsDescription) .build(); Response<Subscription> smsResponse = eventNotificationsService.createSubscription(createSubscriptionOptions).execute(); Subscription smsSubscriptionResult = smsResponse.getResult();
String slackName = "subscription_slack"; String slackDescription = "Subscription for slack"; SubscriptionCreateAttributesSlackAttributes slackCreateAttributes = new SubscriptionCreateAttributesSlackAttributes.Builder() .attachmentColor("#0000FF") .templateIdNotification(slackTemplateID) .build(); CreateSubscriptionOptions createSlackSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(slackName) .destinationId(destinationId4) .topicId(topicId) .description(slackDescription) .attributes(slackCreateAttributes) .build(); Response<Subscription> slackResponse = eventNotificationsService.createSubscription(createSlackSubscriptionOptions).execute(); Subscription slackSubscriptionResult = slackResponse.getResult();
String slackDMName = "subscription_slack DM"; String slackDMDescription = "Subscription for slack DM"; ChannelCreateAttributes channel = new ChannelCreateAttributes.Builder() .id(slackChannelID) .build(); List<ChannelCreateAttributes> channels = new ArrayList<>(); channels.add(channel); SubscriptionCreateAttributesSlackDirectMessageAttributes slackDMCreateAttributes = new SubscriptionCreateAttributesSlackDirectMessageAttributes.Builder() .channels(channels) .templateIdNotification(slackTemplateID) .build(); CreateSubscriptionOptions createSlackDMSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(slackDMName) .destinationId(destinationId19) .topicId(topicId) .description(slackDMDescription) .attributes(slackDMCreateAttributes) .build(); Response<Subscription> slackDMResponse = eventNotificationsService.createSubscription(createSlackDMSubscriptionOptions).execute(); Subscription slackDMSubscriptionResult = slackDMResponse.getResult();
String name = "Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object/Huawei Storage subscription"; String description = "Subscription for Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei "; CreateSubscriptionOptions createSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(name) .destinationId(destinationId) .topicId(topicId) .description(description) .build(); Response<Subscription> response = eventNotificationsService.createSubscription(createSubscriptionOptions).execute(); Subscription subscription = response.getResult();
String sNowName = "subscription_service_now"; String sNowDescription = "Subscription for service now"; SubscriptionCreateAttributesServiceNowAttributes sNowAttributes = new SubscriptionCreateAttributesServiceNowAttributes.Builder() .assignedTo("user") .assignmentGroup("group") .build(); CreateSubscriptionOptions createSNowSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(sNowName) .destinationId(destinationId11) .topicId(topicId) .description(sNowDescription) .attributes(sNowAttributes) .build(); Response<Subscription> sNowResponse = eventNotificationsService.createSubscription(createSNowSubscriptionOptions).execute(); Subscription sNowSubscriptionResult = sNowResponse.getResult();
ArrayList<String> customToMail = new ArrayList<String>(); customToMail.add("xyz@ibm.com"); customToMail.add("tester3@ibm.com"); SubscriptionCreateAttributesCustomEmailAttributes subscriptionCreateCustomEmailAttributesModel = new SubscriptionCreateAttributesCustomEmailAttributes.Builder() .invited(customToMail) .addNotificationPayload(true) .replyToMail("abc@gmail.com") .replyToName("abc") .fromName("IBM") .fromEmail("test@abc.event-notifications.test.cloud.ibm.com") .templateIdInvitation(templateInvitationID) .templateIdNotification(templateNotificationID) .build(); String customName = "subscription_Custom_Email"; String customDescription = "Subscription for Custom Email"; CreateSubscriptionOptions createCustomSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(customName) .destinationId(destinationId16) .topicId(topicId) .attributes(subscriptionCreateCustomEmailAttributesModel) .description(customDescription) .build(); Response<Subscription> customResponse = eventNotificationsService.createSubscription(createCustomSubscriptionOptions).execute(); Subscription customSubscriptionResult = customResponse.getResult();
ArrayList<String> customToNumber = new ArrayList<String>(); customToNumber.add("+911234567890"); customToNumber.add("+12267054625"); SubscriptionCreateAttributesCustomSMSAttributes subscriptionCreateCustomSMSAttributesModel = new SubscriptionCreateAttributesCustomSMSAttributes.Builder() .invited(customToNumber) .build(); String customSMSName = "subscription_custom_sms"; String customSMSDescription = "Subscription custom sms"; CreateSubscriptionOptions createCustomSMSSubscriptionOptions = new CreateSubscriptionOptions.Builder() .instanceId(instanceId) .name(customSMSName) .destinationId(destinationId17) .topicId(topicId) .attributes(subscriptionCreateCustomSMSAttributesModel) .description(customSMSDescription) .build(); Response<Subscription> customSMSResponse = eventNotificationsService.createSubscription(createCustomSMSSubscriptionOptions).execute(); Subscription customSMSSubscriptionResult = customSMSResponse.getResult();
subscription_create_attributes_model = { 'signing_enabled': False, 'template_id_notification': webhook_template_id, } name = 'subscription_web' description = 'Subscription for web' subscription = event_notifications_service.create_subscription( instance_id, name, destination_id3, topic_id, attributes=subscription_create_attributes_model, description=description ).get_result()
subscription_create_attributes_model = { 'invited': ["tester1@gmail.com", "tester3@ibm.com"], 'add_notification_payload': True, "reply_to_mail": "reply_to_mail@us.com", "reply_to_name": "US News", "from_name": "IBM" } name = 'subscription_email' description = 'Subscription for email' subscription = event_notifications_service.create_subscription( instance_id, name, destination_id=destination_id2, topic_id=topic_id, attributes=subscription_create_attributes_model, description=description ).get_result()
subscription_create_attributes_model = { 'invited': ["+12064512559", "+12064512559"], } name = 'subscription_sms' description = 'Subscription for sms' subscription = event_notifications_service.create_subscription( instance_id, name, destination_id=destination_id1, topic_id=topic_id, attributes=subscription_create_attributes_model, description=description ).get_result()
name = "slack subscription" description = "Subscription for the slack" subscription_create_attributes_model = { 'attachment_color': '#0000FF', 'template_id_notification': slack_template_id, } subscription = self.event_notifications_service.create_subscription( instance_id, name, destination_id=destination_id4, topic_id=topic_id, description=description, attributes=subscription_create_attributes_model ).get_result()
channel_create_attributes_model_array = [{'id': slack_channel_id}] subscription_create_attributes_model_json = { 'channels': channel_create_attributes_model_array, 'template_id_notification': slack_template_id, } subscription_create_attributes_model = SubscriptionCreateAttributesSlackDirectMessageAttributes.from_dict( subscription_create_attributes_model_json ) create_subscription_response = self.event_notifications_service.create_subscription( instance_id, name, destination_id=destination_id19, topic_id=topic_id, description=description, attributes=subscription_create_attributes_model, ) subscription_response = create_subscription_response.get_result()
name = 'subscription_Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei' description = 'Subscription for Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei' subscription = event_notifications_service.create_subscription( instance_id, name, destination_id, topic_id, description=description ).get_result()
name = "ServiceNow subscription" description = "Subscription for the ServiceNow" subscription_create_attributes_model = { 'assigned_to': 'user', 'assignment_group': 'group', } subscription = self.event_notifications_service.create_subscription( instance_id, name, destination_id=destination_id11, topic_id=topic_id, description=description, attributes=subscription_create_attributes_model ).get_result()
subscription_create_attributes_model = { 'invited': ["abc@gmail.com", "tester3@ibm.com"], 'add_notification_payload': True, "reply_to_mail": "reply_to_mail@us.com", "reply_to_name": "US News", "from_name": "IBM", "from_email": "test@abc.event-notifications.test.cloud.ibm.com" "template_id_invitation": template_invitation_id, "template_id_notification": template_notification_id } name = 'subscription_custom_email' description = 'Subscription for custom email' subscription = self.event_notifications_service.create_subscription( instance_id, name, destination_id=destination_id16, topic_id=topic_id, attributes=subscription_create_attributes_model, description=description ).get_result()
subscription_create_attributes_model = { "invited": ["+12064512559", "+12064512559"], } name = "subscription_custom_sms" description = "Subscription for custom sms" create_subscription_response = self.event_notifications_service.create_subscription( instance_id, name, destination_id=destination_id17, topic_id=topic_id, attributes=subscription_create_attributes_model, description=description, ).get_result()
Response
Subscription object
Subscription ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Subscription name
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z0-9-:_]*
Subscription description
Possible values: 1 ≤ length ≤ 255
Last updated time
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[0-9A-Z:]*
The type of destination
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
The destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z0-9-:_]*
Topic ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Topic name
Possible values: length ≤ 255, Value must match regular expression
[a-zA-Z0-9-:_]*
From Email ID (it will be displayed only in case of smtp_ibm destination type)
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z0-9-:_]*
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- Attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- Subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- Unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- Invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Status Code
Payload describing the Subscription
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate subscription
Request body type is not application/json
Internal server error
Unexpected Error
{ "attributes": { "signing_enabled": true, "add_notification_payload": true }, "description": "Subscribing destinations with Admin Topic Compliance", "destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9", "destination_name": "Admin email", "destination_type": "smtp_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "Admin Email Subscription Compliance", "topic_id": "966378be-5b02-41b6-9449-d71d7da5c247", "topic_name": "SCC Certificate ", "updated_at": "2021-08-20T10:08:46.060316Z" }
{ "attributes": { "signing_enabled": true, "add_notification_payload": true }, "description": "Subscribing destinations with Admin Topic Compliance", "destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9", "destination_name": "Admin email", "destination_type": "smtp_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "Admin Email Subscription Compliance", "topic_id": "966378be-5b02-41b6-9449-d71d7da5c247", "topic_name": "SCC Certificate ", "updated_at": "2021-08-20T10:08:46.060316Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "d7f5af42-d750-4316-bab0-92fea106a882", "status_code": 409, "errors": [ { "code": "subscription_conflict", "message": "Duplicate subscription name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "d7f5af42-d750-4316-bab0-92fea106a882", "status_code": 409, "errors": [ { "code": "subscription_conflict", "message": "Duplicate subscription name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all Subscriptions
List all Subscriptions
List all Subscriptions.
List all Subscriptions.
List all Subscriptions.
List all Subscriptions.
GET /v1/instances/{instance_id}/subscriptions
(eventNotifications *EventNotificationsV1) ListSubscriptions(listSubscriptionsOptions *ListSubscriptionsOptions) (result *SubscriptionList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListSubscriptionsWithContext(ctx context.Context, listSubscriptionsOptions *ListSubscriptionsOptions) (result *SubscriptionList, response *core.DetailedResponse, err error)
listSubscriptions(params)
list_subscriptions(self,
instance_id: str,
*,
offset: int = None,
limit: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SubscriptionList> listSubscriptions(ListSubscriptionsOptions listSubscriptionsOptions)
Request
Instantiate the ListSubscriptionsOptions
struct and set the fields to provide parameter values for the ListSubscriptions
method.
Use the ListSubscriptionsOptions.Builder
to create a ListSubscriptionsOptions
object that contains the parameter values for the listSubscriptions
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
offset for paginated results
Possible values: value ≥ 0
Default:
0
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListSubscriptions options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listSubscriptions options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/subscriptions"
listSubscriptionsOptions := eventNotificationsService.NewListSubscriptionsOptions( instanceID, ) subscriptionList, response, err := eventNotificationsService.ListSubscriptions(listSubscriptionsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(subscriptionList, "", " ") fmt.Println(string(b))
const params = { instanceId, }; let res; try { res = await eventNotificationsService.listSubscriptions(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
ListSubscriptionsOptions listSubscriptionsOptions = new ListSubscriptionsOptions.Builder() .instanceId(instanceId) .build(); Response<SubscriptionList> response = eventNotificationsService.listSubscriptions(listSubscriptionsOptions).execute(); SubscriptionList subscriptionList = response.getResult(); System.out.println(subscriptionList);
subscription_list = event_notifications_service.list_subscriptions( instance_id ).get_result() print(json.dumps(subscription_list, indent=2))
Response
Subscription list object
Number of subscriptions
Possible values: value ≥ 0
Current offset
limit to show subscriptions
List of subscriptions
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Subscription list object.
{
"total_count": 5,
"offset": 0,
"limit": 10,
"subscriptions": [
{
"destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"destination_name": "Developers Email destination",
"destination_type": "smtp_ibm",
"description": "Developers of EN",
"id": "60502ac0-5748-40b1-84b8-938b77f1c8d1",
"name": "Test subscription",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_name": "Admin sms destination",
"destination_type": "sms_ibm",
"description": "",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"topic_name": "Event Notification Admin encryption",
"updated_at": "2021-08-20T10:08:46.060316Z"
},
{
"destination_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"destination_name": "Slack Webhook",
"destination_type": "webhook",
"description": "Webhook to trigger slack",
"id": "d609a018-fbea-428b-82cc-bdfab514ae32",
"name": "Developers webhook",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-25T13:08:27.544581Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=10"
}
}
Number of subscriptions.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- Subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Subscription list object.
{
"total_count": 5,
"offset": 0,
"limit": 10,
"subscriptions": [
{
"destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"destination_name": "Developers Email destination",
"destination_type": "smtp_ibm",
"description": "Developers of EN",
"id": "60502ac0-5748-40b1-84b8-938b77f1c8d1",
"name": "Test subscription",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_name": "Admin sms destination",
"destination_type": "sms_ibm",
"description": "",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"topic_name": "Event Notification Admin encryption",
"updated_at": "2021-08-20T10:08:46.060316Z"
},
{
"destination_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"destination_name": "Slack Webhook",
"destination_type": "webhook",
"description": "Webhook to trigger slack",
"id": "d609a018-fbea-428b-82cc-bdfab514ae32",
"name": "Developers webhook",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-25T13:08:27.544581Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=10"
}
}
Number of subscriptions.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Subscription list object.
{
"total_count": 5,
"offset": 0,
"limit": 10,
"subscriptions": [
{
"destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"destination_name": "Developers Email destination",
"destination_type": "smtp_ibm",
"description": "Developers of EN",
"id": "60502ac0-5748-40b1-84b8-938b77f1c8d1",
"name": "Test subscription",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_name": "Admin sms destination",
"destination_type": "sms_ibm",
"description": "",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"topic_name": "Event Notification Admin encryption",
"updated_at": "2021-08-20T10:08:46.060316Z"
},
{
"destination_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"destination_name": "Slack Webhook",
"destination_type": "webhook",
"description": "Webhook to trigger slack",
"id": "d609a018-fbea-428b-82cc-bdfab514ae32",
"name": "Developers webhook",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-25T13:08:27.544581Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=10"
}
}
Number of subscriptions.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Subscription list object.
{
"total_count": 5,
"offset": 0,
"limit": 10,
"subscriptions": [
{
"destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a",
"destination_name": "Developers Email destination",
"destination_type": "smtp_ibm",
"description": "Developers of EN",
"id": "60502ac0-5748-40b1-84b8-938b77f1c8d1",
"name": "Test subscription",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69",
"destination_name": "Admin sms destination",
"destination_type": "sms_ibm",
"description": "",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "SMS Subscription on new change",
"topic_id": "7b23362d-6d48-47ef-847a-c8b291220306",
"topic_name": "Event Notification Admin encryption",
"updated_at": "2021-08-20T10:08:46.060316Z"
},
{
"destination_id": "11fe18ba-d0c8-4108-9f07-355e8052a813",
"destination_name": "Slack Webhook",
"destination_type": "webhook",
"description": "Webhook to trigger slack",
"id": "d609a018-fbea-428b-82cc-bdfab514ae32",
"name": "Developers webhook",
"topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701",
"topic_name": "Developers topic",
"updated_at": "2021-08-25T13:08:27.544581Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=10"
}
}
Number of subscriptions.
Possible values: value ≥ 0
Current offset.
limit to show subscriptions.
List of subscriptions.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }
- subscriptions
ID of the subscription.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Description of the subscription.
Possible values: 0 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
ID of the destination.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the destination.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]ID of the topic.
Possible values: 36 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the topic.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Last updated time of the subscription.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Payload describing the Subscription list
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "total_count": 5, "offset": 0, "limit": 10, "subscriptions": [ { "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }, { "destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "destination_name": "Admin sms destination", "destination_type": "sms_ibm", "description": "", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "SMS Subscription on new change", "topic_id": "7b23362d-6d48-47ef-847a-c8b291220306", "topic_name": "Event Notification Admin encryption", "updated_at": "2021-08-20T10:08:46.060316Z" }, { "destination_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "destination_name": "Slack Webhook", "destination_type": "webhook", "description": "Webhook to trigger slack", "id": "d609a018-fbea-428b-82cc-bdfab514ae32", "name": "Developers webhook", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-25T13:08:27.544581Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=10" } }
{ "total_count": 5, "offset": 0, "limit": 10, "subscriptions": [ { "destination_id": "b5cb3f03-ff12-42f3-9fae-37ee27f2a81a", "destination_name": "Developers Email destination", "destination_type": "smtp_ibm", "description": "Developers of EN", "id": "60502ac0-5748-40b1-84b8-938b77f1c8d1", "name": "Test subscription", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-18T09:50:32.133355Z" }, { "destination_id": "ec28efee-2236-4c2d-8839-d34f697cfc69", "destination_name": "Admin sms destination", "destination_type": "sms_ibm", "description": "", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "SMS Subscription on new change", "topic_id": "7b23362d-6d48-47ef-847a-c8b291220306", "topic_name": "Event Notification Admin encryption", "updated_at": "2021-08-20T10:08:46.060316Z" }, { "destination_id": "11fe18ba-d0c8-4108-9f07-355e8052a813", "destination_name": "Slack Webhook", "destination_type": "webhook", "description": "Webhook to trigger slack", "id": "d609a018-fbea-428b-82cc-bdfab514ae32", "name": "Developers webhook", "topic_id": "33d2b8d5-8ab8-46c7-97b9-c508afbf0701", "topic_name": "Developers topic", "updated_at": "2021-08-25T13:08:27.544581Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/subscriptions?limit=10&offset=10" } }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of a Subscription
Get details of a Subscription
Get details of a Subscription.
Get details of a Subscription.
Get details of a Subscription.
Get details of a Subscription.
GET /v1/instances/{instance_id}/subscriptions/{id}
(eventNotifications *EventNotificationsV1) GetSubscription(getSubscriptionOptions *GetSubscriptionOptions) (result *Subscription, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetSubscriptionWithContext(ctx context.Context, getSubscriptionOptions *GetSubscriptionOptions) (result *Subscription, response *core.DetailedResponse, err error)
getSubscription(params)
get_subscription(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Subscription> getSubscription(GetSubscriptionOptions getSubscriptionOptions)
Request
Instantiate the GetSubscriptionOptions
struct and set the fields to provide parameter values for the GetSubscription
method.
Use the GetSubscriptionOptions.Builder
to create a GetSubscriptionOptions
object that contains the parameter values for the getSubscription
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Subscription
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The getSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}"
getSubscriptionOptions := eventNotificationsService.NewGetSubscriptionOptions( instanceID, subscriptionID, ) subscription, response, err := eventNotificationsService.GetSubscription(getSubscriptionOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(subscription, "", " ") fmt.Println(string(b))
const params = { instanceId, id: subscriptionId, }; let res; try { res = await eventNotificationsService.getSubscription(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetSubscriptionOptions getSubscriptionOptions = new GetSubscriptionOptions.Builder() .instanceId(instanceId) .id(subscriptionId) .build(); Response<Subscription> response = eventNotificationsService.getSubscription(getSubscriptionOptions).execute(); Subscription subscription = response.getResult(); System.out.println(subscription);
subscription = event_notifications_service.get_subscription( instance_id, id=subscription_id ).get_result() print(json.dumps(subscription, indent=2))
Response
Subscription object
Subscription ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Subscription name
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z0-9-:_]*
Subscription description
Possible values: 1 ≤ length ≤ 255
Last updated time
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[0-9A-Z:]*
The type of destination
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
The destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z0-9-:_]*
Topic ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Topic name
Possible values: length ≤ 255, Value must match regular expression
[a-zA-Z0-9-:_]*
From Email ID (it will be displayed only in case of smtp_ibm destination type)
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z0-9-:_]*
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- Attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- Subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- Unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- Invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Status Code
Payload describing the Subscription
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "attributes": { "signing_enabled": true, "add_notification_payload": true }, "description": "Subscribing destinations with Admin Topic Compliance", "destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9", "destination_name": "Admin email", "destination_type": "smtp_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "Admin Email Subscription Compliance", "topic_id": "966378be-5b02-41b6-9449-d71d7da5c247", "topic_name": "SCC Certificate ", "updated_at": "2021-08-20T10:08:46.060316Z" }
{ "attributes": { "signing_enabled": true, "add_notification_payload": true }, "description": "Subscribing destinations with Admin Topic Compliance", "destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9", "destination_name": "Admin email", "destination_type": "smtp_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "Admin Email Subscription Compliance", "topic_id": "966378be-5b02-41b6-9449-d71d7da5c247", "topic_name": "SCC Certificate ", "updated_at": "2021-08-20T10:08:46.060316Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a Subscription
Delete a Subscription
Delete a Subscription.
Delete a Subscription.
Delete a Subscription.
Delete a Subscription.
DELETE /v1/instances/{instance_id}/subscriptions/{id}
(eventNotifications *EventNotificationsV1) DeleteSubscription(deleteSubscriptionOptions *DeleteSubscriptionOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteSubscriptionWithContext(ctx context.Context, deleteSubscriptionOptions *DeleteSubscriptionOptions) (response *core.DetailedResponse, err error)
deleteSubscription(params)
delete_subscription(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteSubscription(DeleteSubscriptionOptions deleteSubscriptionOptions)
Request
Instantiate the DeleteSubscriptionOptions
struct and set the fields to provide parameter values for the DeleteSubscription
method.
Use the DeleteSubscriptionOptions.Builder
to create a DeleteSubscriptionOptions
object that contains the parameter values for the deleteSubscription
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Subscription
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The deleteSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl -X DELETE --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}"
deleteSubscriptionOptions := eventNotificationsService.NewDeleteSubscriptionOptions( instanceID, subscriptionID, ) response, err := eventNotificationsService.DeleteSubscription(deleteSubscriptionOptions) if err != nil { panic(err) }
let params = { instanceId, id: subscriptionId, }; try { await eventNotificationsService.deleteSubscription(params); } catch (err) { console.warn(err); }
DeleteSubscriptionOptions deleteSubscriptionOptions = new DeleteSubscriptionOptions.Builder() .instanceId(instanceId) .id(subscriptionId) .build(); Response<Void> response = eventNotificationsService.deleteSubscription(deleteSubscriptionOptions).execute();
response = event_notifications_service.delete_subscription( instance_id, id=subscription_id )
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update details of a Subscription
Update details of a Subscription
Update details of a Subscription.
Update details of a Subscription.
Update details of a Subscription.
Update details of a Subscription.
PATCH /v1/instances/{instance_id}/subscriptions/{id}
(eventNotifications *EventNotificationsV1) UpdateSubscription(updateSubscriptionOptions *UpdateSubscriptionOptions) (result *Subscription, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) UpdateSubscriptionWithContext(ctx context.Context, updateSubscriptionOptions *UpdateSubscriptionOptions) (result *Subscription, response *core.DetailedResponse, err error)
updateSubscription(params)
update_subscription(self,
instance_id: str,
id: str,
*,
name: str = None,
description: str = None,
attributes: 'SubscriptionUpdateAttributes' = None,
**kwargs
) -> DetailedResponse
ServiceCall<Subscription> updateSubscription(UpdateSubscriptionOptions updateSubscriptionOptions)
Request
Instantiate the UpdateSubscriptionOptions
struct and set the fields to provide parameter values for the UpdateSubscription
method.
Use the UpdateSubscriptionOptions.Builder
to create a UpdateSubscriptionOptions
object that contains the parameter values for the updateSubscription
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for Subscription
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Subscription object
{
"name": "Admin Email Subscription Compliance",
"description": "Subscribing destinations with Admin Topic Compliance",
"attributes": {
"invited": {
"add": [
"example4@gmail.com"
],
"remove": [
"example4@gmail.com"
]
},
"subscribed": {
"remove": [
"example2@gmail.com"
]
},
"unsubscribed": {
"remove": [
"example1@ibm.com"
]
},
"add_notification_payload": true,
"reply_to_mail": "example@ibm.com",
"reply_to_name": "USA news",
"from_name": "IBM",
"from_email": "test@email.com"
}
}
Name of the subscription
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9-:_]*
Description of the subscription
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9-:_]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Description of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- Attributes
The email ids or phone numbers.
- Invited
The email ids or phone numbers to be invited.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers for removal.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- Subscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- Unsubscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Description of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The email ids or phone numbers.
- invited
The email ids or phone numbers to be invited.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers for removal.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- subscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- unsubscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Description of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The email ids or phone numbers.
- invited
The email ids or phone numbers to be invited.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers for removal.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- subscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- unsubscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The updateSubscription options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for Subscription.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Name of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Description of the subscription.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The email ids or phone numbers.
- invited
The email ids or phone numbers to be invited.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers for removal.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- subscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
The email ids or phone numbers.
- unsubscribed
The email ids or phone numbers to be unsubscribed.
Possible values: 0 ≤ number of items ≤ 100, 1 ≤ length ≤ 150, Value must match regular expression
/.*/
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "Webhook subscription", "description": "This is for webhook subscription", "topic_id" : "3cf935e4-61a8-4d15-bf70-cc7275a1c2f1", "attributes" :{ "signing_enabled": true , "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13" } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "Email Subscription", "description": "This is for email subscription", "topic_id" : "6310cfe7-6645-4933-a6ba-01a9e5cd8919", "attributes": { "add_notification_payload": false, "from_name": "IxxxxxxP", "reply_to_mail": "axxxxxxxxx@ibm.com", "reply_to_name": "AxxxxxxxxxxN", "invited": { "add":["pxxxxxxx@ibm.com", "rxxxxxxx@vc.in"], "remove": ["ixxxxx@ibm.com"] }, "subscribed": { "remove": ["Dxxxxx@ibm.com"] }, "unsubscribed": { "remove": ["oxxxxx@ibm.com"] } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "SMS Subscription", "description": "This is for sms subscription", "topic_id" : "6310cfe7-6645-4933-a6ba-01a9e5cd8919", "attributes": { "to": { "add":["+91xxxxxxxxx", "+1xxxxxxxxx8"], "remove": ["+2xxxxxxxxx7"] }, "unsubscribed": { "remove": ["+91xxxxxxxx8"] } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "Push Subscription", "description": "This is for a push subscription", "topic_id" : "0febb541-dbe5-4bce-9f01-deaa00efc34e" }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "Slack subscription", "description": "This is for slack susbcripion", "topic_id" : "9e156484-601e-4ed3-941b-48af3d58af64", "attributes" :{ "attachment_color": "#12345" , "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13" } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "Slack DM subscription", "description": "This is for slack DM susbcripion", "topic_id" : "9e156484-601e-4ed3-941b-48af3d58af64", "attributes" :{ "channels": [{"id":"B9013WO3XX4H", "operation":"add"},{"id":"B9013WO3XX4H", "operation":"remove"}] , "template_id_notification": "a59f6e38-7a48-xxxx-b665-3724afc58b13" } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "pagerduty Subscription", "description": "This is for a pagerduty subscription", "topic_id" : "0febb541-dbe5-4bce-9f01-deaa00efc34e" }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "ServiceNow Subscription", "description": "This is for a ServiceNow subscription", "topic_id" : "0febb541-dbe5-4bce-9f01-deaa00efc34e", "destination_id": "af644cfc-bee5-40be-9aa1-4aae58903064", "attributes" :{ "assigned_to": "user" , "assignment_group": "group" } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "Email Subscription", "description": "This is for email subscription", "topic_id" : "6310cfe7-6645-xxxx-a6ba-01a9e5cd8919", "attributes": { "add_notification_payload": false, "from_name": "IxxxxxxP", "from_email": "IxxxxxxP@abc.com", "template_id_notification": "a59f6e38-7a48-0000-0000-3724afc5aaaa", "template_id_invitation": "a59f6e38-7a48-0000-0000-3724afc5aaaa", "reply_to_mail": "axxxxxxxxx@ibm.com", "reply_to_name": "AxxxxxxxxxxN", "invited": { "add":["pxxxxxxx@ibm.com", "rxxxxxxx@vc.in"], "remove": ["ixxxxx@ibm.com"] }, "subscribed": { "remove": ["Dxxxxx@ibm.com"] }, "unsubscribed": { "remove": ["oxxxxx@ibm.com"] } } }'
curl -X PATCH --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/subscriptions/{id}" --data '{ "name": "Custom SMS Subscription", "description": "This is for custom sms subscription", "topic_id" : "6310cfe7-6645-4933-a6ba-01a9e5cd8919", "attributes": { "invited": { "add":["+91xxxxxxxxx", "+1xxxxxxxxx8"], "remove": ["+2xxxxxxxxx7"] }, "subscribed": { "remove": ["+2xxxxxxxxx7"] }, "unsubscribed": { "remove": ["+91xxxxxxxx8"] } } }'
webSubscriptionUpdateAttributesModel := &eventnotificationsv1.SubscriptionUpdateAttributesWebhookAttributes{ SigningEnabled: core.BoolPtr(true), TemplateIDNotification: core.StringPtr(webhookTemplateID), } webName := core.StringPtr("Webhook_sub_updated") webDescription := core.StringPtr("Update Webhook subscription") webUpdateSubscriptionOptions := &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(subscriptionID3), Name: webName, Description: webDescription, Attributes: webSubscriptionUpdateAttributesModel, } subscription, response, err = eventNotificationsService.UpdateSubscription(webUpdateSubscriptionOptions)
UpdateAttributesInvitedModel := new(eventnotificationsv1.UpdateAttributesInvited) UpdateAttributesInvitedModel.Add = []string{"tester4@ibm.com"} UpdateAttributessubscribedModel := new(eventnotificationsv1.UpdateAttributesSubscribed) UpdateAttributessubscribedModel.Remove = []string{"tester3@ibm.com"} UpdateAttributesUnSubscribedModel := new(eventnotificationsv1.UpdateAttributesUnsubscribed) UpdateAttributesUnSubscribedModel.Remove = []string{"tester3@ibm.com"} subscriptionUpdateEmailAttributesModel := &eventnotificationsv1.SubscriptionUpdateAttributesEmailUpdateAttributes{ Invited: UpdateAttributesInvitedModel, AddNotificationPayload: core.BoolPtr(true), ReplyToMail: core.StringPtr("testerreply@gmail.com"), ReplyToName: core.StringPtr("rester_reply"), FromName: core.StringPtr("Test IBM email"), Subscribed: UpdateAttributessubscribedModel, Unsubscribed: UpdateAttributesUnSubscribedModel, } name := core.StringPtr("subscription_email") description := core.StringPtr("Subscription for email") updateSubscriptionOptions = &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: name, Description: description, ID: core.StringPtr(subscriptionID2), Attributes: subscriptionUpdateEmailAttributesModel, } subscription, response, err = eventNotificationsService.UpdateSubscription(updateSubscriptionOptions)
UpdateAttributesSMSInvitedModel := new(eventnotificationsv1.UpdateAttributesInvited) UpdateAttributesSMSInvitedModel.Add = []string{"+12064512559"} UpdateAttributesSMSSubscribedModel := new(eventnotificationsv1.UpdateAttributesSubscribed) UpdateAttributesSMSSubscribedModel.Remove = []string{"+12064512559"} UpdateAttributesSMSUnSubscribedModel := new(eventnotificationsv1.UpdateAttributesUnsubscribed) UpdateAttributesSMSUnSubscribedModel.Remove = []string{"+12064512559"} subscriptionUpdateSMSAttributesModel := &eventnotificationsv1.SubscriptionUpdateAttributesSmsUpdateAttributes{ Invited: UpdateAttributesSMSInvitedModel, Subscribed: UpdateAttributesSMSSubscribedModel, Unsubscribed: UpdateAttributesSMSUnSubscribedModel, } smsName := core.StringPtr("subscription_sms_update") smsDescription := core.StringPtr("Subscription update for sms") updateSubscriptionOptions = &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: smsName, Description: smsDescription, ID: core.StringPtr(subscriptionID1), Attributes: subscriptionUpdateSMSAttributesModel, } subscription, response, err = eventNotificationsService.UpdateSubscription(updateSubscriptionOptions)
subscriptionUpdateSlackAttributesModel := &eventnotificationsv1.SubscriptionUpdateAttributesSlackAttributes{ AttachmentColor: core.StringPtr("#0000FF"), TemplateIDNotification: core.StringPtr(slackTemplateID), } slackName := core.StringPtr("subscription_slack_update") slackDescription := core.StringPtr("Subscription update for slack") updateSlackSubscriptionOptions := &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: slackName, Description: slackDescription, ID: core.StringPtr(subscriptionID5), Attributes: subscriptionUpdateSlackAttributesModel, } subscription, response, err = eventNotificationsService.UpdateSubscription(updateSlackSubscriptionOptions)
slackDirectMessageChannel := &eventnotificationsv1.ChannelUpdateAttributes{ ID: core.StringPtr(slackChannelID), Operation: core.StringPtr("add"), } subscriptionUpdateSlackDMAttributesModel := &eventnotificationsv1.SubscriptionUpdateAttributesSlackDirectMessageUpdateAttributes{ Channels: []eventnotificationsv1.ChannelUpdateAttributes{*slackDirectMessageChannel}, TemplateIDNotification: core.StringPtr(slackTemplateID), } slackDMName := core.StringPtr("subscription_slack_DM_update") slackDMDescription := core.StringPtr("Subscription update for slack DM") updateSlackDMSubscriptionOptions := &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: slackDMName, Description: slackDMDescription, ID: core.StringPtr(subscriptionID8), Attributes: subscriptionUpdateSlackDMAttributesModel, } subscription, response, err = eventNotificationsService.UpdateSubscription(updateSlackDMSubscriptionOptions)
updateSubscriptionOptions := eventNotificationsService.NewUpdateSubscriptionOptions( instanceID, subscriptionID, ) updateSubscriptionOptions.SetDescription("Update Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Huawei subscription") updateSubscriptionOptions.SetName("Update_Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei subscription") subscription, response, err := eventNotificationsService.UpdateSubscription(updateSubscriptionOptions)
serviceNowName := core.StringPtr("subscription_Service_Now_update") serviceNowDescription := core.StringPtr("Subscription update for Service_Now") updateServiceNowSubscriptionOptions := &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: serviceNowName, Description: serviceNowDescription, ID: core.StringPtr(subscriptionID4), Attributes: &eventnotificationsv1.SubscriptionUpdateAttributesServiceNowAttributes{ AssignedTo: core.StringPtr("user"), AssignmentGroup: core.StringPtr("test"), }, } subscription, response, err = eventNotificationsService.UpdateSubscription(updateServiceNowSubscriptionOptions)
UpdateAttributesCustomInvitedModel := new(eventnotificationsv1.UpdateAttributesInvited) UpdateAttributesCustomInvitedModel.Add = []string{"abc@gmail.com", "tester3@ibm.com"} UpdateAttributesCustomSubscribedModel := new(eventnotificationsv1.UpdateAttributesSubscribed) UpdateAttributesCustomSubscribedModel.Remove = []string{"tester3@ibm.com"} UpdateAttributesCustomUnSubscribedModel := new(eventnotificationsv1.UpdateAttributesUnsubscribed) UpdateAttributesCustomUnSubscribedModel.Remove = []string{"tester3@ibm.com"} subscriptionUpdateCustomEmailAttributesModel := &eventnotificationsv1.SubscriptionUpdateAttributesCustomEmailUpdateAttributes{ Invited: UpdateAttributesCustomInvitedModel, AddNotificationPayload: core.BoolPtr(true), ReplyToMail: core.StringPtr("testerreply@gmail.com"), ReplyToName: core.StringPtr("rester_reply"), FromName: core.StringPtr("Test IBM email"), FromEmail: core.StringPtr("test@abc.event-notifications.test.cloud.ibm.com"), Subscribed: UpdateAttributesCustomSubscribedModel, Unsubscribed: UpdateAttributesCustomUnSubscribedModel, TemplateIDInvitation: core.StringPtr(templateInvitationID), TemplateIDNotification: core.StringPtr(templateNotificationID), } customEmailName := core.StringPtr("subscription_custom_email_update") CustomEmailDescription := core.StringPtr("Subscription update for custom email") updateSubscriptionOptions = &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: customEmailName, Description: CustomEmailDescription, ID: core.StringPtr(subscriptionID6), Attributes: subscriptionUpdateCustomEmailAttributesModel, } subscription, response, err = eventNotificationsService.UpdateSubscription(updateSubscriptionOptions)
UpdateAttributesCustomSMSInvitedModel := new(eventnotificationsv1.UpdateAttributesInvited) UpdateAttributesCustomSMSInvitedModel.Add = []string{"+12064512559"} UpdateAttributesCustomSMSSubscribedModel := new(eventnotificationsv1.UpdateAttributesSubscribed) UpdateAttributesCustomSMSSubscribedModel.Remove = []string{"+12064512559"} UpdateAttributesCustomSMSUnSubscribedModel := new(eventnotificationsv1.UpdateAttributesUnsubscribed) UpdateAttributesCustomSMSUnSubscribedModel.Remove = []string{"+12064512559"} subscriptionUpdateCustomSMSAttributesModel := &eventnotificationsv1.SubscriptionUpdateAttributesCustomSmsUpdateAttributes{ Invited: UpdateAttributesSMSInvitedModel, Subscribed: UpdateAttributesSMSSubscribedModel, Unsubscribed: UpdateAttributesSMSUnSubscribedModel, } customSMSName := core.StringPtr("subscription_custom_sms_update") customSMSDescription := core.StringPtr("Subscription update for custom sms") updateSubscriptionOptions = &eventnotificationsv1.UpdateSubscriptionOptions{ InstanceID: core.StringPtr(instanceID), Name: customSMSName, Description: customSMSDescription, ID: core.StringPtr(subscriptionID7), Attributes: subscriptionUpdateCustomSMSAttributesModel, } subscription, response, err = eventNotificationsService.UpdateSubscription(updateSubscriptionOptions)
const subscriptionUpdateAttributesModel = { signing_enabled: true, template_id_notification: webhookTemplateID, }; name = 'webhook_sub_updated'; description = 'Update webhook subscription'; params = { instanceId, id: subscriptionId3, name, description, attributes: subscriptionUpdateAttributesModel, }; res = await eventNotificationsService.updateSubscription(params);
const smSupdateAttributesInvited = { add: ['tester4@ibm.com'], }; const smsUpdateAttributesToRemove = { remove: ['tester3@ibm.com'], }; const subscriptionUpdateAttributesModelSecond = { invited: smSupdateAttributesInvited, add_notification_payload: true, reply_to_mail: 'tester1@gmail.com', reply_to_name: 'US news', from_name: 'IBM', subscribed: smsUpdateAttributesToRemove, unsubscribed: smsUpdateAttributesToRemove, }; let name = 'subscription_email'; let description = 'Subscription for email'; params = { instanceId, name, id: subscriptionId2, attributes: subscriptionUpdateAttributesModelSecond, description, }; res = await eventNotificationsService.updateSubscription(params);
const smsUpdateAttributesInvited = { add: ['+12064512559'], }; const smsUpdateAttributesToRemove = { remove: ['+12064512559'], }; const subscriptionUpdateAttributesModelSMS = { invited: smsUpdateAttributesInvited, subscribed: smsUpdateAttributesToRemove, unsubscribed: smsUpdateAttributesToRemove, }; const nameSMS = 'subscription_sms_update'; const descriptionSMS = 'Subscription for sms update'; params = { instanceId, name: nameSMS, id: subscriptionId1, attributes: subscriptionUpdateAttributesModelSMS, description: descriptionSMS, }; const resSMS = await eventNotificationsService.updateSubscription(params);
name = 'slack subscription update'; description = 'Subscription for the slack update'; params = { instanceId, name, id: subscriptionId5, description, attributes: { attachment_color: '#0000FF', template_id_notification: slackTemplateID, }, }; res = await eventNotificationsService.updateSubscription(params);
const channelUpdateAttribute = { id: slackChannelID, operation: 'add', }; const channelDetails = [channelUpdateAttribute]; name = 'slack DM subscription update'; description = 'Subscription for the slack DM update'; params = { instanceId, id: subscriptionId8, name, description, attributes: { channels: channelDetails, template_id_notification: slackTemplateID, }, }; res = await eventNotificationsService.updateSubscription(params);
let subscriptionName = 'subscription_Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei'; let subscriptionDescription = 'Subscription for Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine update/Cloud Object Storage/Huawei'; let params = { instanceId, id: subscriptionId, name: subscriptionName, description: subscriptionDescription, }; let res = await eventNotificationsService.updateSubscription(params);
const subscriptionSNowCreateAttributesModel = { assigned_to: 'user', assignment_group: 'group', }; name = 'Service Now subscription update'; description = 'Subscription for the Service Now update'; params = { instanceId, name, id: subscriptionId4, description, attributes: subscriptionSNowCreateAttributesModel, }; res = await eventNotificationsService.updateSubscription(params);
const customeEmailUpdateAttributesInvited = { add: ['abc@gmail.com'], }; const customEmailUpdateAttributesToRemove = { remove: ['tester3@ibm.com'], }; const subscriptionUpdateCustomAttributesModel = { invited: customeEmailUpdateAttributesInvited, add_notification_payload: true, reply_to_mail: 'abc@gmail.com', reply_to_name: 'US news', from_name: 'IBM', from_email: 'test@xyz.event-notifications.test.cloud.ibm.com', subscribed: customEmailUpdateAttributesToRemove, unsubscribed: customEmailUpdateAttributesToRemove, }; const customEmailName = 'subscription_custom_email_updated'; const customEmailDescription = 'Subscription for custom email updated'; const customParams = { instanceId, name: customEmailName, id: subscriptionId6, attributes: subscriptionUpdateCustomAttributesModel, description: customEmailDescription, }; res = await eventNotificationsService.updateSubscription(customParams);
const customSMSUpdateAttributesInvited = { add: ['+12064512559'], }; const customSMSUpdateAttributesToRemove = { remove: ['+12064512559'], }; const SubscriptionUpdateAttributesCustomSMSUpdateAttributes = { invited: customSMSUpdateAttributesInvited, subscribed: customSMSUpdateAttributesToRemove, unsubscribed: customSMSUpdateAttributesToRemove, }; const nameCustomSMS = 'subscription_custom_sms_update'; const descriptionCustomSMS = 'Subscription for sms update'; params = { instanceId, name: nameCustomSMS, id: subscriptionId7, attributes: SubscriptionUpdateAttributesCustomSMSUpdateAttributes, description: descriptionCustomSMS, }; res = await eventNotificationsService.updateSubscription(params);
SubscriptionUpdateAttributesWebhookAttributes subscriptionUpdateWebAttributesModel = new SubscriptionUpdateAttributesWebhookAttributes.Builder() .signingEnabled(true) .templateIdNotification(webhookTemplateID) .build(); String webName = "web_sub_updated"; String webDescription = "Update web subscription"; UpdateSubscriptionOptions webUpdateSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .id(subscriptionId3) .name(webName) .description(webDescription) .attributes(subscriptionUpdateWebAttributesModel) .build(); // Invoke operation Response<Subscription> webResponse = eventNotificationsService.updateSubscription(webUpdateSubscriptionOptions).execute(); Subscription webSubscriptionResult = webResponse.getResult(); System.out.println(webSubscriptionResult);
ArrayList<String> toRemove = new ArrayList<String>(); toRemove.add("tester3@ibm.com"); ArrayList<String> toInvite = new ArrayList<String>(); toInvite.add("tester4@ibm.com"); UpdateAttributesSubscribed subscribed = new UpdateAttributesSubscribed.Builder() .remove(toRemove) .build(); UpdateAttributesUnsubscribed unSubscribed = new UpdateAttributesUnsubscribed.Builder() .remove(toRemove) .build(); UpdateAttributesInvited invited = new UpdateAttributesInvited.Builder() .add(toInvite) .build(); SubscriptionUpdateAttributesEmailUpdateAttributes subscriptionUpdateEmailAttributesModel = new SubscriptionUpdateAttributesEmailUpdateAttributes.Builder() .addNotificationPayload(true) .invited(invited) .replyToMail("reply_to_mail@us.com") .replyToName("US News") .fromName("IBM") .subscribed(subscribed) .unsubscribed(unSubscribed) .build(); name = "email subscription"; description = "subscription_update for email"; updateSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .name(name) .id(subscriptionId2) .attributes(subscriptionUpdateEmailAttributesModel) .description(description) .build(); response = eventNotificationsService.updateSubscription(updateSubscriptionOptions).execute(); subscription = response.getResult();
ArrayList<String> toPhRemove = new ArrayList<String>(); toPhRemove.add("+12064512559"); ArrayList<String> toPhInvite = new ArrayList<String>(); toPhInvite.add("+12064512559"); UpdateAttributesSubscribed phSubscribed = new UpdateAttributesSubscribed.Builder() .remove(toPhRemove) .build(); UpdateAttributesUnsubscribed phUnSubscribed = new UpdateAttributesUnsubscribed.Builder() .remove(toPhRemove) .build(); UpdateAttributesInvited phInvited = new UpdateAttributesInvited.Builder() .add(toPhInvite) .build(); SubscriptionUpdateAttributesSMSUpdateAttributes subscriptionUpdateSMSAttributesModel = new SubscriptionUpdateAttributesSMSUpdateAttributes.Builder() .invited(phInvited) .subscribed(phSubscribed) .unsubscribed(phUnSubscribed) .build(); String smsName = "sms subscription update"; String smsDescription = "subscription_update for sms"; UpdateSubscriptionOptions smsUpdateSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .name(smsName) .id(subscriptionId1) .attributes(subscriptionUpdateSMSAttributesModel) .description(smsDescription) .build(); Response<Subscription> smsResponse = eventNotificationsService.updateSubscription(smsUpdateSubscriptionOptions).execute(); Subscription smsSubscriptionResult = smsResponse.getResult();
String slackName = "subscription_slack_update"; String slackDescription = "Subscription slack update"; SubscriptionUpdateAttributesSlackAttributes slackUpdateAttributes = new SubscriptionUpdateAttributesSlackAttributes.Builder() .attachmentColor("#0000FF") .templateIdNotification(slackTemplateID) .build(); UpdateSubscriptionOptions updateSlackSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .id(subscriptionId5) .name(slackName) .description(slackDescription) .attributes(slackUpdateAttributes) .build(); // Invoke operation Response<Subscription> slackResponse = eventNotificationsService.updateSubscription(updateSlackSubscriptionOptions).execute(); Subscription slackSubscriptionResult = slackResponse.getResult();
String slackDMName = "subscription_slack DM"; String slackDMDescription = "Subscription for slack DM"; ChannelUpdateAttributes channel = new ChannelUpdateAttributes.Builder() .id(slackChannelID) .operation("add") .build(); List<ChannelUpdateAttributes> channels = new ArrayList<>(); channels.add(channel); SubscriptionUpdateAttributesSlackDirectMessageUpdateAttributes slackDMUpdateAttributes = new SubscriptionUpdateAttributesSlackDirectMessageUpdateAttributes.Builder() .channels(channels) .templateIdNotification(slackTemplateID) .build(); UpdateSubscriptionOptions updateSlackDMSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .name(slackDMName) .id(subscriptionId8) .description(slackDMDescription) .attributes(slackDMUpdateAttributes) .build(); Response<Subscription> slackDMResponse = eventNotificationsService.updateSubscription(updateSlackDMSubscriptionOptions).execute(); Subscription slackDMSubscriptionResult = slackDMResponse.getResult();
String name = "Android/IOS/Chrome/Firefox/Safari, MSTeams, PagerDuty, CodeEngine, Cloud Object Storage,Huawei updated"; String description = "Update Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei subscription"; UpdateSubscriptionOptions updateSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .id(subscriptionId) .name(name) .description(description) .build(); Response<Subscription> response = eventNotificationsService.updateSubscription(updateSubscriptionOptions).execute(); Subscription subscription = response.getResult();
String sNowName = "subscription_Service_Now_update"; String sNowDescription = "Subscription Service Now update"; SubscriptionUpdateAttributesServiceNowAttributes sNowAttributes = new SubscriptionUpdateAttributesServiceNowAttributes.Builder() .assignedTo("user") .assignmentGroup("group") .build(); UpdateSubscriptionOptions updateSNowSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .id(subscriptionId4) .name(sNowName) .description(sNowDescription) .attributes(sNowAttributes) .build(); // Invoke operation Response<Subscription> sNowResponse = eventNotificationsService.updateSubscription(updateSNowSubscriptionOptions).execute(); Subscription sNowSubscriptionResult = sNowResponse.getResult();
ArrayList<String> toCustomRemove = new ArrayList<String>(); toCustomRemove.add("tester3@ibm.com"); ArrayList<String> toCustomInvite = new ArrayList<String>(); toCustomInvite.add("tester4@ibm.com"); UpdateAttributesSubscribed customSubscribed = new UpdateAttributesSubscribed.Builder() .remove(toCustomRemove) .build(); UpdateAttributesUnsubscribed customUnSubscribed = new UpdateAttributesUnsubscribed.Builder() .remove(toCustomRemove) .build(); UpdateAttributesInvited customInvited = new UpdateAttributesInvited.Builder() .add(toCustomInvite) .build(); SubscriptionUpdateAttributesCustomEmailUpdateAttributes subscriptionUpdateCustomEmailAttributesModel = new SubscriptionUpdateAttributesCustomEmailUpdateAttributes.Builder() .addNotificationPayload(true) .invited(customInvited) .replyToMail("abc@gmail.com") .replyToName("US News") .fromName("IBM") .fromEmail("test@abc.event-notifications.test.cloud.ibm.com") .templateIdInvitation(templateInvitationID) .templateIdNotification(templateNotificationID) .subscribed(customSubscribed) .unsubscribed(customUnSubscribed) .build(); String customEmailName = "Custom email subscription"; String customEmailDescription = "subscription_update for Custom email"; UpdateSubscriptionOptions customEmailUpdateSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .name(customEmailName) .id(subscriptionId6) .attributes(subscriptionUpdateCustomEmailAttributesModel) .description(customEmailDescription) .build(); Response<Subscription> customEmailResponse = eventNotificationsService.updateSubscription(customEmailUpdateSubscriptionOptions).execute(); Subscription customEmailSubscriptionResult = customEmailResponse.getResult();
ArrayList<String> toCustomPhRemove = new ArrayList<String>(); toCustomPhRemove.add("+12064512559"); ArrayList<String> toCustomPhInvite = new ArrayList<String>(); toCustomPhInvite.add("+12064512559"); UpdateAttributesSubscribed customPhSubscribed = new UpdateAttributesSubscribed.Builder() .remove(toCustomPhRemove) .build(); UpdateAttributesUnsubscribed customPhUnSubscribed = new UpdateAttributesUnsubscribed.Builder() .remove(toCustomPhRemove) .build(); UpdateAttributesInvited customPhInvited = new UpdateAttributesInvited.Builder() .add(toCustomPhInvite) .build(); SubscriptionUpdateAttributesCustomSMSUpdateAttributes subscriptionUpdateCustomSMSAttributesModel = new SubscriptionUpdateAttributesCustomSMSUpdateAttributes.Builder() .invited(customPhInvited) .subscribed(customPhSubscribed) .unsubscribed(customPhUnSubscribed) .build(); String customSMSName = "custom sms subscription update"; String customSMSDescription = "custom subscription_update for sms"; UpdateSubscriptionOptions customSMSUpdateSubscriptionOptions = new UpdateSubscriptionOptions.Builder() .instanceId(instanceId) .name(customSMSName) .id(subscriptionId7) .attributes(subscriptionUpdateCustomSMSAttributesModel) .description(customSMSDescription) .build(); Response<Subscription> customSMSResponse = eventNotificationsService.updateSubscription(customSMSUpdateSubscriptionOptions).execute(); Subscription customSMSSubscriptionResult = customSMSResponse.getResult();
subscription_update_attributes_model = { 'signing_enabled': True, 'template_id_notification': webhook_template_id, } name = 'Webhook_sub_updated' description = 'Update Webhook subscription' update_subscription_response = event_notifications_service.update_subscription( instance_id, id=subscription_id3, name=name, description=description, attributes=subscription_update_attributes_model ) subscription_response = update_subscription_response.get_result()
email_update_attributes_invite_model = {'add': ['tester4@ibm.com']} email_update_attributes_toremove_model = {'remove': ['tester3@ibm.com']} subscription_update_attributes_model = { 'invited': email_update_attributes_invite_model, 'add_notification_payload': True, "reply_to_mail": "reply_to_mail@us.com", "reply_to_name": "US News", "from_name": "IBM", "subscribed": email_update_attributes_toremove_model, "unsubscribed": email_update_attributes_toremove_model } name = 'subscription_email update' description = 'Subscription for email updated' update_subscription_response = event_notifications_service.update_subscription( instance_id, id=subscription_id2, name=name, description=description, attributes=subscription_update_attributes_model, ) subscription_response = update_subscription_response.get_result()
sms_update_attributes_invite_model = {'add': ['+12064512559']} sms_update_attributes_toremove_model = {'remove': ['+12064512559']} subscription_update_attributes_model = { 'invited': sms_update_attributes_invite_model, "subscribed": sms_update_attributes_toremove_model, "unsubscribed": sms_update_attributes_toremove_model } name = 'subscription_sms update' description = 'Subscription for sms updated' subscription = self.event_notifications_service.update_subscription( instance_id, id=subscription_id1, name=name, description=description, attributes=subscription_update_attributes_model, ).get_result()
name = 'Slack update' description = 'Subscription for slack updated' subscription_update_attributes_model = { 'attachment_color': '#0000FF', 'template_id_notification': slack_template_id, } update_subscription_response = self.event_notifications_service.update_subscription( instance_id, id=subscription_id5, name=name, description=description, attributes=subscription_update_attributes_model, ) subscription_response = update_subscription_response.get_result()
name = "Slack DM subscription update" description = "Subscription for slack DM updated" channel_update_attributes_model_array = [{'id': slack_channel_id, 'operation': 'add'}] subscription_update_attributes_model_json = { 'channels': channel_update_attributes_model_array, 'template_id_notification': slack_template_id, } subscription_update_attributes_model = ( SubscriptionUpdateAttributesSlackDirectMessageUpdateAttributes.from_dict( subscription_update_attributes_model_json ) ) update_subscription_response = self.event_notifications_service.update_subscription( instance_id, id=subscription_id8, name=name, description=description, attributes=subscription_update_attributes_model, ) subscription_response = update_subscription_response.get_result()
name = 'subscription_Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngine/Cloud Object Storage/Huawei_update' description = 'Subscription for Android/IOS/Chrome/Firefox/Safari/MSTeams/PagerDuty/CodeEngineCloud Object Storage/Huawei update' subscription = event_notifications_service.update_subscription( instance_id, id=subscription_id, name=name, description=description, ).get_result()
subscription_update_attributes_model = { 'assigned_to': 'user', 'assignment_group': 'group', } name = 'ServiceNow update' description = 'Subscription for ServiceNow updated' update_subscription_response = self.event_notifications_service.update_subscription( instance_id, id=subscription_id4, name=name, description=description, attributes=subscription_update_attributes_model, ) subscription_response = update_subscription_response.get_result()
custom_email_update_attributes_invite_model = {'add': ['tester4@ibm.com', 'abc@gmail.com']} custom_email_update_attributes_to_remove_model = {'remove': ['tester3@ibm.com']} subscription_update_attributes_model = { 'invited': custom_email_update_attributes_invite_model, 'add_notification_payload': True, "reply_to_mail": "reply_to_mail@us.com", "reply_to_name": "US News", "from_name": "IBM", "from_email": "test@abc.event-notifications.test.cloud.ibm.com", "subscribed": custom_email_update_attributes_to_remove_model, "unsubscribed": custom_email_update_attributes_to_remove_model "template_id_invitation": template_invitation_id, "template_id_notification": template_notification_id } name = 'subscription_custom_email update' description = 'Subscription for custom email updated' update_subscription_response = self.event_notifications_service.update_subscription( instance_id, id=subscription_id6, name=name, description=description, attributes=subscription_update_attributes_model, ) subscription_response = update_subscription_response.get_result()
sms_update_attributes_invite_model = {"add": ["+12064512559"]} sms_update_attributes_to_remove_model = {"remove": ["+12064512559"]} subscription_update_attributes_model = { "invited": sms_update_attributes_invite_model, "subscribed": sms_update_attributes_to_remove_model, "unsubscribed": sms_update_attributes_to_remove_model, } name = "subscription_custom_sms update" description = "Subscription for custom sms updated" update_subscription_response = self.event_notifications_service.update_subscription( instance_id, id=subscription_id7, name=name, description=description, attributes=subscription_update_attributes_model, ) subscription_response = update_subscription_response.get_result()
Response
Subscription object
Subscription ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Subscription name
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z0-9-:_]*
Subscription description
Possible values: 1 ≤ length ≤ 255
Last updated time
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[0-9A-Z:]*
The type of destination
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
The destination name
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
[a-zA-Z0-9-:_]*
Topic ID
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Topic name
Possible values: length ≤ 255, Value must match regular expression
[a-zA-Z0-9-:_]*
From Email ID (it will be displayed only in case of smtp_ibm destination type)
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
[a-zA-Z0-9-:_]*
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- Attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- Subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- Unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- Invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Subscription object.
{
"attributes": {
"signing_enabled": true,
"add_notification_payload": true
},
"description": "Subscribing destinations with Admin Topic Compliance",
"destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9",
"destination_name": "Admin email",
"destination_type": "smtp_ibm",
"id": "87bef75e-f826-4aa9-b64d-91af9be5e12b",
"name": "Admin Email Subscription Compliance",
"topic_id": "966378be-5b02-41b6-9449-d71d7da5c247",
"topic_name": "SCC Certificate ",
"updated_at": "2021-08-20T10:08:46.060316Z"
}
Subscription ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Subscription name.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Subscription description.
Possible values: 1 ≤ length ≤ 255
Last updated time.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[0-9A-Z:]*/
From Email ID (it will be displayed only in case of smtp_ibm destination type).
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-zA-Z0-9-:_]*/
The type of destination.
Possible values: [
sms_ibm
,smtp_ibm
,webhook
,push_android
,push_ios
,push_chrome
,push_firefox
,slack
,ibmce
,pagerduty
,push_safari
,msteams
,servicenow
,ibmcos
,push_huawei
,smtp_custom
,sms_custom
]Possible values: length ≥ 1
The destination ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The destination name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
Topic ID.
Possible values: 1 ≤ length ≤ 150, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Topic name.
Possible values: length ≤ 255, Value must match regular expression
/[a-zA-Z0-9-:_]*/
SMS attributes object.
- attributes
The subscribed list.
Possible values: 0 ≤ number of items ≤ 100
- subscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The unsubscribe list.
Possible values: 0 ≤ number of items ≤ 100
- unsubscribed
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
The SMS numder string.
Possible values: 0 ≤ number of items ≤ 100
- invited
Phone number.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
last updated time.
time of expiration.
Status Code
Payload describing the Subscription
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate subscription
Request body type is not application/json
Internal server error
Unexpected Error
{ "attributes": { "signing_enabled": true, "add_notification_payload": true }, "description": "Subscribing destinations with Admin Topic Compliance", "destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9", "destination_name": "Admin email", "destination_type": "smtp_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "Admin Email Subscription Compliance", "topic_id": "966378be-5b02-41b6-9449-d71d7da5c247", "topic_name": "SCC Certificate ", "updated_at": "2021-08-20T10:08:46.060316Z" }
{ "attributes": { "signing_enabled": true, "add_notification_payload": true }, "description": "Subscribing destinations with Admin Topic Compliance", "destination_id": "0bc82d4e-6e81-415d-9fe3-b530a73fabe9", "destination_name": "Admin email", "destination_type": "smtp_ibm", "id": "87bef75e-f826-4aa9-b64d-91af9be5e12b", "name": "Admin Email Subscription Compliance", "topic_id": "966378be-5b02-41b6-9449-d71d7da5c247", "topic_name": "SCC Certificate ", "updated_at": "2021-08-20T10:08:46.060316Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "d7f5af42-d750-4316-bab0-92fea106a882", "status_code": 409, "errors": [ { "code": "subscription_conflict", "message": "Duplicate subscription name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "d7f5af42-d750-4316-bab0-92fea106a882", "status_code": 409, "errors": [ { "code": "subscription_conflict", "message": "Duplicate subscription name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create an Integration
Create an Integration
Create an Integration.
Create an Integration.
Create an Integration.
Create an Integration.
POST /v1/instances/{instance_id}/integrations
(eventNotifications *EventNotificationsV1) CreateIntegration(createIntegrationOptions *CreateIntegrationOptions) (result *IntegrationCreateResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateIntegrationWithContext(ctx context.Context, createIntegrationOptions *CreateIntegrationOptions) (result *IntegrationCreateResponse, response *core.DetailedResponse, err error)
createIntegration(params)
create_integration(self,
instance_id: str,
type: str,
metadata: 'IntegrationCreateMetadata',
**kwargs
) -> DetailedResponse
ServiceCall<IntegrationCreateResponse> createIntegration(CreateIntegrationOptions createIntegrationOptions)
Request
Instantiate the CreateIntegrationOptions
struct and set the fields to provide parameter values for the CreateIntegration
method.
Use the CreateIntegrationOptions.Builder
to create a CreateIntegrationOptions
object that contains the parameter values for the createIntegration
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Integration Create
{
"type": "collect_failed_events",
"metadata": {
"endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud",
"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage",
"bucket_name": "cloud-object-storage"
}
}
The type of Integration
Allowable values: [
collect_failed_events
]Possible values: length ≥ 1
Integration Metadata object
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateIntegration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The type of Integration.
Allowable values: [
collect_failed_events
]Possible values: length ≥ 1
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- Metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The type of Integration.
Allowable values: [
collect_failed_events
]Possible values: length ≥ 1
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The type of Integration.
Allowable values: [
collect_failed_events
]Possible values: length ≥ 1
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
The createIntegration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The type of Integration.
Allowable values: [
collect_failed_events
]Possible values: length ≥ 1
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/integrations" --data '{ "type":"collect_failed_events", "metadata": { "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "bucket_name": "cloud-object-storage", "crn": "crn:v1:blu9::" } }'
integrationMetadata := &eventnotificationsv1.IntegrationCreateMetadata{ Endpoint: core.StringPtr(cosEndPoint), CRN: core.StringPtr(cosInstanceCRN), BucketName: core.StringPtr(cosBucketName), } createIntegrationsOptions := &eventnotificationsv1.CreateIntegrationOptions{ InstanceID: core.StringPtr(instanceID), Type: core.StringPtr("collect_failed_events"), Metadata: integrationMetadata, } integrationCreateResponse, response, err := eventNotificationsService.CreateIntegration(createIntegrationsOptions) cosIntegrationID = string(*integrationCreateResponse.ID)
const metadata = { endpoint: cosEndPoint, crn: cosInstanceCRN, bucket_name: cosBucketName, }; const params = { instanceId, type: 'collect_failed_events', metadata, }; let res; try { res = await eventNotificationsService.createIntegration(params); console.log(JSON.stringify(res.result, null, 2)); cosIntegrationId = res.result.id; } catch (err) { console.warn(err); }
IntegrationCreateMetadata metadata = new IntegrationCreateMetadata.Builder() .endpoint(cosEndPoint) .crn(cosInstanceCRN) .bucketName(cosBucketName) .build(); CreateIntegrationOptions integrationsOptions = new CreateIntegrationOptions.Builder() .instanceId(instanceId) .type("collect_failed_events") .metadata(metadata) .build(); // Invoke operation Response<IntegrationCreateResponse> response = eventNotificationsService.createIntegration(integrationsOptions).execute();
integration_metadata = { "endpoint": cos_end_point, "crn": cos_instance_crn, "bucket_name": cos_bucket_name, } create_integration_response = self.event_notifications_service.create_integration( instance_id, type="collect_failed_events", metadata=integration_metadata, ) assert create_integration_response.get_status_code() == 201 integration_response = create_integration_response.get_result() integration = IntegrationCreateResponse.from_dict(integration_response) cos_integration_id = integration.id
Response
Integration create response object
ID of the integration
Integration type. Allowed values collect_failed_events
Integration Metadata object
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
Creation time of an integration
Possible values: 1 ≤ length ≤ 255
Integration create response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "collect_failed_events",
"metadata": {
"endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud",
"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values collect_failed_events.
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- Metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Integration create response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "collect_failed_events",
"metadata": {
"endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud",
"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values collect_failed_events.
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Integration create response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "collect_failed_events",
"metadata": {
"endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud",
"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values collect_failed_events.
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Integration create response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "collect_failed_events",
"metadata": {
"endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud",
"crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values collect_failed_events.
Integration Metadata object.
Examples:{ "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }
- metadata
URL for Cloud Object storage.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the Cloud Object Storage instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Cloud Object Storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Status Code
Payload describing the Integration create response
Bad or incorrect request body
Trying to access the API with unauthorized token
Request body type is not application/json
Internal server error
Unexpected Error
{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "collect_failed_events", "metadata": { "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }, "created_at": "2022-08-18T09:50:32.133355Z" }
{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "collect_failed_events", "metadata": { "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/xxxxxxx6db359a81a1dde8f44bxxxxxx:xxxxxxxx-1d48-xxxx-xxxx-xxxxxxxxxxxx:bucket:cloud-object-storage", "bucket_name": "cloud-object-storage" }, "created_at": "2022-08-18T09:50:32.133355Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all Integrations
List of all KMS Integrations
List of all KMS Integrations.
List of all KMS Integrations.
List of all KMS Integrations.
List of all KMS Integrations.
GET /v1/instances/{instance_id}/integrations
(eventNotifications *EventNotificationsV1) ListIntegrations(listIntegrationsOptions *ListIntegrationsOptions) (result *IntegrationList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListIntegrationsWithContext(ctx context.Context, listIntegrationsOptions *ListIntegrationsOptions) (result *IntegrationList, response *core.DetailedResponse, err error)
listIntegrations(params)
list_integrations(self,
instance_id: str,
*,
offset: int = None,
limit: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<IntegrationList> listIntegrations(ListIntegrationsOptions listIntegrationsOptions)
Request
Instantiate the ListIntegrationsOptions
struct and set the fields to provide parameter values for the ListIntegrations
method.
Use the ListIntegrationsOptions.Builder
to create a ListIntegrationsOptions
object that contains the parameter values for the listIntegrations
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
offset for paginated results
Possible values: value ≥ 0
Default:
0
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListIntegrations options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listIntegrations options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
offset for paginated results.
Possible values: value ≥ 0
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/integrations"
listIntegrationsOptions := &eventnotificationsv1.ListIntegrationsOptions{ InstanceID: core.StringPtr(instanceID), Limit: core.Int64Ptr(int64(1)), Offset: core.Int64Ptr(int64(0)), Search: core.StringPtr(search), } integrationResponse, response, err := eventNotificationsService.ListIntegrations(listIntegrationsOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from listIntegrations(): %d\n", response.StatusCode) } integrationId = string(*integrationResponse.Integrations[0].ID)
const offset = 0; const limit = 1; const search = ''; const params = { instanceId, offset, limit, search, }; let res; try { res = await eventNotificationsService.listIntegrations(params); console.log(JSON.stringify(res.result, null, 2)); integrationId = res.result.integrations[0].id; } catch (err) { console.warn(err); }
int limit = 1; int offset = 0; ListIntegrationsOptions integrationsOptions = new ListIntegrationsOptions.Builder() .instanceId(instanceId) .limit(Long.valueOf(limit)) .offset(Long.valueOf(offset)) .search(search) .build(); // Invoke operation Response<IntegrationList> response = eventNotificationsService.listIntegrations(integrationsOptions).execute(); integrationId = response.getResult().getIntegrations().get(0).getId();
list_integrations_response = event_notifications_service.list_integrations( instance_id, limit=1, offset=0, search=search ) integration_response = list_integrations_response.get_result() integrations = integration_response.get('integrations') integration_id = integrations[0].get('id')
Response
all Integrations response object
Number of integrations
Possible values: value ≥ 0
Current offset
limit to show integrations
List of integrations
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
all Integrations response object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"integrations": [
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-18T09:50:32.133355Z",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"id": "1e77eb50-6dab-4a5e-b145-4c6fb707faa2",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-20T09:50:32.133355Z",
"updated_at": "2021-08-20T09:50:32.133355Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=10"
}
}
Number of integrations.
Possible values: value ≥ 0
Current offset.
limit to show integrations.
List of integrations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
- Integrations
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- Metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Update time of an integration.
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
all Integrations response object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"integrations": [
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-18T09:50:32.133355Z",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"id": "1e77eb50-6dab-4a5e-b145-4c6fb707faa2",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-20T09:50:32.133355Z",
"updated_at": "2021-08-20T09:50:32.133355Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=10"
}
}
Number of integrations.
Possible values: value ≥ 0
Current offset.
limit to show integrations.
List of integrations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
- integrations
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Update time of an integration.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
all Integrations response object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"integrations": [
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-18T09:50:32.133355Z",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"id": "1e77eb50-6dab-4a5e-b145-4c6fb707faa2",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-20T09:50:32.133355Z",
"updated_at": "2021-08-20T09:50:32.133355Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=10"
}
}
Number of integrations.
Possible values: value ≥ 0
Current offset.
limit to show integrations.
List of integrations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
- integrations
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Update time of an integration.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
all Integrations response object.
{
"total_count": 2,
"offset": 0,
"limit": 10,
"integrations": [
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-18T09:50:32.133355Z",
"updated_at": "2021-08-18T09:50:32.133355Z"
},
{
"id": "1e77eb50-6dab-4a5e-b145-4c6fb707faa2",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
},
"created_at": "2021-08-20T09:50:32.133355Z",
"updated_at": "2021-08-20T09:50:32.133355Z"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=10"
}
}
Number of integrations.
Possible values: value ≥ 0
Current offset.
limit to show integrations.
List of integrations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
- integrations
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Update time of an integration.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Payload describing the Integration List
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "total_count": 2, "offset": 0, "limit": 10, "integrations": [ { "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2021-08-18T09:50:32.133355Z", "updated_at": "2021-08-18T09:50:32.133355Z" }, { "id": "1e77eb50-6dab-4a5e-b145-4c6fb707faa2", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2021-08-20T09:50:32.133355Z", "updated_at": "2021-08-20T09:50:32.133355Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=10" } }
{ "total_count": 2, "offset": 0, "limit": 10, "integrations": [ { "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2021-08-18T09:50:32.133355Z", "updated_at": "2021-08-18T09:50:32.133355Z" }, { "id": "1e77eb50-6dab-4a5e-b145-4c6fb707faa2", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895" }, "created_at": "2021-08-20T09:50:32.133355Z", "updated_at": "2021-08-20T09:50:32.133355Z" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/integrations?limit=10&offset=10" } }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get a single Integration
Get a single KMS Integration
Get a single KMS Integration.
Get a single KMS Integration.
Get a single KMS Integration.
Get a single KMS Integration.
GET /v1/instances/{instance_id}/integrations/{id}
(eventNotifications *EventNotificationsV1) GetIntegration(getIntegrationOptions *GetIntegrationOptions) (result *IntegrationGetResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetIntegrationWithContext(ctx context.Context, getIntegrationOptions *GetIntegrationOptions) (result *IntegrationGetResponse, response *core.DetailedResponse, err error)
getIntegration(params)
get_integration(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<IntegrationGetResponse> getIntegration(GetIntegrationOptions getIntegrationOptions)
Request
Instantiate the GetIntegrationOptions
struct and set the fields to provide parameter values for the GetIntegration
method.
Use the GetIntegrationOptions.Builder
to create a GetIntegrationOptions
object that contains the parameter values for the getIntegration
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for integration
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetIntegration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The getIntegration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
curl -X GET --location --header "Authorization: Bearer {iam_token}" "{base_url}/v1/instances/{instance_id}/integrations/{id}"
listIntegrationsOptions := &eventnotificationsv1.GetIntegrationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(integrationId), } _, response, err := eventNotificationsService.GetIntegration(listIntegrationsOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from getIntegration(): %d\n", response.StatusCode) }
const params = { instanceId, id: integrationId, }; let res; try { res = await eventNotificationsService.getIntegration(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetIntegrationOptions integrationsOptions = new GetIntegrationOptions.Builder() .instanceId(instanceId) .id(integrationId) .build(); // Invoke operation Response<IntegrationGetResponse> response = eventNotificationsService.getIntegration(integrationsOptions).execute();
get_integration_response = event_notifications_service.get_integration( instance_id, id=integration_id )
Response
Integration response object
ID of the integration
Integration type. Allowed values are kms and hs-crypto
Integration Metadata object
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
Creation time of an integration
Possible values: 1 ≤ length ≤ 255
Last update time of an integration
Possible values: 1 ≤ length ≤ 255
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- Metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Status Code
Payload describing a single Integration
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update an existing Integration
Update an existing Integration
Update an existing Integration.
Update an existing Integration.
Update an existing Integration.
Update an existing Integration.
PUT /v1/instances/{instance_id}/integrations/{id}
(eventNotifications *EventNotificationsV1) ReplaceIntegration(replaceIntegrationOptions *ReplaceIntegrationOptions) (result *IntegrationGetResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ReplaceIntegrationWithContext(ctx context.Context, replaceIntegrationOptions *ReplaceIntegrationOptions) (result *IntegrationGetResponse, response *core.DetailedResponse, err error)
replaceIntegration(params)
replace_integration(self,
instance_id: str,
id: str,
type: str,
metadata: 'IntegrationMetadata',
**kwargs
) -> DetailedResponse
ServiceCall<IntegrationGetResponse> replaceIntegration(ReplaceIntegrationOptions replaceIntegrationOptions)
Request
Instantiate the ReplaceIntegrationOptions
struct and set the fields to provide parameter values for the ReplaceIntegration
method.
Use the ReplaceIntegrationOptions.Builder
to create a ReplaceIntegrationOptions
object that contains the parameter values for the replaceIntegration
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for integration
Possible values: length = 36, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Integration object
{
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895"
}
}
Integration type. Allowed values are kms and hs-crypto
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Integration Metadata object
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ReplaceIntegration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Integration type. Allowed values are kms and hs-crypto.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- Metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Integration type. Allowed values are kms and hs-crypto.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Integration type. Allowed values are kms and hs-crypto.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
The replaceIntegration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for integration.
Possible values: length = 36, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Integration type. Allowed values are kms and hs-crypto.
Possible values: 1 ≤ length ≤ 50, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/integrations/{id}" --data '{ "metadata": { "endpoint": { "public": "https://us-south.kms.cloud.ibm.com", "private": "https://private.us-south.kms.cloud.ibm.com" }, "root_key_id": "a85bfc505fe1f4a740", "crn": "crn:v1:blu9::" } }'
curl -X PUT --location --header "Authorization: Bearer {iam_token}" --header "Content-Type: application/json" "{base_url}/v1/instances/{instance_id}/integrations/{id}" --data '{ "type":"collect_failed_events","metadata": { "endpoint": "https://s3.us-west.cloud-object-storage.test.appdomain.cloud", "bucket_name": "cloud-object-storage-cos", "crn": "crn:v1:blu9::" } }'
integrationMetadata := &eventnotificationsv1.IntegrationMetadata{ Endpoint: core.StringPtr("https://private.us-south.kms.cloud.ibm.com"), CRN: core.StringPtr("insert CRN"), RootKeyID: core.StringPtr("insert Root Key Id"), } replaceIntegrationsOptions := &eventnotificationsv1.ReplaceIntegrationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(integrationId), Type: core.StringPtr("kms/hs-crypto"), Metadata: integrationMetadata, } _, response, err := eventNotificationsService.ReplaceIntegration(replaceIntegrationsOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from updateIntegration(): %d\n", response.StatusCode) }
integrationCOSMetadata := &eventnotificationsv1.IntegrationMetadata{ Endpoint: core.StringPtr(cosEndPoint), CRN: core.StringPtr(cosInstanceCRN), BucketName: core.StringPtr(cosBucketName), } replaceCOSIntegrationsOptions := &eventnotificationsv1.ReplaceIntegrationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(cosIntegrationID), Type: core.StringPtr("collect_failed_events"), Metadata: integrationCOSMetadata, } _, response, err = eventNotificationsService.ReplaceIntegration(replaceCOSIntegrationsOptions) if err != nil { panic(err) }
const metadata = { endpoint: 'https://private.us-south.kms.cloud.ibm.com', crn: 'insert crn', root_key_id: 'insert root key id', }; const params = { instanceId, id: integrationId, type: 'kms/hs-crypto', metadata, }; let res; try { res = await eventNotificationsService.replaceIntegration(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
metadata = { endpoint: cosEndPoint, crn: cosInstanceCRN, bucket_name: cosBucketName, }; params = { instanceId, id: cosIntegrationId, type: 'collect_failed_events', metadata, }; try { res = await eventNotificationsService.replaceIntegration(params); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
IntegrationMetadata metadata = new IntegrationMetadata.Builder() .endpoint("https://private.us-south.kms.cloud.ibm.com") .crn("insert crn") .rootKeyId("insert root key id") .build(); ReplaceIntegrationOptions integrationsOptions = new ReplaceIntegrationOptions.Builder() .instanceId(instanceId) .id(integrationId) .type("kms/hs-crypto") .metadata(metadata) .build(); // Invoke operation Response<IntegrationGetResponse> response = eventNotificationsService.replaceIntegration(integrationsOptions).execute();
IntegrationMetadata cosMetadata = new IntegrationMetadata.Builder() .endpoint(cosEndPoint) .crn(cosInstanceCRN) .bucketName(cosBucketName) .build(); ReplaceIntegrationOptions cfeIntegrationsOptions = new ReplaceIntegrationOptions.Builder() .instanceId(instanceId) .id(cosIntegrationID) .type("collect_failed_events") .metadata(cosMetadata) .build(); // Invoke operation Response<IntegrationGetResponse> cfeResponse = eventNotificationsService.replaceIntegration(cfeIntegrationsOptions).execute();
integration_metadata = { 'endpoint': 'https://private.us-south.kms.cloud.ibm.com', 'crn': 'insert crn', 'root_key_id': 'insert root key id' } update_integration_response = event_notifications_service.replace_integration( instance_id, type='kms/hs-crypto', id=integration_id, metadata=integration_metadata )
integration_metadata = { "endpoint": cos_end_point, "crn": cos_instance_crn, "bucket_name": cos_bucket_name, } replace_integration_response = self.event_notifications_service.replace_integration( instance_id, id=cos_integration_id, type="collect_failed_events", metadata=integration_metadata, ) integration_response = replace_integration_response.get_result()
Response
Integration response object
ID of the integration
Integration type. Allowed values are kms and hs-crypto
Integration Metadata object
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
Creation time of an integration
Possible values: 1 ≤ length ≤ 255
Last update time of an integration
Possible values: 1 ≤ length ≤ 255
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- Metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Integration response object.
{
"id": "bc0cb555-bf6d-444f-b8f3-069199b04a77",
"type": "kms",
"metadata": {
"endpoint": "https://private.us-south.kms.cloud.ibm.com",
"crn": "crn:v1:staging:public:kms:us-south:a/****:****::",
"root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895",
"bucket_name": "cloud-object-storage"
},
"created_at": "2022-08-18T09:50:32.133355Z",
"updated_at": "2022-10-22T09:50:32.133355Z"
}
ID of the integration.
Integration type. Allowed values are kms and hs-crypto.
Integration Metadata object.
Examples:{ "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }
- metadata
KMS url for key management or url for COS bucket.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
CRN of the KMS/COS instance.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Root Key ID of KMS.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
cloud object storage bucket name.
Possible values: 1 ≤ length ≤ 200, Value must match regular expression
/.*/
Creation time of an integration.
Last update time of an integration.
Status Code
Payload describing the Integration update response
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Trying to create duplicate subscription
Request body type is not application/json
Internal server error
Unexpected Error
{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
{ "id": "bc0cb555-bf6d-444f-b8f3-069199b04a77", "type": "kms", "metadata": { "endpoint": "https://private.us-south.kms.cloud.ibm.com", "crn": "crn:v1:staging:public:kms:us-south:a/****:****::", "root_key_id": "cf49847c-bd3e-4fda-853f-2bcf0575a895", "bucket_name": "cloud-object-storage" }, "created_at": "2022-08-18T09:50:32.133355Z", "updated_at": "2022-10-22T09:50:32.133355Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "d7f5af42-d750-4316-bab0-92fea106a882", "status_code": 409, "errors": [ { "code": "subscription_conflict", "message": "Duplicate subscription name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "d7f5af42-d750-4316-bab0-92fea106a882", "status_code": 409, "errors": [ { "code": "subscription_conflict", "message": "Duplicate subscription name", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new SMTP Configuration
Create a new SMTP Configuration
Create a new SMTP Configuration.
Create a new SMTP Configuration.
Create a new SMTP Configuration.
Create a new SMTP Configuration.
POST /v1/instances/{instance_id}/smtp/config
(eventNotifications *EventNotificationsV1) CreateSMTPConfiguration(createSMTPConfigurationOptions *CreateSMTPConfigurationOptions) (result *SMTPCreateResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateSMTPConfigurationWithContext(ctx context.Context, createSMTPConfigurationOptions *CreateSMTPConfigurationOptions) (result *SMTPCreateResponse, response *core.DetailedResponse, err error)
createSmtpConfiguration(params)
create_smtp_configuration(self,
instance_id: str,
name: str,
domain: str,
*,
description: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPCreateResponse> createSmtpConfiguration(CreateSmtpConfigurationOptions createSmtpConfigurationOptions)
Request
Instantiate the CreateSMTPConfigurationOptions
struct and set the fields to provide parameter values for the CreateSMTPConfiguration
method.
Use the CreateSmtpConfigurationOptions.Builder
to create a CreateSmtpConfigurationOptions
object that contains the parameter values for the createSmtpConfiguration
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Payload describing a SMTP create request
{
"name": "SMTP name",
"description": "SMTP description",
"domain": "cloudflare-ipfs.com"
}
The name of SMTP configuration
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Domain Name
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
.*
The description of SMTP configuration
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSMTPConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The name of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
The description of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The name of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
The description of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The name of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
The description of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The createSmtpConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
The name of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
The description of SMTP configuration.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
curl --request POST --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config' --header 'Authorization: Bearer {TOKEN}' --data '{"name":"{SMTP-name}","description":"{SMTP-description}","domain":"{cloudflare-ipfs.com}"}'
name := "SMTP configuration" description := "SMTP configuration description" domain := "mailx.event-notifications.test.cloud.ibm.com" createSMTPConfigurationOptions := &eventnotificationsv1.CreateSMTPConfigurationOptions{ InstanceID: core.StringPtr(instanceID), Domain: core.StringPtr(domain), Description: core.StringPtr(description), Name: core.StringPtr(name), } smtpConfig, response, err := eventNotificationsService.CreateSMTPConfiguration(createSMTPConfigurationOptions)
const name = 'SMTP Configuration'; const domain = 'mailx.event-notifications.test.cloud.ibm.com'; const description = 'SMTP Configuration description'; const createSmtpConfigurationParams = { instanceId, name, domain, description, }; try { const res = await eventNotificationsService.createSmtpConfiguration( createSmtpConfigurationParams ); smtpConfigID = res.result.id; console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
String name = "SMTP Configuration"; String description = "description for SMTP Configuration"; String domain = "mailx.event-notifications.test.cloud.ibm.com"; CreateSmtpConfigurationOptions createSMTPConfigurationOptions = new CreateSmtpConfigurationOptions.Builder() .instanceId(instanceId) .domain(domain) .name(name) .description(description) .build(); Response<SMTPCreateResponse> response = eventNotificationsService.createSmtpConfiguration(createSMTPConfigurationOptions).execute(); SMTPCreateResponse smtpCreateResponse = response.getResult(); smtpConfigID = smtpCreateResponse.getId(); System.out.println(smtpCreateResponse);
global smtp_config_id name = "SMTP configuration" domain = "mailx.event-notifications.test.cloud.ibm.com" description = "SMTP description" create_smtp_config_response = self.event_notifications_service.create_smtp_configuration( instance_id, name, domain, description=description ) smtp_response = create_smtp_config_response.get_result() print(json.dumps(create_smtp_config_response, indent=2)) smtp_config = SMTPCreateResponse.from_dict(smtp_response) smtp_config_id = smtp_config.id
Response
Payload describing a SMTP create response
SMTP ID
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP name
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Domain Name
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
.*
Payload describing a SMTP configuration
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
Created time
SMTP description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Payload describing a SMTP create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"name": "SMTP name",
"description": "SMTP description",
"domain": "cloudflare-ipfs.com",
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "PENDING"
},
"spf": {
"txt_name": "cloudflare-ipfs.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- Config
The SMTP DKIM attributes.
- Dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- EnAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"name": "SMTP name",
"description": "SMTP description",
"domain": "cloudflare-ipfs.com",
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "PENDING"
},
"spf": {
"txt_name": "cloudflare-ipfs.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"name": "SMTP name",
"description": "SMTP description",
"domain": "cloudflare-ipfs.com",
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "PENDING"
},
"spf": {
"txt_name": "cloudflare-ipfs.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"name": "SMTP name",
"description": "SMTP description",
"domain": "cloudflare-ipfs.com",
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "PENDING"
},
"spf": {
"txt_name": "cloudflare-ipfs.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- enAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Status Code
New SMTP created successfully
Bad or incorrect request body
Trying to access the API with unauthorized token
Request body type is not application/json
Internal server error
Unexpected Error
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "name": "SMTP name", "description": "SMTP description", "domain": "cloudflare-ipfs.com", "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "cloudflare-ipfs.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "SUCCESSFUL" } }, "created_at": "2024-04-16T13:16:56.079093Z" }
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "name": "SMTP name", "description": "SMTP description", "domain": "cloudflare-ipfs.com", "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "cloudflare-ipfs.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "SUCCESSFUL" } }, "created_at": "2024-04-16T13:16:56.079093Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all SMTP Configurations
List all SMTP Configurations
List all SMTP Configurations.
List all SMTP Configurations.
List all SMTP Configurations.
List all SMTP Configurations.
GET /v1/instances/{instance_id}/smtp/config
(eventNotifications *EventNotificationsV1) ListSMTPConfigurations(listSMTPConfigurationsOptions *ListSMTPConfigurationsOptions) (result *SMTPConfigurationsList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListSMTPConfigurationsWithContext(ctx context.Context, listSMTPConfigurationsOptions *ListSMTPConfigurationsOptions) (result *SMTPConfigurationsList, response *core.DetailedResponse, err error)
listSmtpConfigurations(params)
list_smtp_configurations(self,
instance_id: str,
*,
limit: int = None,
offset: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPConfigurationsList> listSmtpConfigurations(ListSmtpConfigurationsOptions listSmtpConfigurationsOptions)
Request
Instantiate the ListSMTPConfigurationsOptions
struct and set the fields to provide parameter values for the ListSMTPConfigurations
method.
Use the ListSmtpConfigurationsOptions.Builder
to create a ListSmtpConfigurationsOptions
object that contains the parameter values for the listSmtpConfigurations
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Query Parameters
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
offset for paginated results
Possible values: value ≥ 0
Default:
0
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListSMTPConfigurations options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listSmtpConfigurations options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config' --header 'Authorization: Bearer {TOKEN}'
listSMTPConfigurationsOptions := &eventnotificationsv1.ListSMTPConfigurationsOptions{ InstanceID: core.StringPtr(instanceID), Limit: core.Int64Ptr(int64(1)), Offset: core.Int64Ptr(int64(0)), Search: core.StringPtr(search), } smtpConfigurations, response, err := eventNotificationsService.ListSMTPConfigurations(listSMTPConfigurationsOptions)
const limit = 1; const offset = 0; const search = ''; const listSmtpConfigurationsParams = { instanceId, limit, offset, search, }; try { const res = await eventNotificationsService.listSmtpConfigurations( listSmtpConfigurationsParams ); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
ListSmtpConfigurationsOptions listSmtpConfigurationsOptionsModel = new ListSmtpConfigurationsOptions.Builder() .instanceId(instanceId) .limit(limit) .offset(offset) .search(search) .build(); // Invoke listSmtpConfigurations() with a valid options model and verify the result Response<SMTPConfigurationsList> response = eventNotificationsService.listSmtpConfigurations(listSmtpConfigurationsOptionsModel).execute(); SMTPConfigurationsList smtpConfigurationList = response.getResult(); System.out.println(response);
limit = 1 offset = 0 list_smtp_config_response = self.event_notifications_service.list_smtp_configurations( instance_id, limit=limit, offset=offset, search=search, ) list_smtp_config_response = list_smtp_config_response.get_result() print(json.dumps(list_smtp_config_response, indent=2))
Response
Payload describing a SMTP Configurations list
Total number of SMTP configurations
Current offset
limit to show configurations
List of SMTP Configurations
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Payload describing a SMTP Configurations list.
{
"limit": 10,
"offset": 0,
"smtp_configurations": [
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "test.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"description": "disintermediate clicks-and-mortar channels",
"domain": "test.event-notifications.test.cloud.ibm.com",
"id": "accec70c-752d-4920-bf86-146b2eade10f",
"name": "revolutionize front-end markets",
"updated_at": "2024-04-16T20:04:40.055197Z"
},
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/XXXXXXXX",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
],
"total_count": 2
}
Total number of SMTP configurations.
Current offset.
limit to show configurations.
List of SMTP Configurations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
- SMTPConfigurations
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- Config
The SMTP DKIM attributes.
- Dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- EnAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Payload describing a SMTP Configurations list.
{
"limit": 10,
"offset": 0,
"smtp_configurations": [
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "test.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"description": "disintermediate clicks-and-mortar channels",
"domain": "test.event-notifications.test.cloud.ibm.com",
"id": "accec70c-752d-4920-bf86-146b2eade10f",
"name": "revolutionize front-end markets",
"updated_at": "2024-04-16T20:04:40.055197Z"
},
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/XXXXXXXX",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
],
"total_count": 2
}
Total number of SMTP configurations.
Current offset.
limit to show configurations.
List of SMTP Configurations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
- smtp_configurations
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a SMTP Configurations list.
{
"limit": 10,
"offset": 0,
"smtp_configurations": [
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "test.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"description": "disintermediate clicks-and-mortar channels",
"domain": "test.event-notifications.test.cloud.ibm.com",
"id": "accec70c-752d-4920-bf86-146b2eade10f",
"name": "revolutionize front-end markets",
"updated_at": "2024-04-16T20:04:40.055197Z"
},
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/XXXXXXXX",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
],
"total_count": 2
}
Total number of SMTP configurations.
Current offset.
limit to show configurations.
List of SMTP Configurations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
- smtp_configurations
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a SMTP Configurations list.
{
"limit": 10,
"offset": 0,
"smtp_configurations": [
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "test.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "SUCCESSFUL"
}
},
"description": "disintermediate clicks-and-mortar channels",
"domain": "test.event-notifications.test.cloud.ibm.com",
"id": "accec70c-752d-4920-bf86-146b2eade10f",
"name": "revolutionize front-end markets",
"updated_at": "2024-04-16T20:04:40.055197Z"
},
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/XXXXXXXX",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
],
"total_count": 2
}
Total number of SMTP configurations.
Current offset.
limit to show configurations.
List of SMTP Configurations.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
- smtpConfigurations
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- enAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Get list of all SMTP Configurations
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "limit": 10, "offset": 0, "smtp_configurations": [ { "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "test.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "SUCCESSFUL" } }, "description": "disintermediate clicks-and-mortar channels", "domain": "test.event-notifications.test.cloud.ibm.com", "id": "accec70c-752d-4920-bf86-146b2eade10f", "name": "revolutionize front-end markets", "updated_at": "2024-04-16T20:04:40.055197Z" }, { "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/XXXXXXXX", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" } ], "total_count": 2 }
{ "limit": 10, "offset": 0, "smtp_configurations": [ { "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "test.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "SUCCESSFUL" } }, "description": "disintermediate clicks-and-mortar channels", "domain": "test.event-notifications.test.cloud.ibm.com", "id": "accec70c-752d-4920-bf86-146b2eade10f", "name": "revolutionize front-end markets", "updated_at": "2024-04-16T20:04:40.055197Z" }, { "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/XXXXXXXX", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" } ], "total_count": 2 }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Create a new SMTP User
Create a new SMTP User
Create a new SMTP User.
Create a new SMTP User.
Create a new SMTP User.
Create a new SMTP User.
POST /v1/instances/{instance_id}/smtp/config/{id}/users
(eventNotifications *EventNotificationsV1) CreateSMTPUser(createSMTPUserOptions *CreateSMTPUserOptions) (result *SMTPUserResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) CreateSMTPUserWithContext(ctx context.Context, createSMTPUserOptions *CreateSMTPUserOptions) (result *SMTPUserResponse, response *core.DetailedResponse, err error)
createSmtpUser(params)
create_smtp_user(self,
instance_id: str,
id: str,
*,
description: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPUserResponse> createSmtpUser(CreateSmtpUserOptions createSmtpUserOptions)
Request
Instantiate the CreateSMTPUserOptions
struct and set the fields to provide parameter values for the CreateSMTPUser
method.
Use the CreateSmtpUserOptions.Builder
to create a CreateSmtpUserOptions
object that contains the parameter values for the createSmtpUser
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Payload describing a SMTP User create request
{
"description": "SMTP User description"
}
The description of SMTP configuration
Possible values: 0 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateSMTPUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The description of SMTP configuration.
Possible values: 0 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The description of SMTP configuration.
Possible values: 0 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The description of SMTP configuration.
Possible values: 0 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The createSmtpUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The description of SMTP configuration.
Possible values: 0 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
curl --request POST --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}/users' --header 'Authorization: Bearer {TOKEN}' --data '{"description":"{SMTP-user-description}"}'
description := "smtp user description" createSMTPUserOptions := &eventnotificationsv1.CreateSMTPUserOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), Description: core.StringPtr(description), } user, response, err := eventNotificationsService.CreateSMTPUser(createSMTPUserOptions)
const description = 'SMTP user description'; const createSmtpUserParams = { instanceId, id: smtpConfigID, description, }; try { const res = await eventNotificationsService.createSmtpUser(createSmtpUserParams); smtpUserID = res.result.id; console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
String description = "description for SMTP user"; CreateSmtpUserOptions createSmtpUserOptionsModel = new CreateSmtpUserOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .description(description) .build(); Response<SMTPUserResponse> response = eventNotificationsService.createSmtpUser(createSmtpUserOptionsModel).execute(); SMTPUserResponse responseObj = response.getResult(); smtpUserID = responseObj.getId(); System.out.println(responseObj);
global smtp_user_id description = 'SMTP user description' create_smtp_user_response = self.event_notifications_service.create_smtp_user( instance_id, id=smtp_config_id, description=description ) create_user_response = create_smtp_user_response.get_result() print(json.dumps(create_user_response, indent=2)) smtp_user = SMTPUserResponse.from_dict(create_user_response) smtp_user_id = smtp_user.id
Response
Payload describing a SMTP User create response
SMTP Id
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP confg Id
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP user name
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
.*
password
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
.*
Created time
SMTP User description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Domain Name
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
.*
Payload describing a SMTP User create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"description": "SMTP user description",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"password": "password",
"domain": "test.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
password.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP User create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"description": "SMTP user description",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"password": "password",
"domain": "test.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
password.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP User create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"description": "SMTP user description",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"password": "password",
"domain": "test.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
password.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP User create response.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"description": "SMTP user description",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"password": "password",
"domain": "test.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"created_at": "2024-04-16T13:16:56.079093Z"
}
SMTP Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
password.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/.*/
Created time.
Status Code
New SMTP User created successfully
Bad or incorrect request body
Trying to access the API with unauthorized token
Request body type is not application/json
Internal server error
Unexpected Error
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "description": "SMTP user description", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "password": "password", "domain": "test.event-notifications.test.cloud.ibm.com", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "created_at": "2024-04-16T13:16:56.079093Z" }
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "description": "SMTP user description", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "password": "password", "domain": "test.event-notifications.test.cloud.ibm.com", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "created_at": "2024-04-16T13:16:56.079093Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
List all SMTP users
List all SMTP users
List all SMTP users.
List all SMTP users.
List all SMTP users.
List all SMTP users.
GET /v1/instances/{instance_id}/smtp/config/{id}/users
(eventNotifications *EventNotificationsV1) ListSMTPUsers(listSMTPUsersOptions *ListSMTPUsersOptions) (result *SMTPUsersList, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) ListSMTPUsersWithContext(ctx context.Context, listSMTPUsersOptions *ListSMTPUsersOptions) (result *SMTPUsersList, response *core.DetailedResponse, err error)
listSmtpUsers(params)
list_smtp_users(self,
instance_id: str,
id: str,
*,
limit: int = None,
offset: int = None,
search: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPUsersList> listSmtpUsers(ListSmtpUsersOptions listSmtpUsersOptions)
Request
Instantiate the ListSMTPUsersOptions
struct and set the fields to provide parameter values for the ListSMTPUsers
method.
Use the ListSmtpUsersOptions.Builder
to create a ListSmtpUsersOptions
object that contains the parameter values for the listSmtpUsers
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Query Parameters
Page limit for paginated results
Possible values: 1 ≤ value ≤ 100
Default:
10
offset for paginated results
Possible values: value ≥ 0
Default:
0
Search string for filtering results
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
[a-zA-Z0-9]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListSMTPUsers options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
The listSmtpUsers options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
Page limit for paginated results.
Possible values: 1 ≤ value ≤ 100
Examples:10
offset for paginated results.
Possible values: value ≥ 0
Search string for filtering results.
Possible values: 1 ≤ length ≤ 100, Value must match regular expression
/[a-zA-Z0-9]/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}/users' --header 'Authorization: Bearer {TOKEN}'
listSMTPUsersOptions := &eventnotificationsv1.ListSMTPUsersOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), Limit: core.Int64Ptr(int64(1)), Offset: core.Int64Ptr(int64(0)), Search: core.StringPtr(search), } smtpUsers, response, err := eventNotificationsService.ListSMTPUsers(listSMTPUsersOptions)
const limit = 1; const offset = 0; const search = ''; const listSmtpUsersParams = { instanceId, id: smtpConfigID, limit, offset, search, }; try { const res = await eventNotificationsService.listSmtpUsers(listSmtpUsersParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
ListSmtpUsersOptions listSmtpUsersOptionsModel = new ListSmtpUsersOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .limit(limit) .offset(offset) .search(search) .build(); // Invoke listSmtpUsers() with a valid options model and verify the result Response<SMTPUsersList> response = eventNotificationsService.listSmtpUsers(listSmtpUsersOptionsModel).execute(); SMTPUsersList smtpUsersList = response.getResult(); System.out.println(response);
limit = 1 offset = 0 list_smtp_user_response = self.event_notifications_service.list_smtp_users( instance_id, id=smtp_config_id, limit=limit, offset=offset, search=search, ) list_smtp_user_response = list_smtp_user_response.get_result() print(json.dumps(list_smtp_user_response, indent=2))
Response
Payload describing a SMTP users list request
Total number of destinations
Current offset
limit to show destinations
List of users
Possible values: 0 ≤ number of items ≤ 100
Response having URL of the page.
Response having URL of the page.
Response having URL of the page.
Payload describing a SMTP users list request.
{
"users": [
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "disintermediate turn-key lifetime value",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "68e541cb-72b1-4eb6-ae51-766b3eaf8fd9",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T17:36:24.562614Z",
"username": "39083891827184zey101"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "optimize interactive experiences",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "3abf9635-42e0-4c76-9d38-97f043288f4e",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T19:40:08.925973Z",
"username": "1496562uy307fuk01201"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "innovate cross-platform systems",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"id": "446f2f29-c38f-43e3-9783-2874e9de43e7",
"updated_at": "2024-04-17T12:25:31.881298Z",
"username": "7387a14m5qk133616301"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of destinations.
Current offset.
limit to show destinations.
List of users.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
- Users
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Response having URL of the page.
- First
URL to the page.
Response having URL of the page.
- Previous
URL to the page.
Response having URL of the page.
- Next
URL to the page.
Payload describing a SMTP users list request.
{
"users": [
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "disintermediate turn-key lifetime value",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "68e541cb-72b1-4eb6-ae51-766b3eaf8fd9",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T17:36:24.562614Z",
"username": "39083891827184zey101"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "optimize interactive experiences",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "3abf9635-42e0-4c76-9d38-97f043288f4e",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T19:40:08.925973Z",
"username": "1496562uy307fuk01201"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "innovate cross-platform systems",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"id": "446f2f29-c38f-43e3-9783-2874e9de43e7",
"updated_at": "2024-04-17T12:25:31.881298Z",
"username": "7387a14m5qk133616301"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of destinations.
Current offset.
limit to show destinations.
List of users.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
- users
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a SMTP users list request.
{
"users": [
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "disintermediate turn-key lifetime value",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "68e541cb-72b1-4eb6-ae51-766b3eaf8fd9",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T17:36:24.562614Z",
"username": "39083891827184zey101"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "optimize interactive experiences",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "3abf9635-42e0-4c76-9d38-97f043288f4e",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T19:40:08.925973Z",
"username": "1496562uy307fuk01201"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "innovate cross-platform systems",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"id": "446f2f29-c38f-43e3-9783-2874e9de43e7",
"updated_at": "2024-04-17T12:25:31.881298Z",
"username": "7387a14m5qk133616301"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of destinations.
Current offset.
limit to show destinations.
List of users.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
- users
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Payload describing a SMTP users list request.
{
"users": [
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "disintermediate turn-key lifetime value",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "68e541cb-72b1-4eb6-ae51-766b3eaf8fd9",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T17:36:24.562614Z",
"username": "39083891827184zey101"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "optimize interactive experiences",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"id": "3abf9635-42e0-4c76-9d38-97f043288f4e",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"updated_at": "2024-04-16T19:40:08.925973Z",
"username": "1496562uy307fuk01201"
},
{
"created_at": "2024-04-16T17:36:24.562614Z",
"description": "innovate cross-platform systems",
"domain": "ashwin.event-notifications.test.cloud.ibm.com",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"id": "446f2f29-c38f-43e3-9783-2874e9de43e7",
"updated_at": "2024-04-17T12:25:31.881298Z",
"username": "7387a14m5qk133616301"
}
],
"first": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0"
},
"next": {
"href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10"
},
"limit": 10,
"offset": 0,
"total_count": 3
}
Total number of destinations.
Current offset.
limit to show destinations.
List of users.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
- users
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Response having URL of the page.
- first
URL to the page.
Response having URL of the page.
- previous
URL to the page.
Response having URL of the page.
- next
URL to the page.
Status Code
Get list of all SMTP users
Trying to access the API with unauthorized token
Internal server error
Unexpected Error
{ "users": [ { "created_at": "2024-04-16T17:36:24.562614Z", "description": "disintermediate turn-key lifetime value", "domain": "ashwin.event-notifications.test.cloud.ibm.com", "id": "68e541cb-72b1-4eb6-ae51-766b3eaf8fd9", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "updated_at": "2024-04-16T17:36:24.562614Z", "username": "39083891827184zey101" }, { "created_at": "2024-04-16T17:36:24.562614Z", "description": "optimize interactive experiences", "domain": "ashwin.event-notifications.test.cloud.ibm.com", "id": "3abf9635-42e0-4c76-9d38-97f043288f4e", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "updated_at": "2024-04-16T19:40:08.925973Z", "username": "1496562uy307fuk01201" }, { "created_at": "2024-04-16T17:36:24.562614Z", "description": "innovate cross-platform systems", "domain": "ashwin.event-notifications.test.cloud.ibm.com", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "id": "446f2f29-c38f-43e3-9783-2874e9de43e7", "updated_at": "2024-04-17T12:25:31.881298Z", "username": "7387a14m5qk133616301" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 3 }
{ "users": [ { "created_at": "2024-04-16T17:36:24.562614Z", "description": "disintermediate turn-key lifetime value", "domain": "ashwin.event-notifications.test.cloud.ibm.com", "id": "68e541cb-72b1-4eb6-ae51-766b3eaf8fd9", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "updated_at": "2024-04-16T17:36:24.562614Z", "username": "39083891827184zey101" }, { "created_at": "2024-04-16T17:36:24.562614Z", "description": "optimize interactive experiences", "domain": "ashwin.event-notifications.test.cloud.ibm.com", "id": "3abf9635-42e0-4c76-9d38-97f043288f4e", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "updated_at": "2024-04-16T19:40:08.925973Z", "username": "1496562uy307fuk01201" }, { "created_at": "2024-04-16T17:36:24.562614Z", "description": "innovate cross-platform systems", "domain": "ashwin.event-notifications.test.cloud.ibm.com", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "id": "446f2f29-c38f-43e3-9783-2874e9de43e7", "updated_at": "2024-04-17T12:25:31.881298Z", "username": "7387a14m5qk133616301" } ], "first": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=0" }, "next": { "href": "https://us-south.event-notifications.cloud.ibm.com/event-notifications/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/destinations?limit=10&offset=10" }, "limit": 10, "offset": 0, "total_count": 3 }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of a SMTP Configuration
Get details of a SMTP Configuration
Get details of a SMTP Configuration.
Get details of a SMTP Configuration.
Get details of a SMTP Configuration.
Get details of a SMTP Configuration.
GET /v1/instances/{instance_id}/smtp/config/{id}
(eventNotifications *EventNotificationsV1) GetSMTPConfiguration(getSMTPConfigurationOptions *GetSMTPConfigurationOptions) (result *SMTPConfiguration, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetSMTPConfigurationWithContext(ctx context.Context, getSMTPConfigurationOptions *GetSMTPConfigurationOptions) (result *SMTPConfiguration, response *core.DetailedResponse, err error)
getSmtpConfiguration(params)
get_smtp_configuration(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPConfiguration> getSmtpConfiguration(GetSmtpConfigurationOptions getSmtpConfigurationOptions)
Request
Instantiate the GetSMTPConfigurationOptions
struct and set the fields to provide parameter values for the GetSMTPConfiguration
method.
Use the GetSmtpConfigurationOptions.Builder
to create a GetSmtpConfigurationOptions
object that contains the parameter values for the getSmtpConfiguration
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSMTPConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The getSmtpConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}' --header 'Authorization: Bearer {TOKEN}'
getSMTPconfigurationOptions := &eventnotificationsv1.GetSMTPConfigurationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), } smtpConfiguration, response, err := eventNotificationsService.GetSMTPConfiguration(getSMTPconfigurationOptions)
const getSmtpConfigurationParams = { instanceId, id: smtpConfigID, }; try { const res = await eventNotificationsService.getSmtpConfiguration(getSmtpConfigurationParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetSmtpConfigurationOptions getSmtpConfigurationOptionsModel = new GetSmtpConfigurationOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .build(); Response<SMTPConfiguration> response = eventNotificationsService.getSmtpConfiguration(getSmtpConfigurationOptionsModel).execute(); SMTPConfiguration responseObj = response.getResult(); System.out.println(responseObj);
get_smtp_config_response = self.event_notifications_service.get_smtp_configuration( instance_id, id=smtp_config_id, ) get_smtp_config_response = get_smtp_config_response.get_result() print(json.dumps(get_smtp_config_response, indent=2))
Response
Payload describing a SMTP List response
SMTP ID
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP name
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Domain Name
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
.*
Payload describing a SMTP configuration
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
Created time
SMTP description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- Config
The SMTP DKIM attributes.
- Dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- EnAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- enAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Status Code
SMTP information
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update details of SMTP Configuration
Update details of SMTP Configuration
Update details of SMTP Configuration.
Update details of SMTP Configuration.
Update details of SMTP Configuration.
Update details of SMTP Configuration.
PATCH /v1/instances/{instance_id}/smtp/config/{id}
(eventNotifications *EventNotificationsV1) UpdateSMTPConfiguration(updateSMTPConfigurationOptions *UpdateSMTPConfigurationOptions) (result *SMTPConfiguration, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) UpdateSMTPConfigurationWithContext(ctx context.Context, updateSMTPConfigurationOptions *UpdateSMTPConfigurationOptions) (result *SMTPConfiguration, response *core.DetailedResponse, err error)
updateSmtpConfiguration(params)
update_smtp_configuration(self,
instance_id: str,
id: str,
*,
name: str = None,
description: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPConfiguration> updateSmtpConfiguration(UpdateSmtpConfigurationOptions updateSmtpConfigurationOptions)
Request
Instantiate the UpdateSMTPConfigurationOptions
struct and set the fields to provide parameter values for the UpdateSMTPConfiguration
method.
Use the UpdateSmtpConfigurationOptions.Builder
to create a UpdateSmtpConfigurationOptions
object that contains the parameter values for the updateSmtpConfiguration
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Payload describing a SMTP update request
{
"name": "SMTP name",
"description": "SMTP description"
}
SMTP name
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
SMTP description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSMTPConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The updateSmtpConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
curl --request PATCH --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}' --header 'Authorization: Bearer {TOKEN}' --data '{"name":"{SMTP name}","description":"{SMTP description}"}'
name := "SMTP configuration name update" description := "SMTP configuration description update" updateSMTPConfigurationOptions := &eventnotificationsv1.UpdateSMTPConfigurationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), Name: core.StringPtr(name), Description: core.StringPtr(description), } updateSMTPConfiguration, response, err := eventNotificationsService.UpdateSMTPConfiguration(updateSMTPConfigurationOptions)
const name = 'SMTP configuration update'; const description = 'SMTP description update'; const updateSmtpConfigurationParams = { instanceId, id: smtpConfigID, name, description, }; try { const res = await eventNotificationsService.updateSmtpConfiguration( updateSmtpConfigurationParams ); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
String name = "SMTP Configuration update"; String description = "description for SMTP Configuration update"; UpdateSmtpConfigurationOptions updateSmtpConfigurationOptionsModel = new UpdateSmtpConfigurationOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .name(name) .description(description) .build(); Response<SMTPConfiguration> response = eventNotificationsService.updateSmtpConfiguration(updateSmtpConfigurationOptionsModel).execute(); SMTPConfiguration responseObj = response.getResult(); System.out.println(responseObj);
name = 'SMTP configuration update' description = 'SMTP configuration description update' update_smtp_config_response = self.event_notifications_service.update_smtp_configuration( instance_id, id=smtp_config_id, name=name, description=description, ) update_smtp_config_response = update_smtp_config_response.get_result() print(json.dumps(update_smtp_config_response, indent=2))
Response
Payload describing a SMTP List response
SMTP ID
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP name
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Domain Name
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
.*
Payload describing a SMTP configuration
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
Created time
SMTP description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- Config
The SMTP DKIM attributes.
- Dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- EnAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- Spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- en_authorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Payload describing a SMTP List response.
{
"config": {
"dkim": {
"txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com",
"txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB",
"verification": "PENDING"
},
"en_authorization": {
"verification": "SUCCESSFUL"
},
"spf": {
"txt_name": "maily.event-notifications.test.cloud.ibm.com",
"txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all",
"verification": "PENDING"
}
},
"description": "utilize distributed deliverables",
"domain": "maily.event-notifications.test.cloud.ibm.com",
"id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed",
"name": "revolutionize synergistic e-commerce",
"updated_at": "2024-04-17T09:34:18.274413Z"
}
SMTP ID.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP name.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
SMTP description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
Payload describing a SMTP configuration.
Examples:{ "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "PENDING" }, "spf": { "txt_name": "test.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }
- config
The SMTP DKIM attributes.
- dkim
DKIM text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
DKIM text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
DKIM verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The en_authorization attributes.
- enAuthorization
en_authorization verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
The SPF attributes.
- spf
spf text name.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
spf text value.
Possible values: 1 ≤ length ≤ 500, Value must match regular expression
/.*/
spf verification.
Possible values: 1 ≤ length ≤ 255, Value must match regular expression
/.*/
Created time.
Status Code
SMTP information
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Request body type is not application/json
Internal server error
Unexpected Error
{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
{ "config": { "dkim": { "txt_name": "35ef4bc3-a7a6-48e9-882a-6fd70c162ec2._domainkey.abc.event-notifications.test.cloud.ibm.com", "txt_value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzCOM3TfCHGzZ6myd5DIQPjahLjkbK15aiq7ElDhqHQwNq/5EnPutNptFg7LurV2o9Tl9GSrPFC9GGJn8+5wtJRoeHfSm//dPXB9dpQb4rRjono8obaAbc2A6tVBXdFf814tw04ZDw6JzCmn3RvVmAy5+mwQ+SL6oqbU62CMv6eLtF26MEagbUZKmp5mpru0natkV/mwPk/vudJ8eVoOyjTfwRws9dLc3JaTdT77wSkyKqW64nYePO4j8kVHXj2bQTm4M+GJL2bzc8RwPKPvdy/FiK4Op2qzbzHNGL/V9Fj9xhYE4p1sopLJtZaTvkbZqbvB1KZJ1YqByHl4zcL/uQIDAQAB", "verification": "PENDING" }, "en_authorization": { "verification": "SUCCESSFUL" }, "spf": { "txt_name": "maily.event-notifications.test.cloud.ibm.com", "txt_value": "v=spf1 include:mail.event-notifications.test.cloud.ibm.com -all", "verification": "PENDING" } }, "description": "utilize distributed deliverables", "domain": "maily.event-notifications.test.cloud.ibm.com", "id": "79ca7029-1a68-43d6-8e64-8cd8d1d84aed", "name": "revolutionize synergistic e-commerce", "updated_at": "2024-04-17T09:34:18.274413Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a SMTP Configuration
Delete a SMTP Configuration
Delete a SMTP Configuration.
Delete a SMTP Configuration.
Delete a SMTP Configuration.
Delete a SMTP Configuration.
DELETE /v1/instances/{instance_id}/smtp/config/{id}
(eventNotifications *EventNotificationsV1) DeleteSMTPConfiguration(deleteSMTPConfigurationOptions *DeleteSMTPConfigurationOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteSMTPConfigurationWithContext(ctx context.Context, deleteSMTPConfigurationOptions *DeleteSMTPConfigurationOptions) (response *core.DetailedResponse, err error)
deleteSmtpConfiguration(params)
delete_smtp_configuration(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteSmtpConfiguration(DeleteSmtpConfigurationOptions deleteSmtpConfigurationOptions)
Request
Instantiate the DeleteSMTPConfigurationOptions
struct and set the fields to provide parameter values for the DeleteSMTPConfiguration
method.
Use the DeleteSmtpConfigurationOptions.Builder
to create a DeleteSmtpConfigurationOptions
object that contains the parameter values for the deleteSmtpConfiguration
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSMTPConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The deleteSmtpConfiguration options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl --request DELETE --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}' --header 'Authorization: Bearer {TOKEN}'
deleteSMTPConfigurationOptions := &eventnotificationsv1.DeleteSMTPConfigurationOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(ID), } response, err := eventNotificationsService.DeleteSMTPConfiguration(deleteSMTPConfigurationOptions)
const deleteSmtpConfigurationParams = { instanceId, id: smtpConfigID, }; try { const res = await eventNotificationsService.deleteSmtpConfiguration( deleteSmtpConfigurationParams ); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
DeleteSmtpConfigurationOptions deleteSmtpConfigurationOptionsModel = new DeleteSmtpConfigurationOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .build(); Response<Void> response = eventNotificationsService.deleteSmtpConfiguration(deleteSmtpConfigurationOptionsModel).execute(); System.out.println(response);
delete_smtp_config_response = self.event_notifications_service.delete_smtp_configuration( instance_id, id=smtp_config_id ) print(json.dumps(delete_smtp_config_response, indent=2))
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of a SMTP User
Get details of a SMTP User
Get details of a SMTP User.
Get details of a SMTP User.
Get details of a SMTP User.
Get details of a SMTP User.
GET /v1/instances/{instance_id}/smtp/config/{id}/users/{user_id}
(eventNotifications *EventNotificationsV1) GetSMTPUser(getSMTPUserOptions *GetSMTPUserOptions) (result *SMTPUser, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetSMTPUserWithContext(ctx context.Context, getSMTPUserOptions *GetSMTPUserOptions) (result *SMTPUser, response *core.DetailedResponse, err error)
getSmtpUser(params)
get_smtp_user(self,
instance_id: str,
id: str,
user_id: str,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPUser> getSmtpUser(GetSmtpUserOptions getSmtpUserOptions)
Request
Instantiate the GetSMTPUserOptions
struct and set the fields to provide parameter values for the GetSMTPUser
method.
Use the GetSmtpUserOptions.Builder
to create a GetSmtpUserOptions
object that contains the parameter values for the getSmtpUser
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
UserID
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
.*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSMTPUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
The getSmtpUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}/users/{user_id}' --header 'Authorization: Bearer {TOKEN}'
getSMTPUserOptions := &eventnotificationsv1.GetSMTPUserOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), UserID: core.StringPtr(smtpUserID), } SMTPUser, response, err := eventNotificationsService.GetSMTPUser(getSMTPUserOptions)
const getSmtpUserParams = { instanceId, id: smtpConfigID, userId: smtpUserID, }; try { const res = await eventNotificationsService.getSmtpUser(getSmtpUserParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetSmtpUserOptions getSmtpUserOptionsModel = new GetSmtpUserOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .userId(smtpUserID) .build(); Response<SMTPUser> response = eventNotificationsService.getSmtpUser(getSmtpUserOptionsModel).execute(); SMTPUser responseObj = response.getResult(); System.out.println(responseObj);
get_smtp_user_response = self.event_notifications_service.get_smtp_user( instance_id, id=smtp_config_id, user_id=smtp_user_id ) get_smtp_user_response = get_smtp_user_response.get_result() print(json.dumps(get_smtp_user_response, indent=2))
Response
Payload describing a SMTP User
Id
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP confg Id
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP User description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Domain Name
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
.*
SMTP user name
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
.*
Updated time
Updated time
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Status Code
SMTP User information
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Update details of a SMTP User
Update details of a SMTP User
Update details of a SMTP User.
Update details of a SMTP User.
Update details of a SMTP User.
Update details of a SMTP User.
PATCH /v1/instances/{instance_id}/smtp/config/{id}/users/{user_id}
(eventNotifications *EventNotificationsV1) UpdateSMTPUser(updateSMTPUserOptions *UpdateSMTPUserOptions) (result *SMTPUser, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) UpdateSMTPUserWithContext(ctx context.Context, updateSMTPUserOptions *UpdateSMTPUserOptions) (result *SMTPUser, response *core.DetailedResponse, err error)
updateSmtpUser(params)
update_smtp_user(self,
instance_id: str,
id: str,
user_id: str,
*,
description: str = None,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPUser> updateSmtpUser(UpdateSmtpUserOptions updateSmtpUserOptions)
Request
Instantiate the UpdateSMTPUserOptions
struct and set the fields to provide parameter values for the UpdateSMTPUser
method.
Use the UpdateSmtpUserOptions.Builder
to create a UpdateSmtpUserOptions
object that contains the parameter values for the updateSmtpUser
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
UserID
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
.*
Payload describing a SMTP user update request
{
"description": "SMTP user description"
}
SMTP user description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateSMTPUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
SMTP user description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
SMTP user description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
SMTP user description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
The updateSmtpUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
SMTP user description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
curl --request PATCH --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}/users/{user_id}' --header 'Authorization: Bearer {TOKEN}' --data '{"description":"{SMTP description}"}'
description := "SMTP user description update" updateSMTPUserOptions := &eventnotificationsv1.UpdateSMTPUserOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), Description: core.StringPtr(description), UserID: core.StringPtr(smtpUserID), } updateSMTPUser, response, err := eventNotificationsService.UpdateSMTPUser(updateSMTPUserOptions)
const description = 'SMTP description update'; const updateSmtpUserParams = { instanceId, id: smtpConfigID, userId: smtpUserID, description, }; try { const res = await eventNotificationsService.updateSmtpUser(updateSmtpUserParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
String description = "description for SMTP user update"; UpdateSmtpUserOptions updateSmtpUserOptionsModel = new UpdateSmtpUserOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .userId(smtpUserID) .description(description) .build(); Response<SMTPUser> response = eventNotificationsService.updateSmtpUser(updateSmtpUserOptionsModel).execute(); SMTPUser responseObj = response.getResult(); System.out.println(responseObj);
description = 'SMTP user description update' update_smtp_user_response = self.event_notifications_service.update_smtp_user( instance_id, id=smtp_config_id, user_id=smtp_user_id, description=description, ) update_smtp_user_response = update_smtp_user_response.get_result() print(json.dumps(update_smtp_user_response, indent=2))
Response
Payload describing a SMTP User
Id
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP confg Id
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
SMTP User description
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
[a-zA-Z 0-9-_/.?:'";,+=!#@$%^&*() ]*
Domain Name
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
.*
SMTP user name
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
.*
Updated time
Updated time
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Payload describing a SMTP User.
{
"id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1",
"smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f",
"description": "SMTP user description",
"domain": "test.event-notifications.test.cloud.ibm.com",
"username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo",
"created_at": "2024-04-16T17:36:24.562614Z",
"updated_at": "2024-04-16T13:16:56.079093Z"
}
Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP confg Id.
Possible values: 32 ≤ length ≤ 100, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP User description.
Possible values: 1 ≤ length ≤ 250, Value must match regular expression
/[a-zA-Z 0-9-_\/.?:'\";,+=!#@$%^&*() ]*/
Domain Name.
Possible values: 1 ≤ length ≤ 512, Value must match regular expression
/.*/
SMTP user name.
Possible values: 3 ≤ length ≤ 250, Value must match regular expression
/.*/
Updated time.
Updated time.
Status Code
SMTP User information
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Request body type is not application/json
Internal server error
Unexpected Error
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
{ "id": "cb8421b2-63c9-43cb-ae6f-16ae53285ba1", "smtp_config_id": "accec70c-752d-4920-bf86-146b2eade10f", "description": "SMTP user description", "domain": "test.event-notifications.test.cloud.ibm.com", "username": "MTIzZTQ1Njc7NTA5NTU2LTMtMTJkMy1hNDU2LTQyNjYxNDE3NDAwMHVzLXNvdXRo", "created_at": "2024-04-16T17:36:24.562614Z", "updated_at": "2024-04-16T13:16:56.079093Z" }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Delete a SMTP user
Delete a SMTP user
Delete a SMTP user.
Delete a SMTP user.
Delete a SMTP user.
Delete a SMTP user.
DELETE /v1/instances/{instance_id}/smtp/config/{id}/users/{user_id}
(eventNotifications *EventNotificationsV1) DeleteSMTPUser(deleteSMTPUserOptions *DeleteSMTPUserOptions) (response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) DeleteSMTPUserWithContext(ctx context.Context, deleteSMTPUserOptions *DeleteSMTPUserOptions) (response *core.DetailedResponse, err error)
deleteSmtpUser(params)
delete_smtp_user(self,
instance_id: str,
id: str,
user_id: str,
**kwargs
) -> DetailedResponse
ServiceCall<Void> deleteSmtpUser(DeleteSmtpUserOptions deleteSmtpUserOptions)
Request
Instantiate the DeleteSMTPUserOptions
struct and set the fields to provide parameter values for the DeleteSMTPUser
method.
Use the DeleteSmtpUserOptions.Builder
to create a DeleteSmtpUserOptions
object that contains the parameter values for the deleteSmtpUser
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
UserID
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
.*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteSMTPUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
The deleteSmtpUser options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
UserID.
Possible values: 5 ≤ length ≤ 256, Value must match regular expression
/.*/
curl --request DELETE --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}/users/{id}' --header 'Authorization: Bearer {TOKEN}'
deleteSMTPUserOptions := &eventnotificationsv1.DeleteSMTPUserOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), UserID: core.StringPtr(ID), } response, err := eventNotificationsService.DeleteSMTPUser(deleteSMTPUserOptions)
const deleteSmtpUserParams = { instanceId, id: smtpConfigID, userId: smtpUserID, }; try { const res = await eventNotificationsService.deleteSmtpUser(deleteSmtpUserParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
DeleteSmtpUserOptions deleteSmtpUserOptionsModel = new DeleteSmtpUserOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .userId(smtpUserID) .build(); Response<Void> response = eventNotificationsService.deleteSmtpUser(deleteSmtpUserOptionsModel).execute(); System.out.println(response);
delete_smtp_user_response = self.event_notifications_service.delete_smtp_user( instance_id, id=smtp_config_id, user_id=smtp_user_id ) print(json.dumps(delete_smtp_user_response, indent=2))
Response
Status Code
Deletion successful with no response content
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Get details of SMTP configuration allowed IPs
Get details of SMTP configuration allowed IPs
Get details of SMTP configuration allowed IPs.
Get details of SMTP configuration allowed IPs.
Get details of SMTP configuration allowed IPs.
Get details of SMTP configuration allowed IPs.
GET /v1/instances/{instance_id}/smtp/config/{id}/allowed_ips
(eventNotifications *EventNotificationsV1) GetSMTPAllowedIps(getSMTPAllowedIpsOptions *GetSMTPAllowedIpsOptions) (result *SMTPAllowedIPs, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) GetSMTPAllowedIpsWithContext(ctx context.Context, getSMTPAllowedIpsOptions *GetSMTPAllowedIpsOptions) (result *SMTPAllowedIPs, response *core.DetailedResponse, err error)
getSmtpAllowedIps(params)
get_smtp_allowed_ips(self,
instance_id: str,
id: str,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPAllowedIPs> getSmtpAllowedIps(GetSmtpAllowedIpsOptions getSmtpAllowedIpsOptions)
Request
Instantiate the GetSMTPAllowedIpsOptions
struct and set the fields to provide parameter values for the GetSMTPAllowedIps
method.
Use the GetSmtpAllowedIpsOptions.Builder
to create a GetSmtpAllowedIpsOptions
object that contains the parameter values for the getSmtpAllowedIps
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetSMTPAllowedIps options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
The getSmtpAllowedIps options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
curl --request GET --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}/allowed_ips' --header 'Authorization: Bearer {TOKEN}'
getSMTPAllowedIPsOptions := &eventnotificationsv1.GetSMTPAllowedIpsOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), } smtpAllowedIPs, response, err := eventNotificationsService.GetSMTPAllowedIps(getSMTPAllowedIPsOptions)
const getSmtpAllowedIpsParams = { instanceId, id: smtpConfigID, }; try { const res = await eventNotificationsService.getSmtpAllowedIps(getSmtpAllowedIpsParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
GetSmtpAllowedIpsOptions getSmtpAllowedIpsOptionsModel = new GetSmtpAllowedIpsOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .build(); Response<SMTPAllowedIPs> response = eventNotificationsService.getSmtpAllowedIps(getSmtpAllowedIpsOptionsModel).execute(); SMTPAllowedIPs responseObj = response.getResult(); System.out.println(responseObj);
get_smtp_allowed_ip_response = self.event_notifications_service.get_smtp_allowed_ips( instance_id, id=smtp_config_id, ) get_smtp_allowed_ip_response = get_smtp_allowed_ip_response.get_result() print(json.dumps(get_smtp_allowed_ip_response, indent=2))
Response
Payload describing a SMTP allowed Ips
The SMTP allowed Ips
Possible values: 1 ≤ number of items ≤ 100, 1 ≤ length ≤ 20, Value must match regular expression
.*
Updated at
Payload describing a SMTP allowed Ips.
{
"subnets": [
"44.255.224.210/20",
"100.113.203.15/26",
"42.15.185.212"
],
"updated_at": "2024-04-16T13:16:56.079093Z"
}
The SMTP allowed Ips.
Possible values: 1 ≤ number of items ≤ 100, 1 ≤ length ≤ 20, Value must match regular expression
/.*/
Updated at.
Payload describing a SMTP allowed Ips.
{
"subnets": [
"44.255.224.210/20",
"100.113.203.15/26",
"42.15.185.212"
],
"updated_at": "2024-04-16T13:16:56.079093Z"
}
The SMTP allowed Ips.
Possible values: 1 ≤ number of items ≤ 100, 1 ≤ length ≤ 20, Value must match regular expression
/.*/
Updated at.
Payload describing a SMTP allowed Ips.
{
"subnets": [
"44.255.224.210/20",
"100.113.203.15/26",
"42.15.185.212"
],
"updated_at": "2024-04-16T13:16:56.079093Z"
}
The SMTP allowed Ips.
Possible values: 1 ≤ number of items ≤ 100, 1 ≤ length ≤ 20, Value must match regular expression
/.*/
Updated at.
Payload describing a SMTP allowed Ips.
{
"subnets": [
"44.255.224.210/20",
"100.113.203.15/26",
"42.15.185.212"
],
"updated_at": "2024-04-16T13:16:56.079093Z"
}
The SMTP allowed Ips.
Possible values: 1 ≤ number of items ≤ 100, 1 ≤ length ≤ 20, Value must match regular expression
/.*/
Updated at.
Status Code
SMTP Allowed Ips information
Trying to access the API with unauthorized token
Requested resource not found
Internal server error
Unexpected Error
{ "subnets": [ "44.255.224.210/20", "100.113.203.15/26", "42.15.185.212" ], "updated_at": "2024-04-16T13:16:56.079093Z" }
{ "subnets": [ "44.255.224.210/20", "100.113.203.15/26", "42.15.185.212" ], "updated_at": "2024-04-16T13:16:56.079093Z" }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
Verify SMTP configuration domain
Verify SMTP configuration domain
Verify SMTP configuration domain.
Verify SMTP configuration domain.
Verify SMTP configuration domain.
Verify SMTP configuration domain.
PATCH /v1/instances/{instance_id}/smtp/config/{id}/verify
(eventNotifications *EventNotificationsV1) UpdateVerifySMTP(updateVerifySMTPOptions *UpdateVerifySMTPOptions) (result *SMTPVerificationUpdateResponse, response *core.DetailedResponse, err error)
(eventNotifications *EventNotificationsV1) UpdateVerifySMTPWithContext(ctx context.Context, updateVerifySMTPOptions *UpdateVerifySMTPOptions) (result *SMTPVerificationUpdateResponse, response *core.DetailedResponse, err error)
updateVerifySmtp(params)
update_verify_smtp(self,
instance_id: str,
id: str,
type: str,
**kwargs
) -> DetailedResponse
ServiceCall<SMTPVerificationUpdateResponse> updateVerifySmtp(UpdateVerifySmtpOptions updateVerifySmtpOptions)
Request
Instantiate the UpdateVerifySMTPOptions
struct and set the fields to provide parameter values for the UpdateVerifySMTP
method.
Use the UpdateVerifySmtpOptions.Builder
to create a UpdateVerifySmtpOptions
object that contains the parameter values for the updateVerifySmtp
method.
Path Parameters
Unique identifier for IBM Cloud Event Notifications instance
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]
Unique identifier for SMTP
Possible values: length = 32, Value must match regular expression
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Query Parameters
SMTP verification type
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
.*
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The UpdateVerifySMTP options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
parameters
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
The updateVerifySmtp options.
Unique identifier for IBM Cloud Event Notifications instance.
Possible values: 10 ≤ length ≤ 256, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]/
Unique identifier for SMTP.
Possible values: length = 32, Value must match regular expression
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/
SMTP verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
curl --request PATCH --url 'https://{REGION}.event-notifications.cloud.ibm.com/event-notifications/v1/instances/{instance_id}/smtp/config/{id}/verify?type=dkim,spf,en_authorization' --header 'Authorization: Bearer {TOKEN}'
updateVerifySMTPOptions := &eventnotificationsv1.UpdateVerifySMTPOptions{ InstanceID: core.StringPtr(instanceID), ID: core.StringPtr(smtpConfigID), Type: core.StringPtr("dkim,spf,en_authorization"), } verifySMTP, response, err := eventNotificationsService.UpdateVerifySMTP(updateVerifySMTPOptions)
const type = 'dkim,spf,en_authorization'; const updateVerifySmtpParams = { instanceId, id: smtpConfigID, type, }; try { const res = await eventNotificationsService.updateVerifySmtp(updateVerifySmtpParams); console.log(JSON.stringify(res.result, null, 2)); } catch (err) { console.warn(err); }
UpdateVerifySmtpOptions updateVerifySmtpOptions = new UpdateVerifySmtpOptions.Builder() .instanceId(instanceId) .id(smtpConfigID) .type("dkim,spf,en_authorization") .build(); Response<SMTPVerificationUpdateResponse> response = eventNotificationsService.updateVerifySmtp(updateVerifySmtpOptions).execute(); SMTPVerificationUpdateResponse updateVerifySmtpResponse = response.getResult(); System.out.println(updateVerifySmtpResponse);
update_verify_smtp_response = self.event_notifications_service.update_verify_smtp( instance_id, type="dkim,spf,en_authorization", id=smtp_config_id ) verify_response = update_verify_smtp_response.get_result() print(json.dumps(verify_response, indent=2))
Response
Payload describing SMTP verification response
SMTP verification status
Possible values: 0 ≤ number of items ≤ 100
Payload describing SMTP verification response.
{
"status": [
{
"type": "spf",
"verification": "SUCCESSFUL"
},
{
"type": "dkim",
"verification": "SUCCESSFUL"
},
{
"type": "en_authorization",
"verification": "SUCCESSFUL"
}
]
}
SMTP verification status.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "type": "dkim", "verification": "SUCCESSFUL" }
- Status
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Payload describing SMTP verification response.
{
"status": [
{
"type": "spf",
"verification": "SUCCESSFUL"
},
{
"type": "dkim",
"verification": "SUCCESSFUL"
},
{
"type": "en_authorization",
"verification": "SUCCESSFUL"
}
]
}
SMTP verification status.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "type": "dkim", "verification": "SUCCESSFUL" }
- status
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Payload describing SMTP verification response.
{
"status": [
{
"type": "spf",
"verification": "SUCCESSFUL"
},
{
"type": "dkim",
"verification": "SUCCESSFUL"
},
{
"type": "en_authorization",
"verification": "SUCCESSFUL"
}
]
}
SMTP verification status.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "type": "dkim", "verification": "SUCCESSFUL" }
- status
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Payload describing SMTP verification response.
{
"status": [
{
"type": "spf",
"verification": "SUCCESSFUL"
},
{
"type": "dkim",
"verification": "SUCCESSFUL"
},
{
"type": "en_authorization",
"verification": "SUCCESSFUL"
}
]
}
SMTP verification status.
Possible values: 0 ≤ number of items ≤ 100
Examples:{ "type": "dkim", "verification": "SUCCESSFUL" }
- status
verification type.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/.*/
verification status.
Possible values: 1 ≤ length ≤ 20, Value must match regular expression
/[A-Z]/
Status Code
Response body after SMTP verification
Bad or incorrect request body
Trying to access the API with unauthorized token
Requested resource not found
Request body type is not application/json
Internal server error
Unexpected Error
{ "status": [ { "type": "spf", "verification": "SUCCESSFUL" }, { "type": "dkim", "verification": "SUCCESSFUL" }, { "type": "en_authorization", "verification": "SUCCESSFUL" } ] }
{ "status": [ { "type": "spf", "verification": "SUCCESSFUL" }, { "type": "dkim", "verification": "SUCCESSFUL" }, { "type": "en_authorization", "verification": "SUCCESSFUL" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "11a35929-7cb8-4f06-bd64-abe9c391b06d", "status_code": 400, "errors": [ { "code": "incorrect_json", "message": "Required JSON parameters missing or incorrect", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "c327fb84-bd47-4726-9946-01f6ecb29734", "status_code": 401, "errors": [ { "code": "unauthorized", "message": "User authorization failed", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-authentication" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "208fddf2-dd25-481d-b180-809422a1b5ac", "status_code": 404, "errors": [ { "code": "not_found", "message": "Requested resource not found", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 415, "errors": [ { "code": "media_type_error", "message": "Content-Type header is wrong", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }
{ "trace": "abecd699-bcf4-4298-9cd0-a88bbf1d18c9", "status_code": 500, "errors": [ { "code": "cnfser01", "message": "Unexpected internal server error", "more_info": "https://cloud.ibm.com/apidocs/event-notifications#event-notifications-api-http-response-codes" } ] }