v1

latestOpenAPI 3.1.0Apache 2.02026-07-245981,1853.0 MB
Template

Import Template

Use this API to import the metadata of a specific template in JSON format in order to migrate the template from one environment/tenant to another environment/tenant. Before calling this API, use the Export Template API to obtain the template metadata in JSON format. The JSON response body obtained from the Export Template API can then be pasted within the Import Template request body (BODY PARAMS).

🗒 Things to Know

  • After the import, the template will reflect on the Templates page in Draft status.

  • If a template with the same name already exists on the destination environment, then the migration will fail (HTTP Response Status Code 400: Duplicate template name). Please ensure that no templates (Active or Archived) already exist with the same name as the template being migrated.

  • If your template contains questions linked to custom inventory attributes, it is crucial that the same attributes have already been created in the destination environment/tenant and are an identical match.

post/api/template/v2/templates/import

Query parameters

matchAttributesByNameboolean required

If true, will match attributes by name during import

Example:true

The flag indicating whether to match attributes by name during template import.

Request body

object required

Response

OK

idstring uuid

The unique identifier of the created template.

rootVersionIdstring uuid

The root version identifier of the template used for version management.

templateVersioninteger

The version number of the template indicating its iteration.

languageCodestring

The language code specifying the localization of the template.

Example response

{
  "id": "7d271be5-0601-4190-96a7-65d7c427a725",
  "rootVersionId": "7d271be5-0601-4190-96a7-65d7c427a725",
  "templateVersion": 1,
  "languageCode": "en"
}