anchor.diff:  
   The TemplateId matches the TemplateId attribute of wsag:Template element when the template is created. A template is serialized in XML as defined by [WS-Agreement schema](http://schemas.ggf.org/graap/2007/03/ws-agreement).
   
  -## Template Collection [/templates]
  +## Template Collection [/templates{?serviceIds}{?providerId}]
   
   ### List all templates [GET]
   
   This operations allows to get all the registered providers in the SLA Manager Core.
   
  -+ Request (application/xml)
  +
  ++ Parameters
  +
  +    + serviceIds (optional, array[string]) ... String with coma separated values (CSV) with the id's of service that is associated to the template.
  +    + providerId (optional, string) ... Id of the provider that is offering the template.
  +
  ++ Request
   
       + Headers
       
  
positive.code: 
  + Parameters
  
      + TemplateId (string) - Id of the template
  
  + Request (application/xml)
  
      + Headers
      
  
negative.code:                 </wsag:Terms>
              </wsag:Template>
  
  + Request (application/json)
  
      + headers
      
              user: basic authentication user
              password: basic authentication password
  
      + body
              
              {
                  "context":{
                      "agreementInitiator":"Provider1",
                      "agreementResponder":null,
                      "serviceProvider":"AgreementInitiator",
                      "expirationTime":"0037-01-04T15:08:15CET",
                      "templateId":null,
                      "service":"Service1"
                  },
                  "terms":{
                      "allTerms":{
                          "serviceDescriptionTerm":{
                              "name":null,
                              "serviceName":null
                          },
                          "serviceProperties":[
                              {
                                  "name":null,
                                  "serviceName":"Service1",
                                  "variableSet":{
                                      "variables":[
                                          {
                                              "name":"percDiskUsed",
                                              "metric":null,
                                              "location":null
                                          }
                                      ]
                                  }
                              }
                          ],
                          "guaranteeTerms":[
                              {
                                  "name":"percDiskUsed",
                                  "serviceScope":{
                                      "serviceName":"Service1",
                                      "value":""
                                  },
                                  "qualifyingCondition":null,
                                  "businessValueList":null,
                                  "serviceLevelObjetive":{
                                      "kpitarget":{
                                          "kpiName":"percDiskUsed",
                                          "customServiceLevel":"{\"constraint\": \"percDiskUsed GT 50\"}"
                                      }
                                  }
                              }
                          ]
                      }
                  },
                  "name":"Template1"
              }
  
  + Response 201 (application/json)
  
      + Body
  
              {
                  "templateId":"c3bcd8fb-e632-4aa6-a4d6-b0979f9da116",
                  "context":{
                      "agreementInitiator":"Provider1",
                      "agreementResponder":null,
                      "serviceProvider":"AgreementInitiator",
                      "expirationTime":"0037-01-04T15:08:15CET",
                      "templateId":null,
                      "service":"Service1"
                  },
                  "terms":{
                      "allTerms":{
                          "serviceDescriptionTerm":{
                              "name":null,
                              "serviceName":null
                          },
                          "serviceProperties":[
                              {
                                  "name":null,
                                  "serviceName":"Service1",
                                  "variableSet":{
                                      "variables":[
                                          {
                                              "name":"percDiskUsed",
                                              "metric":null,
                                              "location":null
                                          }
                                      ]
                                  }
                              }
                          ],
                          "guaranteeTerms":[
                              {
                                  "name":"percDiskUsed",
                                  "serviceScope":{
                                      "serviceName":"Service1",
                                      "value":""
                                  },
                                  "qualifyingCondition":null,
                                  "businessValueList":null,
                                  "serviceLevelObjetive":{
                                      "kpitarget":{
                                          "kpiName":"percDiskUsed",
                                          "customServiceLevel":"{\"constraint\": \"percDiskUsed GT 50\"}"
                                      }
                                  }
                              }
                          ]
                      }
                  },
                  "name":"Template1"
              }
  
  
  + Response 409
  
          Returned when the uuid or name already exists in the database.
  