You are here: Application Templates > APIs > Modify Template Attributes

4.18 Modify Template Attributes

The PATCH method lets you modify specific attributes of an existing template. To replace an existing template in its entirety with your modified template, use the PUT method. See 4.17 Modify Template.

Please make sure that you specify a proper Content-Type when using the API. If the content type is not specified, the Viewpoint API will consider it as 'text/html' which might cause side effects in the request processing code.

 

In this topic:

4.18.1 URL

PATCH /api/templates/<id>

4.18.2 Parameters

Parameter Required Type Description Example
id Yes Integer The ID of the template 1

4.18.3 JSON Structure

The following table identifies the template attributes that can be changed via PATCH call.

Name Required Type Description
name Yes String User friendly name
permissions No List List of permissions. See corresponding section of this document for more details
published No Boolean Template's status: published or unpublished. If the template unpublished then only owner can see it
sections No List List of sections. See "Section" section bellow
widgets No List List of widgets. See "Widget" section bellow

4.18.4 Example

This section provides an example of how to update template 1 with a new name and with the published tag unset.

PATCH /api/templates/1/

4.18.4.A Request Body

{
  "name": "My New Name",
  "published": false
}

4.18.4.B Response

Related Topics 

© 2016 Adaptive Computing