cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
421
Views
0
Helpful
0
Replies

Unity Connection Add User

rajesh00111
Level 1
Level 1

hi ,

In Unity Connection 10.0 version i tried to Add local user and Import Active directory User but for both request iam getting the error like    [Fatal Error] :1:1: Content is not allowed in prolog. iam using REST API to Add User for Post request only iam getting this error ,but USER is added into the server for DELETE ,PUT and GET request iam getting response 204. for POST Not getting any response code instead of this getting the above error what i mentioned.

my code

=============================================================

req = new CUPIRESTRequest( 'path': path , body: [ "Alias":"raghu","DtmfAccessId":"112233","FirstName":"Raghavendra","LastName":"Mankar","EmailAddress":"raghu@ymail.com" ], contentType: 'application/json' );

def res=client.post( req );

public Response post(CUPIRESTRequest cupiRequest) {

  log.info "Executing CUPI Request For ${cupiRequest.path} - Start"

  def res = client?.post(path: cupiRequest.path) {

  type cupiRequest.contentType

  json  cupiRequest.body

  }

  log.info "Executing CUPI Request For ${cupiRequest.path} - Start"

  return res;

  }

======================================================================================

In cisco developer api  given as follow

===============================

POST https://<Connection-server>/vmrest/users?templateAlias=voicemailusertemplate

Accept: application/json

Content_type: application/json

Connection: keep_alive

Request Body:

{

  "Alias":"voicemailusertemplate1",

  "DisplayName":"Voice Mail User Template 1"

}

Thanks,

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: