Skip to content

Support Templates

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/support-templates/ List Support Templates
GET /api/support-templates/{uuid}/ Retrieve
POST /api/support-templates/ Create
POST /api/support-templates/{uuid}/create_attachments/ This view attaches documents to template
PUT /api/support-templates/{uuid}/ Update
PATCH /api/support-templates/{uuid}/ Partial Update
DELETE /api/support-templates/{uuid}/ Delete
Other Actions
POST /api/support-templates/{uuid}/delete_attachments/ Delete attachments

Core CRUD

List Support Templates

1
2
3
4
http \
  GET \
  https://api.example.com/api/support-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.support_templates import support_templates_list # (1)

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

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

try {
  const response = await supportTemplatesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
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
description string
issue_type string
attachments array of objects
attachments.uuid string (uuid)
attachments.name string
attachments.file string (uri)
attachments.mime_type string
attachments.file_size integer
attachments.created string (date-time)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/support-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.support_templates import support_templates_retrieve # (1)

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

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

try {
  const response = await supportTemplatesRetrieve({
  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
description string
issue_type string
attachments array of objects
attachments.uuid string (uuid)
attachments.name string
attachments.file string (uri)
attachments.mime_type string
attachments.file_size integer
attachments.created string (date-time)

Create

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/support-templates/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-support-template" \
  description="A sample description."
 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.template_request import TemplateRequest # (1)
from waldur_api_client.api.support_templates import support_templates_create # (2)

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

body_data = TemplateRequest(
    name="my-awesome-support-template",
    description="A sample description."
)
response = support_templates_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await supportTemplatesCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-support-template",
    "description": "A sample description."
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
description string
issue_type string

201 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
issue_type string
attachments array of objects
attachments.uuid string (uuid)
attachments.name string
attachments.file string (uri)
attachments.mime_type string
attachments.file_size integer
attachments.created string (date-time)

This view attaches documents to template

This view attaches documents to template.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/support-templates/a1b2c3d4-e5f6-7890-abcd-ef1234567890/create_attachments/ \
  Authorization:"Token YOUR_API_TOKEN" \
  attachments:='[]'
 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.create_attachments_request import CreateAttachmentsRequest # (1)
from waldur_api_client.api.support_templates import support_templates_create_attachments # (2)

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

body_data = CreateAttachmentsRequest(
    attachments=[]
)
response = support_templates_create_attachments.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await supportTemplatesCreateAttachments({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "attachments": []
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
attachments array of string (binary)s

201 - No response body


400 - No response body


Update

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/support-templates/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-support-template" \
  description="A sample description."
 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.template_request import TemplateRequest # (1)
from waldur_api_client.api.support_templates import support_templates_update # (2)

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

body_data = TemplateRequest(
    name="my-awesome-support-template",
    description="A sample description."
)
response = support_templates_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await supportTemplatesUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-support-template",
    "description": "A sample description."
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string
issue_type string

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
issue_type string
attachments array of objects
attachments.uuid string (uuid)
attachments.name string
attachments.file string (uri)
attachments.mime_type string
attachments.file_size integer
attachments.created string (date-time)

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/support-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_template_request import PatchedTemplateRequest # (1)
from waldur_api_client.api.support_templates import support_templates_partial_update # (2)

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

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

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

try {
  const response = await supportTemplatesPartialUpdate({
  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
description string
issue_type string

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
issue_type string
attachments array of objects
attachments.uuid string (uuid)
attachments.name string
attachments.file string (uri)
attachments.mime_type string
attachments.file_size integer
attachments.created string (date-time)

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/support-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.support_templates import support_templates_destroy # (1)

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

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

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

Delete attachments

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/support-templates/a1b2c3d4-e5f6-7890-abcd-ef1234567890/delete_attachments/ \
  Authorization:"Token YOUR_API_TOKEN" \
  attachment_ids:='[]'
 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.delete_attachments_request import DeleteAttachmentsRequest # (1)
from waldur_api_client.api.support_templates import support_templates_delete_attachments # (2)

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

body_data = DeleteAttachmentsRequest(
    attachment_ids=[]
)
response = support_templates_delete_attachments.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await supportTemplatesDeleteAttachments({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "attachment_ids": []
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
attachment_ids array of string (uuid)s

200 - No response body