5.192 Modify Template

This topic provides information on how to modify the application template itself (api/templates/<id>). See 5.193 Modify Template History for information on how to modify the application template's history/version information (api/templates/<history_pk>/history/<version>).

These are the different methods that you can use to modify an application template:

In this topic:

5.192.1 PUT Method

In this section:

5.192.1.A URL

PUT /api/templates/<id>/

5.192.1.B Parameters

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

5.192.1.C Example

See 5.186 Create Template for additional parameters you can modify.

5.192.2 PATCH Method

You must the correct content type when using the PATCH API. If not specified, the API will consider the type as 'text/html' which might cause side effects in the request processing code.

In this section:

5.192.2.A URL

PATCH /api/templates/<id>/

5.192.2.B Parameters

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

5.192.2.C JSON Structure

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

Name Required Type Description
published No Boolean Application template's status: published or unpublished; if the application template is unpublished, then only owner can use it (not generally visible)

5.192.2.D Example

This section provides an example of how to update application template 1 with the published tag unset.

PATCH /api/templates/1/

Request Body

{
  "published": false
}

Response

Related Topics 

© 2016 Adaptive Computing