POST
/
templates
/
_import
Post import templates
curl --request POST \
  --url https://{FUSION_HOST.com}/api/templating/templates/_import \
  --header 'Content-Type: application/json' \
  --data '{
  "all": false,
  "app": "your-app-name",
  "dirty": true,
  "dirtyZoneIds": [
    "a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea, 5avc1e65-162d-5b8e-92f0-6a962e0f43c5"
  ],
  "endTime": "2024-08-24T14:15:22Z",
  "entityDirty": true,
  "id": "<string>",
  "markedForDeletion": false,
  "metadata": {
    "layout": "list"
  },
  "name": "template-name",
  "neverPublished": false,
  "priority": 10,
  "startTime": "2024-08-24T14:15:22Z",
  "templateDirty": true,
  "triggers": [
    {
      "exact": true,
      "filters": [
        {
          "inheritable": true,
          "key": "key1",
          "value": "value1"
        }
      ],
      "matchMode": "all",
      "search": "<string>",
      "urlContext": "<string>",
      "urlPath": "<string>"
    }
  ],
  "type": "landing",
  "zoneIds": [
    "ab6d0e24-9e7a-35h9-a2e7-5hjl72b8a3ea, 2abc1e65-162d-3a8e-76f0-6a962e0f43c5"
  ]
}'
{
  "app": "<string>",
  "id": "6a163bd4-5098-466c-22aa-40bf68294303",
  "name": "Item-Detail Page",
  "all": false,
  "priority": 10,
  "dirty": true,
  "templateDirty": true,
  "markedForDeletion": true,
  "neverPublished": true,
  "type": "landing",
  "zoneIds": [
    "ab6d0e24-9e7a-35h9-a2e7-5hjl72b8a3ea, 2abc1e65-162d-3a8e-76f0-6a962e0f43c5"
  ],
  "dirtyZoneIds": [
    "a3e0e22-9e6a-45h9-a2e7-5hjk72b9a3ea, 5avc1e65-162d-5b8e-92f0-6a962e0f43c5"
  ],
  "metadata": {
    "layout": "list"
  },
  "staging": true,
  "published": true,
  "startTime": "2024-08-24T14:15:22Z",
  "endTime": "2024-08-24T14:15:22Z",
  "triggers": [
    {
      "exact": true,
      "filters": [
        {
          "inheritable": true,
          "key": "key1",
          "value": "value1"
        }
      ],
      "matchMode": "all",
      "search": "<string>",
      "urlContext": "<string>",
      "urlPath": "<string>"
    }
  ]
}

Query Parameters

context
string

The context parameter retrieves templates for the specified application. The parameter format is app:your-app-name. Only the first application listed in the context is displayed even if a comma-delimited list is entered in the parameter.

Example:

"app:your-app-name"

Body

application/json
app
string
required

The Fusion application associated with this template.

Example:

"your-app-name"

id
string
required

The universal unique identifier (UUID) of the Fusion application.

all
boolean
default:false

This field indicates if the request includes published or unpublished (staging) templates. The default of false includes only published templates. If set to true, the request includes published and unpublished (staging) templates.

dirty
boolean
default:true

The status of the template. If false, the template is published. If true, this is the staging version of this template and it contains changes that have not yet been published.

dirtyZoneIds
string[]

The comma-delimited list of universal unique identifiers (UUIDs) of the zones (query profiles) that are associated with the template and have unpublished changes. This only applies to zones and is different from the status of the template. Even if the associated template is dirty (contains some type of changes that have not yet been published), the zones and their respective changes are separate.

endTime
string<date-time>

The template cannot be used after this date and time. The format is Epoch time format.

Example:

"2024-08-24T14:15:22Z"

entityDirty
boolean

The status of the entity. If false, the entity is published. If true, this is the staging version of this entity and it contains changes that have not yet been published.

markedForDeletion
boolean
default:false

This field indicates if the staging version of this template has been marked for deletion, but the deletion has not been completed because it has not been published yet. If true, the template has been marked for deletion, and when it is published, it will actually be deleted. If false, the template has not been marked for deletion.

metadata
object

Additional data associated with the template.

name
string

The name of the template.

Example:

"template-name"

neverPublished
boolean
default:false

The status of the template in the zone. If false, the template has been published at some point. If true, this template has never been published.

priority
integer

The order in which this template is processed when multiple templates with the same status (published or staging) are associated with the application. The higher the number, the earlier the template will be used. For example, a template with a priority of 10 is triggered before a template with a priority of 3.

Example:

10

startTime
string<date-time>

The beginning date and time (in Epoch time format) when the template can be used.

Example:

"2024-08-24T14:15:22Z"

templateDirty
boolean

The status of the template. If false, the template does not have unpublished changes. If true, this is the staging version of this template and it contains changes that have not yet been published. This only applies to templates and is different from the status of the zone. Even if the associated zone (query profile) for this template is dirty (contains some type of changes that have not yet been published), the template and its status are separate.

triggers
Trigger · object[]

Triggers - only one trigger needs to be satisfied in order for this template to trigger.

type
string

The type of template associated with the response. Examples include landing and item-detail.

Example:

"landing"

zoneIds
string[]

The comma-delimited list of universal unique identifiers (UUIDs) of the zones (query profiles) that are associated with the template.

Response

OK

app
string
required

The Fusion application associated with this template.

id
string<uuid>
required

The universal unique identifier (UUID) of the Fusion application.

Example:

"6a163bd4-5098-466c-22aa-40bf68294303"

name
string

The name of the template in this application.

Example:

"Item-Detail Page"

all
boolean
default:false

This field indicates if the response includes published or unpublished (staging) templates. The default of false includes only published templates. If set to true, the request includes published and unpublished (staging) templates.

priority
integer

The order in which this template is processed when multiple templates with the same status (published or staging) are associated with the application. The higher the number, the earlier the template will be used. For example, a template with a priority of 10 is triggered before a template with a priority of 3.

Example:

10

dirty
boolean

The status of the template. If false, the template is published. If true, this is the staging version of this template and it contains changes that have not yet been published.

templateDirty
boolean

The status of the template. If false, the template does not have unpublished changes. If true, this is the staging version of this template and it contains changes that have not yet been published. This only applies to templates and is different from the status of the zone. Even if the associated zone (query profile) for this template is dirty (contains some type of changes that have not yet been published), the template and its status are separate.

markedForDeletion
boolean

This field indicates if the staging version of this template has been marked for deletion, but the deletion has not been completed because it has not been published yet. If true, the template has been marked for deletion, and when it is published, it will actually be deleted. If false, the template has not been marked for deletion.

neverPublished
boolean

The status of the template in the zone. If false, the template has been published at some point. If true, this template has never been published.

type
string

The type of template associated with the response. Examples include landing and item-detail.

Example:

"landing"

zoneIds
string[]

The comma-delimited list of universal unique identifiers (UUIDs) of the zones (query profiles) that are associated with the template.

dirtyZoneIds
string[]

The comma-delimited list of universal unique identifiers (UUIDs) of the zones (query profiles) that are associated with the template and have unpublished changes. This only applies to zones and is different from the status of the template. Even if the associated template is dirty (contains some type of changes that have not yet been published), the zones and their respective changes are separate.

metadata
object

Additional data associated with the template.

staging
boolean

This field indicates if the template is a staging template. If true, this template has a status of staging. If false, this template is not a template with a status of staging.

published
boolean

This field indicates if the template is a published template. If true, this template has a status of published. If false, this template is not a template with a status of published.

startTime
string<date-time>

The beginning date and time (in Epoch time format) when the template can be used.

Example:

"2024-08-24T14:15:22Z"

endTime
string<date-time>

The template cannot be used after this date and time. The format is Epoch time format.

Example:

"2024-08-24T14:15:22Z"

triggers
Trigger · object[]

Only one trigger needs to be satisfied for this template to trigger.