Skip to content

Broadcast Message Templates

Operations Summary

Method Endpoint Description
GET /api/broadcast-message-templates/ List Broadcast Message Templates
GET /api/broadcast-message-templates/{uuid}/ Retrieve
POST /api/broadcast-message-templates/ Create
PUT /api/broadcast-message-templates/{uuid}/ Update
PATCH /api/broadcast-message-templates/{uuid}/ Partial Update
DELETE /api/broadcast-message-templates/{uuid}/ Delete

List Broadcast Message Templates

1
2
3
4
http \
  GET \
  https://api.example.com/api/broadcast-message-templates/ \
  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.broadcast_message_templates import broadcast_message_templates_list # (1)

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

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

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

200 -

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

Field Type
url string (uri)
uuid string (uuid)
name string
subject string
body string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/broadcast-message-templates/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.broadcast_message_templates import broadcast_message_templates_retrieve # (1)

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

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

try {
  const response = await broadcastMessageTemplatesRetrieve({
  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
url string (uri)
uuid string (uuid)
name string
subject string
body string

Create

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/broadcast-message-templates/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-broadcast-message-template" \
  subject="string-value" \
  body="string-value"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.message_template_request import MessageTemplateRequest # (1)
from waldur_api_client.api.broadcast_message_templates import broadcast_message_templates_create # (2)

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

body_data = MessageTemplateRequest(
    name="my-awesome-broadcast-message-template",
    subject="string-value",
    body="string-value"
)
response = broadcast_message_templates_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await broadcastMessageTemplatesCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-broadcast-message-template",
    "subject": "string-value",
    "body": "string-value"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
subject string
body string

201 -

Field Type
url string (uri)
uuid string (uuid)
name string
subject string
body string

Update

1
2
3
4
5
6
7
http \
  PUT \
  https://api.example.com/api/broadcast-message-templates/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-broadcast-message-template" \
  subject="string-value" \
  body="string-value"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.message_template_request import MessageTemplateRequest # (1)
from waldur_api_client.api.broadcast_message_templates import broadcast_message_templates_update # (2)

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

body_data = MessageTemplateRequest(
    name="my-awesome-broadcast-message-template",
    subject="string-value",
    body="string-value"
)
response = broadcast_message_templates_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await broadcastMessageTemplatesUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-broadcast-message-template",
    "subject": "string-value",
    "body": "string-value"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
subject string
body string

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
subject string
body string

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/broadcast-message-templates/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_message_template_request import PatchedMessageTemplateRequest # (1)
from waldur_api_client.api.broadcast_message_templates import broadcast_message_templates_partial_update # (2)

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

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

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

try {
  const response = await broadcastMessageTemplatesPartialUpdate({
  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
name string
subject string
body string

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
subject string
body string

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/broadcast-message-templates/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.broadcast_message_templates import broadcast_message_templates_destroy # (1)

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

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

try {
  const response = await broadcastMessageTemplatesDestroy({
  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