Skip to content

Event Subscriptions

Operations Summary

Method Endpoint Description
GET /api/event-subscriptions/ List Event Subscriptions
GET /api/event-subscriptions/{uuid}/ Retrieve
POST /api/event-subscriptions/ Create
DELETE /api/event-subscriptions/{uuid}/ Delete

List Event Subscriptions

1
2
3
4
http \
  GET \
  https://api.example.com/api/event-subscriptions/ \
  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.event_subscriptions import event_subscriptions_list # (1)

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

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

try {
  const response = await eventSubscriptionsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
user_username string
user_uuid string

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)
description string
user string (uri)
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
user_full_name string
observable_objects any
created string (date-time)
modified string (date-time)
source_ip any An IPv4 or IPv6 address.

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/event-subscriptions/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.event_subscriptions import event_subscriptions_retrieve # (1)

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

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

try {
  const response = await eventSubscriptionsRetrieve({
  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)
description string
user string (uri)
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
user_full_name string
observable_objects any
created string (date-time)
modified string (date-time)
source_ip any An IPv4 or IPv6 address.

Create

1
2
3
4
http \
  POST \
  https://api.example.com/api/event-subscriptions/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.event_subscription_request import EventSubscriptionRequest # (1)
from waldur_api_client.api.event_subscriptions import event_subscriptions_create # (2)

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

body_data = EventSubscriptionRequest()
response = event_subscriptions_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: EventSubscriptionRequest
  2. API Source: event_subscriptions_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { eventSubscriptionsCreate } from 'waldur-js-client';

try {
  const response = await eventSubscriptionsCreate({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
description string
observable_objects any

201 -

Field Type Description
uuid string (uuid)
url string (uri)
description string
user string (uri)
user_uuid string (uuid)
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
user_full_name string
observable_objects any
created string (date-time)
modified string (date-time)
source_ip any An IPv4 or IPv6 address.

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/event-subscriptions/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.event_subscriptions import event_subscriptions_destroy # (1)

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

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

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