{"type":"api","title":"Update Templates By Group","meta":{"id":"/apps/pubhub/media/edm-api-v2/a2a30bcc9ecab5281b65761ae61df7e0031d5691/22db37d1-bb2c-3814-9940-2f648c7f33ab","swagger":"2.0","info":{"contact":{"email":"devmgmt@cisco.com"},"description":"This is the IoT device management core service. The service is responsible for managing the lifecycle of various IoT gateways and endpoints deployed as part of the Field Area Networks","license":{"name":"Licensing is primarily subscription based. Call Andy now!","url":"https://www.cisco.com"},"termsOfService":"http://swagger.io/terms/","title":"IoT Device Lifecycle Management","version":"4.0.0"},"host":"us.ciscoiot.com","basePath":"/nbapi/edm/v2","schemes":["https"],"securityDefinitions":{"bearerAuth":{"description":"This is the bearer Auth token.","in":"header","name":"Authorization","type":"apiKey"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"apiKeyGenerator":{"$remoteModule":"./config/apikey.js"}}},"spec":{"consumes":["application/json"],"description":"Update template(s) for a given group.\u003cbr /\u003e One of the below permissions is needed to invoke this API\u003cbr /\u003e- Tenant Management\u003cbr /\u003e- Manage Devices\u003cbr /\u003e- Manage Groups\u003cbr /\u003e- Manage Firmware Upgrades.","operationId":"updateTemplatesByGroup","parameters":[{"description":"The uuid of the tenant in whose context we are calling the api.","format":"uuid","in":"header","name":"x-tenant-id","required":true,"type":"string"},{"in":"path","name":"group_id","required":true,"type":"integer"},{"description":"set preview filter to get validated template","in":"query","name":"preview","required":false,"type":"boolean"},{"in":"body","name":"body","required":true,"schema":{"properties":{"templates":{"items":{"properties":{"templateType":{"description":"Template Type","enum":["CONFIG","EMBEDDED_AP_CONFIG","ROUTER_TUNNEL_ADD","HER_TUNNEL_ADD","HER_TUNNEL_DELETE","FACTORY_CONFIG","ROUTER_TUNNEL_DELETE","GATEWAY_TUNNEL_ADD","GATEWAY_TUNNEL_DELETE"],"type":"string"},"templateValue":{"description":"Template Value (CLI or Fremmarker template)","example":"[{\n \"name\": \"MgmtProfile ..... \"","type":"string"}},"required":["templateType","templateValue"],"type":"object","$$ref":"#/definitions/UpdateTemplatesRequestItem"},"type":"array"}},"type":"object","$$ref":"#/definitions/UpdateTemplatesRequest"}}],"produces":["application/json"],"responses":{"200":{"description":"Updated template(s) successfully","schema":{"properties":{"defaultGroup":{"example":false,"type":"boolean"},"deviceCategory":{"enum":["UNKNOWN","ENDPOINT","ROUTER","IOTGATEWAY","SWITCH","HER","SERVICE","ACCESSPOINT","IOX","DB"],"example":"ROUTER","type":"string"},"deviceType":{"example":"ir800","type":"string"},"groupDescription":{"example":"ir800 details updated","type":"string"},"groupId":{"example":33,"type":"integer"},"groupName":{"example":"ir800-cg-one","type":"string"},"groupSubType":{"example":"Legacy","type":"string"},"groupType":{"enum":["CONFIG","FIRMWARE","GENERAL","TUNNEL"],"example":"CONFIG","type":"string"},"isFormBased":{"example":false,"type":"boolean"},"netObjectType":{"example":"ir800","type":"string"},"operationUid":{"example":null,"type":"string"},"templateDetails":{"items":{"properties":{"templateLastUpdated":{"example":"2023-02-14 04:37:47","type":"string"},"templateProperties":{"properties":{"sections":{"items":{"properties":{"enabled":{"type":"boolean"},"info":{"items":{"properties":{"border":{"type":"boolean"},"closeButton":{"type":"boolean"},"filled":{"type":"boolean"},"flavor":{"type":"string"},"iconType":{"type":"string"},"placement":{"type":"string"},"text":{"type":"string"},"type":{"type":"string"}},"type":"object","$$ref":"#/definitions/TemplateVariablesInfo"},"type":"array"},"items":{"items":{"properties":{"cardinality":{"type":"integer"},"default":{"description":"Default Value for the variable","type":"object"},"displayCondition":{"description":"Condition based on which this field should be displayed","type":"string"},"errorMessage":{"description":"populate error message if there is any back end exception","type":"string"},"hiddenCondition":{"items":{"properties":{"field":{"type":"string"},"value":{"description":"can be any data type","type":"object"}},"type":"object","$$ref":"#/definitions/TemplateVariablesHiddenCondition"},"type":"array"},"hiddenConditionOperator":{"description":"logical operator used to evaluate hiddenCondition if more than one field","type":"string"},"info":{"items":{"properties":{"border":{"type":"boolean"},"closeButton":{"type":"boolean"},"filled":{"type":"boolean"},"flavor":{"type":"string"},"iconType":{"type":"string"},"placement":{"type":"string"},"text":{"type":"string"},"type":{"type":"string"}},"type":"object","$$ref":"#/definitions/TemplateVariablesInfo"},"type":"array"},"key":{"description":"Template Variable Key","type":"string"},"linkSectionKey":{"description":"Section Key for Hyperlink","type":"string"},"linkText":{"description":"Hyperlink Text","type":"string"},"maxLength":{"type":"integer"},"minLength":{"type":"integer"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"secure":{"type":"boolean"},"seedValues":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object","$$ref":"#/definitions/TemplateVariablesSeedValues"},"type":"array"},"tableColumns":{"items":{"$ref":"#/definitions/TemplateVariablesItem"},"type":"array"},"title":{"type":"string"},"type":{"description":"Template Variable Data Type","type":"string"},"validationType":{"description":"Validation type to be enforced for the variable","type":"string"},"value":{"description":"Current Value assigned for the variable","type":"object"}},"type":"object","$$ref":"#/definitions/TemplateVariablesItem"},"type":"array"},"key":{"description":"Section Key","type":"string"},"readOnly":{"type":"boolean"},"section":{"description":"Section Title","type":"string"},"sections":{"items":{"$ref":"#/definitions/TemplateVariablesSection"},"type":"array"},"showInTree":{"type":"boolean"},"showToggle":{"type":"boolean"},"templateType":{"description":"Template Type","items":{"enum":["CONFIG","EMBEDDED_AP_CONFIG","ROUTER_TUNNEL_ADD","HER_TUNNEL_ADD","HER_TUNNEL_DELETE","FACTORY_CONFIG","ROUTER_TUNNEL_DELETE","GATEWAY_TUNNEL_ADD","GATEWAY_TUNNEL_DELETE"],"type":"string"},"type":"array"}},"type":"object","$$ref":"#/definitions/TemplateVariablesSection"},"type":"array"}},"type":"object","$$ref":"#/definitions/TemplateVariablesResponse"},"templateRevision":{"type":"integer"},"templateType":{"enum":["CONFIG","EMBEDDED_AP_CONFIG","ROUTER_TUNNEL_ADD","HER_TUNNEL_ADD","HER_TUNNEL_DELETE","FACTORY_CONFIG","ROUTER_TUNNEL_DELETE","GATEWAY_TUNNEL_ADD","GATEWAY_TUNNEL_DELETE"],"example":"FACTORY_CONFIG","type":"string"},"templateTypeStr":{"example":"Bootstrap Configuration","type":"string"},"templateUuid":{"example":null,"type":"string"},"templateValid":{"example":true,"type":"boolean"},"templateValidationMessage":{"example":null,"type":"string"},"templateValue":{"example":"\u003c#-- Default BootStrap Configuration --\u003e\n\u003c#if far.isRunningIos()\u003e\n \u003c#assign sublist = far.eid?split(\"+\")[0..1]\u003e\n \u003c#assign pid = sublist[0]\u003e\n \u003c#assign model = pid[0..4]\u003e\n\u003c#if isRollbackConfig?has_content && isRollbackConfig == true\u003e\n.......","type":"string"}},"type":"object","$$ref":"#/definitions/TemplateDetail"},"type":"array"},"updateStatus":{"example":null,"type":"string"}},"required":["groupName","id","deviceType","templateDetails","isFormBased"],"type":"object","$$ref":"#/definitions/GroupTemplateOut"}},"400":{"description":"Invalid input","schema":{"description":"Specifies the error that occured during the request.","example":{"code":"10000","message":"Short message about the error","meta":"more information about that error"},"properties":{"code":{"description":"The error code that occured in application level.","type":"number"},"message":{"description":"A user readable message that describes the error in details.","type":"string"},"meta":{"description":"Contains more information about the error message. For example when a validation error occurs, this field describes the fields that were invalid and the validation error that occured. The content of this object can vary based on the type of error.\n","type":"object"}},"required":["code","message"],"type":"object","$$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"example":"Unauthorized","type":"string"}},"403":{"description":"Forbidden","schema":{"example":"Permission denied to access the resource","type":"string"}},"404":{"description":"Not found","schema":{"example":"Resource not found","type":"string"}}},"summary":"Update template(s) for a given group with group ID","tags":["groupsv2"],"__originalOperationId":"updateTemplatesByGroup","security":[{"bearerAuth":[]}],"method":"put","path":"/groups/{group_id}/templates"}}