Skip to content

Hooks Email

Operations Summary

Method Endpoint Description
GET /api/hooks-email/ List Hooks Email
GET /api/hooks-email/{uuid}/ Retrieve
POST /api/hooks-email/ Create
PUT /api/hooks-email/{uuid}/ Update
PATCH /api/hooks-email/{uuid}/ Partial Update
DELETE /api/hooks-email/{uuid}/ Delete

List Hooks Email

1
2
3
4
http \
  GET \
  https://api.example.com/api/hooks-email/ \
  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.hooks_email import hooks_email_list # (1)

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

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

try {
  const response = await hooksEmailList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
author_email string
author_fullname string User full name contains
author_username string
author_uuid string (uuid)
email string
is_active boolean
last_published string (date-time)
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
query string Filter by author name, username and email

200 -

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

Field Type
url string (uri)
uuid string (uuid)
is_active boolean
author_uuid string (uuid)
event_types array of strings
event_groups array of strings
created string (date-time)
modified string (date-time)
hook_type string
author_fullname string
author_username string
author_email string
email string (email)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/hooks-email/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.hooks_email import hooks_email_retrieve # (1)

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

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

try {
  const response = await hooksEmailRetrieve({
  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)
is_active boolean
author_uuid string (uuid)
event_types array of strings
event_groups array of strings
created string (date-time)
modified string (date-time)
hook_type string
author_fullname string
author_username string
author_email string
email string (email)

Create

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/hooks-email/ \
  Authorization:"Token YOUR_API_TOKEN" \
  email="alice@example.com"
 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.email_hook_request import EmailHookRequest # (1)
from waldur_api_client.api.hooks_email import hooks_email_create # (2)

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

body_data = EmailHookRequest(
    email="alice@example.com"
)
response = hooks_email_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await hooksEmailCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "email": "alice@example.com"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
is_active boolean
event_types array of strings
event_groups array of strings
email string (email)

201 -

Field Type
url string (uri)
uuid string (uuid)
is_active boolean
author_uuid string (uuid)
event_types array of strings
event_groups array of strings
created string (date-time)
modified string (date-time)
hook_type string
author_fullname string
author_username string
author_email string
email string (email)

Update

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/hooks-email/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  email="alice@example.com"
 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.email_hook_request import EmailHookRequest # (1)
from waldur_api_client.api.hooks_email import hooks_email_update # (2)

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

body_data = EmailHookRequest(
    email="alice@example.com"
)
response = hooks_email_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await hooksEmailUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "email": "alice@example.com"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
is_active boolean
event_types array of strings
event_groups array of strings
email string (email)

200 -

Field Type
url string (uri)
uuid string (uuid)
is_active boolean
author_uuid string (uuid)
event_types array of strings
event_groups array of strings
created string (date-time)
modified string (date-time)
hook_type string
author_fullname string
author_username string
author_email string
email string (email)

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/hooks-email/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_email_hook_request import PatchedEmailHookRequest # (1)
from waldur_api_client.api.hooks_email import hooks_email_partial_update # (2)

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

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

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

try {
  const response = await hooksEmailPartialUpdate({
  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
is_active boolean
event_types array of strings
event_groups array of strings
email string (email)

200 -

Field Type
url string (uri)
uuid string (uuid)
is_active boolean
author_uuid string (uuid)
event_types array of strings
event_groups array of strings
created string (date-time)
modified string (date-time)
hook_type string
author_fullname string
author_username string
author_email string
email string (email)

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/hooks-email/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.hooks_email import hooks_email_destroy # (1)

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

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

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