Skip to content

Notification Messages

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/notification-messages/ List Notification Messages
GET /api/notification-messages/{uuid}/ Retrieve
POST /api/notification-messages/ Create
PUT /api/notification-messages/{uuid}/ Update
PATCH /api/notification-messages/{uuid}/ Partial Update
DELETE /api/notification-messages/{uuid}/ Delete
Other Actions
POST /api/notification-messages/{uuid}/disable/ Disable a notification
POST /api/notification-messages/{uuid}/enable/ Enable a notification

Core CRUD

List Notification Messages

1
2
3
4
http \
  GET \
  https://api.example.com/api/notification-messages/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.notification_messages import notification_messages_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = notification_messages_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: notification_messages_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { notificationMessagesList } from 'waldur-js-client';

try {
  const response = await notificationMessagesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
description string
is_overridden boolean
key string
name string
name_exact string
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
query string Filter by key or description

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
uuid string (uuid)
url string (uri)
key string
description string
enabled boolean Indicates if notification is enabled or disabled
created string (date-time)
templates array of objects
templates.uuid string (uuid)
templates.url string (uri)
templates.path string Example: 'flatpages/default.html'
templates.name string
templates.content string
templates.original_content string
templates.is_content_overridden boolean
context_schema object (free-form) Finds the notification definition in the global NOTIFICATIONS dictionary and returns its 'context' schema.

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/notification-messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.notification_messages import notification_messages_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = notification_messages_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: notification_messages_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { notificationMessagesRetrieve } from 'waldur-js-client';

try {
  const response = await notificationMessagesRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type Description
uuid string (uuid)
url string (uri)
key string
description string
enabled boolean Indicates if notification is enabled or disabled
created string (date-time)
templates array of objects
templates.uuid string (uuid)
templates.url string (uri)
templates.path string Example: 'flatpages/default.html'
templates.name string
templates.content string
templates.original_content string
templates.is_content_overridden boolean
context_schema object (free-form) Finds the notification definition in the global NOTIFICATIONS dictionary and returns its 'context' schema.

Create

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/notification-messages/ \
  Authorization:"Token YOUR_API_TOKEN" \
  key="ssh-rsa AAAAB3NzaC1yc2EAAA..."
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.notification_request import NotificationRequest # (1)
from waldur_api_client.api.notification_messages import notification_messages_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = NotificationRequest(
    key="ssh-rsa AAAAB3NzaC1yc2EAAA..."
)
response = notification_messages_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: NotificationRequest
  2. API Source: notification_messages_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { notificationMessagesCreate } from 'waldur-js-client';

try {
  const response = await notificationMessagesCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAA..."
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
key string
description string

201 -

Field Type Description
uuid string (uuid)
url string (uri)
key string
description string
enabled boolean Indicates if notification is enabled or disabled
created string (date-time)
templates array of objects
templates.uuid string (uuid)
templates.url string (uri)
templates.path string Example: 'flatpages/default.html'
templates.name string
templates.content string
templates.original_content string
templates.is_content_overridden boolean
context_schema object (free-form) Finds the notification definition in the global NOTIFICATIONS dictionary and returns its 'context' schema.

Update

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/notification-messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  key="ssh-rsa AAAAB3NzaC1yc2EAAA..."
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.notification_request import NotificationRequest # (1)
from waldur_api_client.api.notification_messages import notification_messages_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = NotificationRequest(
    key="ssh-rsa AAAAB3NzaC1yc2EAAA..."
)
response = notification_messages_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: NotificationRequest
  2. API Source: notification_messages_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { notificationMessagesUpdate } from 'waldur-js-client';

try {
  const response = await notificationMessagesUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAA..."
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
key string
description string

200 -

Field Type Description
uuid string (uuid)
url string (uri)
key string
description string
enabled boolean Indicates if notification is enabled or disabled
created string (date-time)
templates array of objects
templates.uuid string (uuid)
templates.url string (uri)
templates.path string Example: 'flatpages/default.html'
templates.name string
templates.content string
templates.original_content string
templates.is_content_overridden boolean
context_schema object (free-form) Finds the notification definition in the global NOTIFICATIONS dictionary and returns its 'context' schema.

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/notification-messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_notification_request import PatchedNotificationRequest # (1)
from waldur_api_client.api.notification_messages import notification_messages_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedNotificationRequest()
response = notification_messages_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedNotificationRequest
  2. API Source: notification_messages_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { notificationMessagesPartialUpdate } from 'waldur-js-client';

try {
  const response = await notificationMessagesPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
key string
description string

200 -

Field Type Description
uuid string (uuid)
url string (uri)
key string
description string
enabled boolean Indicates if notification is enabled or disabled
created string (date-time)
templates array of objects
templates.uuid string (uuid)
templates.url string (uri)
templates.path string Example: 'flatpages/default.html'
templates.name string
templates.content string
templates.original_content string
templates.is_content_overridden boolean
context_schema object (free-form) Finds the notification definition in the global NOTIFICATIONS dictionary and returns its 'context' schema.

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/notification-messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.notification_messages import notification_messages_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = notification_messages_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: notification_messages_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { notificationMessagesDestroy } from 'waldur-js-client';

try {
  const response = await notificationMessagesDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Disable a notification

1
2
3
4
http \
  POST \
  https://api.example.com/api/notification-messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/disable/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.notification_messages import notification_messages_disable # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = notification_messages_disable.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: notification_messages_disable
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { notificationMessagesDisable } from 'waldur-js-client';

try {
  const response = await notificationMessagesDisable({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Enable a notification

1
2
3
4
http \
  POST \
  https://api.example.com/api/notification-messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890/enable/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.notification_messages import notification_messages_enable # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = notification_messages_enable.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: notification_messages_enable
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { notificationMessagesEnable } from 'waldur-js-client';

try {
  const response = await notificationMessagesEnable({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body