pdf_generator_client.TemplateVariablesApi
All URIs are relative to /api
| Method | HTTP request | Description |
|---|---|---|
| create | POST /template-variables | Create a variable |
| destroy | DELETE /template-variables/{lookup} | Delete a variable |
| list | GET /template-variables | List template variables |
| replace | PUT /template-variables/{lookup} | Replace a variable |
| retrieve | GET /template-variables/{lookup} | Get a variable |
| update | PATCH /template-variables/{lookup} | Update a variable |
create
TemplateVariable create(create_template_variable_dto, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
Create a variable
Create a new template variable (Admin only)
Example
- Api Key Authentication (api-key):
import pdf_generator_client
from pdf_generator_client.models.create_template_variable_dto import CreateTemplateVariableDto
from pdf_generator_client.models.template_variable import TemplateVariable
from pdf_generator_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = pdf_generator_client.Configuration(
host = "/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: api-key
configuration.api_key['api-key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Enter a context with an instance of the API client
with pdf_generator_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pdf_generator_client.TemplateVariablesApi(api_client)
create_template_variable_dto = pdf_generator_client.CreateTemplateVariableDto() # CreateTemplateVariableDto |
limit = 3.4 # float | (optional)
offset = 3.4 # float | (optional)
order = ['order_example'] # List[str] | (optional)
filter = ['filter_example'] # List[str] | (optional)
var_or = ['var_or_example'] # List[str] | (optional)
expand = ['expand_example'] # List[str] | (optional)
try:
# Create a variable
api_response = api_instance.create(create_template_variable_dto, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
print("The response of TemplateVariablesApi->create:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TemplateVariablesApi->create: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| create_template_variable_dto | CreateTemplateVariableDto | ||
| limit | float | [optional] | |
| offset | float | [optional] | |
| order | List[str] | [optional] | |
| filter | List[str] | [optional] | |
| var_or | List[str] | [optional] | |
| expand | List[str] | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Create new TemplateVariable | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
destroy
destroy(lookup)
Delete a variable
Delete a template variable (Admin only)
Example
- Api Key Authentication (api-key):
import pdf_generator_client
from pdf_generator_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = pdf_generator_client.Configuration(
host = "/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: api-key
configuration.api_key['api-key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Enter a context with an instance of the API client
with pdf_generator_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pdf_generator_client.TemplateVariablesApi(api_client)
lookup = 3.4 # float |
try:
# Delete a variable
api_instance.destroy(lookup)
except Exception as e:
print("Exception when calling TemplateVariablesApi->destroy: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | float |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Delete TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list
TemplateVariableListResponseDto list(limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
List template variables
List variables, optionally filter by template
Example
- Api Key Authentication (api-key):
import pdf_generator_client
from pdf_generator_client.models.template_variable_list_response_dto import TemplateVariableListResponseDto
from pdf_generator_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = pdf_generator_client.Configuration(
host = "/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: api-key
configuration.api_key['api-key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Enter a context with an instance of the API client
with pdf_generator_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pdf_generator_client.TemplateVariablesApi(api_client)
limit = 3.4 # float | (optional)
offset = 3.4 # float | (optional)
order = ['order_example'] # List[str] | (optional)
filter = ['filter_example'] # List[str] | (optional)
var_or = ['var_or_example'] # List[str] | (optional)
expand = ['expand_example'] # List[str] | (optional)
try:
# List template variables
api_response = api_instance.list(limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
print("The response of TemplateVariablesApi->list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TemplateVariablesApi->list: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | float | [optional] | |
| offset | float | [optional] | |
| order | List[str] | [optional] | |
| filter | List[str] | [optional] | |
| var_or | List[str] | [optional] | |
| expand | List[str] | [optional] |
Return type
TemplateVariableListResponseDto
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Returns a list of TemplateVariable | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
replace
TemplateVariable replace(lookup, create_template_variable_dto, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
Replace a variable
Full replace of a template variable (Admin only)
Example
- Api Key Authentication (api-key):
import pdf_generator_client
from pdf_generator_client.models.create_template_variable_dto import CreateTemplateVariableDto
from pdf_generator_client.models.template_variable import TemplateVariable
from pdf_generator_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = pdf_generator_client.Configuration(
host = "/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: api-key
configuration.api_key['api-key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Enter a context with an instance of the API client
with pdf_generator_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pdf_generator_client.TemplateVariablesApi(api_client)
lookup = 3.4 # float |
create_template_variable_dto = pdf_generator_client.CreateTemplateVariableDto() # CreateTemplateVariableDto |
limit = 3.4 # float | (optional)
offset = 3.4 # float | (optional)
order = ['order_example'] # List[str] | (optional)
filter = ['filter_example'] # List[str] | (optional)
var_or = ['var_or_example'] # List[str] | (optional)
expand = ['expand_example'] # List[str] | (optional)
try:
# Replace a variable
api_response = api_instance.replace(lookup, create_template_variable_dto, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
print("The response of TemplateVariablesApi->replace:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TemplateVariablesApi->replace: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | float | ||
| create_template_variable_dto | CreateTemplateVariableDto | ||
| limit | float | [optional] | |
| offset | float | [optional] | |
| order | List[str] | [optional] | |
| filter | List[str] | [optional] | |
| var_or | List[str] | [optional] | |
| expand | List[str] | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Replace TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
retrieve
TemplateVariable retrieve(lookup, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
Get a variable
Get a single template variable by ID
Example
- Api Key Authentication (api-key):
import pdf_generator_client
from pdf_generator_client.models.template_variable import TemplateVariable
from pdf_generator_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = pdf_generator_client.Configuration(
host = "/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: api-key
configuration.api_key['api-key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Enter a context with an instance of the API client
with pdf_generator_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pdf_generator_client.TemplateVariablesApi(api_client)
lookup = 3.4 # float |
limit = 3.4 # float | (optional)
offset = 3.4 # float | (optional)
order = ['order_example'] # List[str] | (optional)
filter = ['filter_example'] # List[str] | (optional)
var_or = ['var_or_example'] # List[str] | (optional)
expand = ['expand_example'] # List[str] | (optional)
try:
# Get a variable
api_response = api_instance.retrieve(lookup, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
print("The response of TemplateVariablesApi->retrieve:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TemplateVariablesApi->retrieve: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | float | ||
| limit | float | [optional] | |
| offset | float | [optional] | |
| order | List[str] | [optional] | |
| filter | List[str] | [optional] | |
| var_or | List[str] | [optional] | |
| expand | List[str] | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Retrieve TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update
TemplateVariable update(lookup, update_template_variable_dto, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
Update a variable
Update a template variable (Admin only)
Example
- Api Key Authentication (api-key):
import pdf_generator_client
from pdf_generator_client.models.template_variable import TemplateVariable
from pdf_generator_client.models.update_template_variable_dto import UpdateTemplateVariableDto
from pdf_generator_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = pdf_generator_client.Configuration(
host = "/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: api-key
configuration.api_key['api-key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Enter a context with an instance of the API client
with pdf_generator_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pdf_generator_client.TemplateVariablesApi(api_client)
lookup = 3.4 # float |
update_template_variable_dto = pdf_generator_client.UpdateTemplateVariableDto() # UpdateTemplateVariableDto |
limit = 3.4 # float | (optional)
offset = 3.4 # float | (optional)
order = ['order_example'] # List[str] | (optional)
filter = ['filter_example'] # List[str] | (optional)
var_or = ['var_or_example'] # List[str] | (optional)
expand = ['expand_example'] # List[str] | (optional)
try:
# Update a variable
api_response = api_instance.update(lookup, update_template_variable_dto, limit=limit, offset=offset, order=order, filter=filter, var_or=var_or, expand=expand)
print("The response of TemplateVariablesApi->update:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TemplateVariablesApi->update: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | float | ||
| update_template_variable_dto | UpdateTemplateVariableDto | ||
| limit | float | [optional] | |
| offset | float | [optional] | |
| order | List[str] | [optional] | |
| filter | List[str] | [optional] | |
| var_or | List[str] | [optional] | |
| expand | List[str] | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Update/patch TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]