title: CAS ReST - Add Service
body: <p>I am trying to <a href="https://apereo.github.io/cas/5.0.x/protocol/REST-Protocol.html#add-service" rel="nofollow noreferrer">add a new service</a> to CAS via their ReST API. First it said that "Attribute name and/or value must be configured". Then I added attribute name and attribute value with some junk value to the CAS properties. Now it says that the Request could not be authenticated. This is how I am making a request</p>
  
  <p>POST </p>
  
  <pre><code>localhost:8443/cas/v1/services/add/TGT-1-CHZrXD5XAulLuUgoMDQudTe6j16k5k41XBQH640wHFhbuq9QWY-xoadmin
  </code></pre>
  
  <p>BODY </p>
  
  <pre><code>{
      "@class" : "org.apereo.cas.services.RegexRegisteredService",
      "serviceId" : "service name",
      "name" : "xosso",
      "id" : 2,
      "evaluationOrder" : 10,
      "proxyPolicy" : {
           "@class" : "org.apereo.cas.services.RegexMatchingRegisteredServiceProxyPolicy",
           "pattern" : "^https?://.*"
      }
  }   
  </code></pre>
  
  <p>PS : I tried sending it part of the URL, still it says the same error.</p>