patch-private-templates-TEMPLATE_ID.rst (1279B)
1 .. http:patch:: [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID 2 3 This is used to update a template. It is useful when we need to change information in the template or when we have mistake some information. 4 5 **Required permission:** ``templates-write`` 6 7 **Request:** 8 9 The request must be a `TemplatePatchDetails`. 10 11 **Response:** 12 13 :http:statuscode:`204 No content`: 14 The template has successfully modified. 15 :http:statuscode:`404 Not found`: 16 The template(ID) is unknown to the backend. 17 :http:statuscode:`409 Conflict`: 18 The provided information is inconsistent with the current state of the template. Changes made is the same with 19 another store. 20 21 **Details:** 22 23 24 .. ts:def:: TemplatePatchDetails 25 26 interface TemplatePatchDetails { 27 28 // Human-readable description for the template. 29 template_description: string; 30 31 // OTP device ID. 32 // This parameter is optional. 33 otp_id?: string; 34 35 // Additional information in a separate template. 36 template_contract: TemplateContractDetails; 37 38 // Key-value pairs matching a subset of the 39 // fields from ``template_contract`` that are 40 // user-editable defaults for this template. 41 // Since protocol **v13**. 42 editable_defaults?: Object; 43 }