Get an Example Request Body for Creating Template Resources

get

/sites/management/api/v1/sites/{id}/templates/create-form

CREATE FORM

Get a template request body suitable for creating a new template.The create-form resource provides an example request body that clients can use as a template when creating a new Template. The example request body property values can be edited, removed or added to and then used as the request body when creating a Template. Use of the create form is optional, it is only provided as a guide to the request body format.

Introduced in release 19.4.1.

Authorization

To access this create-form resource requires read access to the parent resource.

Path Alternative Identifiers

The default identifier for a Site resource is the Site Identifier. The Site resource supports alternative identifiers.

nameSite Name

Instead of the site identifier, the site name can be used to uniquely identify a site in the resource path. The default resource path parameter for a site is the site identifier, but when working with sites the human-readable site name is sometimes easier.

http://api.example.com/sites/management/api/v1/sites/name:MyNewProduct/templates/create-form

Introduced in release 19.4.1.

Successful Response Examples

This operation responds with the following success (2xx) responses. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.

200OK

Request

GET https://api.example.com/sites/management/api/v1/sites/{id}/templates/create-form

Response Body

{
  "name": "CafeSupremo",
  "description": "A description of something.",
  "includeUnpublished": false,
  "type": "inherit"
}

Request

Path Parameters
Query Parameters
  • Comma-delimited string of field names that should not be included in the response.

  • Comma-separated list of link relation names to exclude from the response.

  • Comma-delimited string of field names to include in the response. Nested fields can be identified using a dot to separate the field names. Field names are case-sensitive. Field names are ignored if the field does not exist.

  • Resources that have been marked for deletion can be read, modified, and support extended operations as long this query parameter is set to true. When the includeDeleted query parameter is not sent then the response to read, modification, and extended operations will be identical to that which would be returned if the resource was permanently deleted.

  • Comma-separated list of link relation names to include in the response. By default, all links are returned.

    The following links are provided by this resource:

    Link RelationshipDescription
    selfDescribes the current returned representation of the resource. Used for links that represent the resource itself. For example, if a resource is returned as part of a collection, the self link will provide the URL path for the individual resource.
    canonicalDescribes the preferred representation of the requested resource. Used for links that represent the canonical form of the resource. For example, if a resource is returned as part of a collection, the canonical link will provide the URL path for the canonical form of the individual resource.
    createDescribes where the resource can be created. Used on collection resources to indicate where a post can be performed to create a new resource in the collection.
    describedByDescribes the schema resource providing metadata information about the resource. Used on collection, singular and relation resources to indicate where the schema resource is that describes the resource.
Back to Top

Response

Supported Media Types

200 Response

OK
Headers
Body ()
Root Schema : schema
Type: object
Show Source
  • Maximum Length: 1000

    Optional description. There is no restriction on the contents of the description; it can be a single line or multiple lines with any characters.

    Introduced in release 19.4.1.
  • Include unpublished content items and digital assets in your template. If set to true then both published and unpublished content items and digital assets are included in the template. If set to false then only published content items and digital assets are included in the template. If not specified the default is to include only published content items and digital assets.

    Introduced in release 19.4.1.
  • links
  • Maximum Length: 242

    Name of the template.

    Introduced in release 19.4.1.
  • Type of template to create. If set to enterprise then the created template will be an enterprise template even if the site is not an enterprise site. If set to inherit then the template type will inherit the type from the site. If not specified the default is for the template inherit the type from the site.

    Valid values are:

    • inherit - Template type will be inherited from the site
    • enterprise - Create an enterprise template

    Introduced in release 21.1.2.
Example Response ()
{
    "name":"CafeSupremo",
    "description":"A description of something.",
    "includeUnpublished":false,
    "type":"inherit"
}

400 Response

Bad Request

401 Response

Unauthorized

403 Response

Forbidden

406 Response

Not Acceptable

416 Response

Range Not Satisfiable

429 Response

Too Many Requests

500 Response

Internal Server Error

501 Response

Not Implemented

502 Response

Bad Gateway

503 Response

Service Unavailable

504 Response

Gateway Timeout
Back to Top