Interface TemplatesService
-
Method Summary
Modifier and TypeMethodDescriptioncopyVersion(String domainName, String templateName, String versionName, String newVersionName) Copy a version (using default parameters)copyVersion(String domainName, String templateName, String versionName, String newVersionName, CopyVersionQueryParameters queryParameter) Copy a versioncreate(String domainName, CreateTemplateRequest requestParameters) Create a templatecreateVersion(String domainName, String templateName, CreateVersionRequest requestParameters) Create a template versioncreateWithActiveVersion(String domainName, CreateTemplateRequest templateRequestParameters, CreateVersionRequest versionRequestParameters) Create a templatevoidDelete a templatevoidDelete all templatesvoiddeleteVersion(String domainName, String templateName, String versionName) Delete a versionGet template (using default parameters)getActiveVersion(String domainName, String templateName) Get Template's active versiongetVersion(String domainName, String templateName, String versionName) Get a versionGet templates (using default parameters)list(String domainName, ListTemplatesQueryParameters queryParameter) Get templateslistVersions(String domainName, String templateName) Get all template versions (using default parameters)listVersions(String domainName, String templateName, ListVersionsQueryParameters queryParameter) Get all template versionsvoidupdate(String domainName, String templateName, UpdateTemplateRequest requestParameters) Update templatevoidupdateVersion(String domainName, String templateName, String versionName, UpdateVersionRequest requestParameters) Update a version
-
Method Details
-
copyVersion
VersionDetails copyVersion(String domainName, String templateName, String versionName, String newVersionName) throws ApiException Copy a version (using default parameters)Copies an existing version into a new version with the provided name.
- Parameters:
domainName- Domain name the template is associated with. (required)templateName- template name the version is stored under. (required)versionName- Tag of the version to copy. (required)newVersionName- The name for the new version. If the version name already exists, it will be overridden. (required)- Returns:
- VersionDetails
- Throws:
ApiException- if fails to make API call
-
copyVersion
VersionDetails copyVersion(String domainName, String templateName, String versionName, String newVersionName, CopyVersionQueryParameters queryParameter) throws ApiException Copy a versionCopies an existing version into a new version with the provided name.
- Parameters:
domainName- Domain name the template is associated with. (required)templateName- template name the version is stored under. (required)versionName- Tag of the version to copy. (required)newVersionName- The name for the new version. If the version name already exists, it will be overridden. (required)queryParameter- (optional)- Returns:
- VersionDetails
- Throws:
ApiException- if fails to make API call
-
create
Create a templateStore a new template, including its name, description and (optionally) the template content. If the template content is provided, a new version is automatically created and becomes the active version.
- Parameters:
domainName- Domain name the template is associated with. (required)requestParameters- Request parameters- Returns:
- Template
- Throws:
ApiException- if fails to make API call
-
createWithActiveVersion
Pair<Template,VersionDetails> createWithActiveVersion(String domainName, CreateTemplateRequest templateRequestParameters, CreateVersionRequest versionRequestParameters) throws ApiException Create a templateStore a new template, including its name, description and the template content. A new version is automatically created and becomes the active version.
- Parameters:
domainName- Domain name the template is associated with. (required)templateRequestParameters- Template parameters for creationversionRequestParameters- Version parameters for creation. The active field will be ignored and created version will become active- Returns:
- Information about created Template and Version
- Throws:
ApiException- if fails to make API call
-
createVersion
VersionDetails createVersion(String domainName, String templateName, CreateVersionRequest requestParameters) throws ApiException Create a template versionAdds a new template version. If the template doesn’t contain any other versions, the first version becomes active. A template can store up to 40 versions.
- Parameters:
domainName- Domain name the template is associated with. (required)templateName- template name to create the new version for. (required)requestParameters- Request parameters- Returns:
- VersionDetails
- Throws:
ApiException- if fails to make API call
-
delete
Delete a templateDelete the template specified in the url. NOTE: This method deletes all versions of the specified template.
- Parameters:
domainName- Domain name the template is associated with. (required)templateName- template name to be deleted. (required)- Throws:
ApiException- if fails to make API call
-
deleteAll
Delete all templatesDelete all templates and their versions for the domain.
- Parameters:
domainName- Domain name the template is associated with. (required)- Throws:
ApiException- if fails to make API call
-
deleteVersion
Delete a versionDelete a specific template version.
- Parameters:
domainName- Domain name the template is associated with. (required)templateName- template name the version is stored under. (required)versionName- Tag of the version of the template to be deleted. (required)- Throws:
ApiException- if fails to make API call
-
get
Get template (using default parameters)Returns metadata information about the stored template specified in the url. If the active flag is provided, the content of the active version of the template is returned.
- Parameters:
domainName- Domain name the template is stored under. (required)templateName- Template name to fetch. (required)- Returns:
- Template
- Throws:
ApiException- if fails to make API call
-
getActiveVersion
Get Template's active version- Parameters:
domainName- Domain name the template is stored under. (required)templateName- Template name to fetch. (required)- Returns:
- VersionDetails
- Throws:
ApiException- if fails to make API call
-
getVersion
VersionDetails getVersion(String domainName, String templateName, String versionName) throws ApiException Get a versionRetrieve the information and content of the specified version of a template.
- Parameters:
domainName- Domain name the template is stored under. (required)templateName- template name the version is for. (required)versionName- Tag of the version of the template to fetch. (required)- Returns:
- VersionDetails
- Throws:
ApiException- if fails to make API call
-
list
Get templates (using default parameters)Returns a list of templates for the domain.
- Parameters:
domainName- Domain name to fetch the templates for. (required)- Returns:
- ListTemplatesResponse
- Throws:
ApiException- if fails to make API call
-
list
ListTemplatesResponse list(String domainName, ListTemplatesQueryParameters queryParameter) throws ApiException Get templatesReturns a list of templates for the domain.
- Parameters:
domainName- Domain name to fetch the templates for. (required)queryParameter- (optional)- Returns:
- ListTemplatesResponse
- Throws:
ApiException- if fails to make API call
-
listVersions
Get all template versions (using default parameters)Returns a paginated list of template versions.
- Parameters:
domainName- Domain name to fetch the templates for. (required)templateName- template name to fetch the versions for. (required)- Returns:
- ListVersionsResponse
- Throws:
ApiException- if fails to make API call
-
listVersions
ListVersionsResponse listVersions(String domainName, String templateName, ListVersionsQueryParameters queryParameter) throws ApiException Get all template versionsReturns a paginated list of template versions.
- Parameters:
domainName- Domain name to fetch the templates for. (required)templateName- template name to fetch the versions for. (required)queryParameter- (optional)- Returns:
- ListVersionsResponse
- Throws:
ApiException- if fails to make API call
-
update
void update(String domainName, String templateName, UpdateTemplateRequest requestParameters) throws ApiException Update templateUpdate the description of a template.
- Parameters:
domainName- Domain name the template is associated with. (required)templateName- The template name. (required)requestParameters- Request parameters- Throws:
ApiException- if fails to make API call
-
updateVersion
void updateVersion(String domainName, String templateName, String versionName, UpdateVersionRequest requestParameters) throws ApiException Update a versionUpdate information or content of the specific template version. Existing fields not included in the request will not be changed
- Parameters:
domainName- Domain name the template is associated with. (required)templateName- template name the version is stored under. (required)versionName- Tag of the version of the template to be updated (required)requestParameters- Request parameters- Throws:
ApiException- if fails to make API call
-