System and Network Management

 View Only
Expand all | Collapse all

Web Services System Manager User Management

  • 1.  Web Services System Manager User Management

    Posted 02-18-2015 07:19 AM

    Hi,

     

    is anyone able to give a short overview how to use System Manager's web services for user management?

    I try to get a response for a simple user data request via SoapUI (simple tool for testing web services). Authentiaction is successfully done but how to lookup a user?

    Any help is appreciated.

     

    kind regards,

    astrakid



  • 2.  Web Services System Manager User Management

    Posted 02-18-2015 08:50 AM
    It’s actually a lot easier than the documentation puts it out to be.

    Do an HTTPS call to https://<<smgr-ip>>/web/mgmtwebservice/user/user@domain<https://%3c%3csmgr-ip%3e%3e/web/mgmtwebservice/user/user@domain>
    REST Method=GET, Basic auth with a login and password that has access to the user management features of SMGR.

    user@domain is the login ID of the user (1st page of the user management form).

    You will get a properly formed XML document with that user’s provisioning information, OR a simple string with the error message.

    Searching is a bit more complicated, as you need to put together a very specific XML document that has the parameters you plan on searching on. You can take a look at the sample Java app on the DevConnect portal on how that is put together. Pretty much all you have to do to search is to send the XML document along as a form-encoded var.

    The how-two guide is very misleading as to how you actually make the calls. You might need to take a look at the Java sample app to actually figure out how to make the calls. There is no query parameters called FIND, CREATE, or anything like what is listed in the docs. You just poke the base URL with POSTs, GETs, etc.

    -Nick


    From: Andre Gronwald [mailto:iaug-sys-net@lists.iaug.org]
    Sent: Wednesday, February 18, 2015 10:19 AM
    To: iaug-sys-net@lists.iaug.org
    Subject: [IAUG Forums] - Web Services System Manager User Management


    Hi,



    is anyone able to give a short overview how to use System Manager's web services for user management?

    I try to get a response for a simple user data request via SoapUI (simple tool for testing web services). Authentiaction is successfully done but how to lookup a user?

    Any help is appreciated.



    kind regards,

    astrakid

    -----End Original Message-----


  • 3.  RE: Web Services System Manager User Management

    Posted 02-18-2015 10:24 AM

    THAT IS A GREAT ANSWER!!! You helped me a lot. It works!

    I hope that I will be able to do updates as well. ;-

    Thank you very much.

     

    Unfortunately I don't get any information about my Conferencing-profile - do you know a way to get those information (participant code, moderatore passcode)?

     

    regards,

    astrakid



  • 4.  Web Services System Manager User Management

    Posted 02-18-2015 01:04 PM
    Updates are just as easy.

    You will need the user-id (login field on the first page). Just populate only the fields that you want changed and you are set. The only thing to watch out for is the encrypted/unencrypted password field for the communications password. I think the comPassword is unencrypted and commPassword is encrypted (hashed), but I forget – you will need to play with it.

    -Nick

    From: Andre Gronwald [mailto:iaug-sys-net@lists.iaug.org]
    Sent: Wednesday, February 18, 2015 1:24 PM
    To: iaug-sys-net@lists.iaug.org
    Subject: [IAUG Forums] - RE: Web Services System Manager User Management


    THAT IS A GREAT ANSWER!!! You helped me a lot. It works!

    I hope that I will be able to do updates as well. ;-)



    Thank you very much.



    regards,

    astrakid

    -----End Original Message-----


  • 5.  RE: Web Services System Manager User Management

    Posted 02-18-2015 11:52 PM

    Thanks again for your help. That is a good information, that only changed values need to be transferred - I understood it different pointing to the documentation. There is said that always the complete data needs to be set.

    However, how do I update data via webservice?

    Let us take concrete data: this is data I get back when requesting user data via webservice (I changed private data and servers, I hope that I did it consistently):

     

    ************************************************************

    Set-Cookie: JSESSIONIDSSO=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Path=/; Secure; HttpOnly

    Content-Type: application/xml

    Content-Length: 3664

    Date: Thu, 19 Feb 2015 07:34:58 GMT

     

    <tns:users xsi:schemaLocation="http://xml.avaya.com/schema/import userimport.xsd" xmlns:ns4="http://xml.avaya.com/schema/import1" xmlns:ns3="http://xml.avaya.com/schema/import_csm_mm" xmlns:tns="http://xml.avaya.com/schema/import" xmlns:ns9="http://xml.avaya.com/schema/import_csm_agent" xmlns:ns12="http://xml.avaya.com/schema/deltaImport" xmlns:ns5="http://xml.avaya.com/schema/import_csm_b5800" xmlns:ns6="http://xml.avaya.com/schema/import_ce" xmlns:ns10="http://xml.avaya.com/schema/import_csm_cm" xmlns:ns7="http://xml.avaya.com/schema/import_sessionmanager" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns11="http://xml.avaya.com/schema/import_mmcs" xmlns:ns8="http://xml.avaya.com/schema/presence">

    <tns:user>

    <authenticationType>enterprise</authenticationType>

    <displayName>Testname, Test</displayName>

    <displayNameAscii>Testname, Nametest</displayNameAscii>

    <dn>CN=12345555,OU=111,DC=xxx-test,DC=de</dn>

    <isDuplicatedLoginAllowed>false</isDuplicatedLoginAllowed>

    <isEnabled>true</isEnabled>

    <isVirtualUser>false</isVirtualUser>

    <givenName>Nametest</givenName>

    <givenNameAscii>Nametest</givenNameAscii>

    <loginName>12345555@xxx-test.de</loginName>

    <preferredLanguage>et</preferredLanguage>

    LDAP

    <sourceUserKey>opYgO2NigEW2v8J+nBoGKQ==</sourceUserKey>

    <status>provisioned</status>

    <surname>Testname</surname>

    <surnameAscii>Testname</surnameAscii>

    <userName>12345555</userName>

    <userPassword></userPassword>

    <roles>

    <role>End-User</role>

    </roles>

    <ownedContactLists>

    <contactList>

    <name>list-12345555_xxx-test.de</name>

    <isPublic>false</isPublic>

    <contactListType>general</contactListType>

    </contactList>

    </ownedContactLists>

    <commProfileSet>

    <commProfileSetName>Primary</commProfileSetName>

    <isPrimary>true</isPrimary>

    <handleList>

    <handle>

    <handleName>12345555</handleName>

    <handleType>xmpp</handleType>

    <handleSubType>jabber</handleSubType>

    <domainName>pres.ips.avaya.com</domainName>

    </handle>

    </handleList>

    <commProfileList>

    <commProfile xsi:type="ns11:MmcsCommProfileType">

    <commProfileType>mmcsCommProfile</commProfileType>

    <ns11:template>desktop_user_collab_code_no_video_rec</ns11:template>

    <ns11:securityCode></ns11:securityCode>

    <ns11:moderatorPin>111111</ns11:moderatorPin>

    <ns11:participantPasscode></ns11:participantPasscode>

    <ns11:moderatorPasscode></ns11:moderatorPasscode>

    <ns11:eventConfCode></ns11:eventConfCode>

    <ns11:location>location_test</ns11:location>

    <ns11:autoGeneratedCodeLength>6</ns11:autoGeneratedCodeLength>

    </commProfile>

    <commProfile xsi:type="ns8:XmlPsCommProfile">

    <commProfileType>PS</commProfileType>

    <ns8:system>presenceserver_local</ns8:system>

    <ns8:imGatewaySipEntity>presenceserver_local</ns8:imGatewaySipEntity>

    <ns8:publishViaAESCollector>SD</ns8:publishViaAESCollector>

    </commProfile>

    </commProfileList>

    </commProfileSet>

    </tns:user>

    </tns:users>

    *********************************************************************************

     

    Now I want to change

    <ns11:moderatorPin>111111</ns11:moderatorPin>

    to

    <ns11:moderatorPin>222222</ns11:moderatorPin>

    How can I achieve that?

     

    kind regards,

    astrakid



  • 6.  Web Services System Manager User Management

    Posted 02-19-2015 08:54 AM
    Unfortunately, it looks like the XML got stripped out, so I don’t quite know which property you want to update.

    Either way, you do a an HTTPS call to https://<<smgrip>>/web/mgmtwebservice/https://%3c%3csmgrip%3e%3e/web/mgmtwebservice

    Basic Auth, REST Method = PUT
    HTTP Body -> value = entityType=user&updateMode=merge&entityXMLData=<<your update packet>>
    HTTP Header -> name = “Content-Type”, value = application/x-www-form-urlencoded; charset=UTF-8

    The update packet is an XML document with the namespace of delta:deltaUserList, delta:userDelta as the only item off the root, and an XML node with each item you want to change.

    If you want to email me at quetwo@apache.org<mailto:quetwo@apache.org>, I can send you some code samples I’ve put together in Java/ColdFusion which hopefully should point you in the right direction.

    -Nick

    From: Andre Gronwald [mailto:iaug-sys-net@lists.iaug.org]
    Sent: Thursday, February 19, 2015 2:52 AM
    To: iaug-sys-net@lists.iaug.org
    Subject: [IAUG Forums] - RE: Web Services System Manager User Management


    Thanks again for your help. That is a good information, that only changed values need to be transferred - I understood it different pointing to the documentation. There is said that always the complete data needs to be set.

    However, how do I update data via webservice?

    Let us take concrete data: this is data I get back when requesting user data via webservice (I changed private data and servers, I hope that I did it consistently):



    ************************************************************

    Set-Cookie: JSESSIONIDSSO=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Path=/; Secure; HttpOnly

    Content-Type: application/xml

    Content-Length: 3664

    Date: Thu, 19 Feb 2015 07:34:58 GMT



    enterprise

    Testname, Test

    Testname, Nametest

    CN=12345555,OU=111,DC=xxx-test,DC=de

    false

    true

    false

    Nametest

    Nametest

    12345555@xxx-test.de<mailto:12345555@xxx-test.de>

    et

    LDAP

    opYgO2NigEW2v8J+nBoGKQ==

    provisioned

    Testname

    Testname

    12345555

    End-User

    list-12345555_xxx-test.de

    false

    general

    Primary

    true

    12345555

    xmpp

    jabber

    pres.ips.avaya.com

    mmcsCommProfile

    desktop_user_collab_code_no_video_rec

    111111

    location_test

    6

    PS

    presenceserver_local

    presenceserver_local

    SD

    *********************************************************************************



    Now I want to change

    111111

    to

    222222

    How can I achieve that?



    kind regards,

    astrakid

    -----End Original Message-----


  • 7.  RE: Web Services System Manager User Management

    Posted 10-30-2015 08:04 AM
    hi nick, it is some months ago when you helped me using SMGR webservices. Overall everything works fine now, we have now issues doing basic authentication via scripts. currently we have to login via browser and then we can use webservices within that browsersession. do you have an idea how to use basic authentication directly in the post- or get-method? just if you have a simple idea. using a tool it works fine, but building the request from scratch by python doesn't work with our knowledge. ;) kind regards and have a nice weekend, andre


  • 8.  Web Services System Manager User Management

    Posted 11-02-2015 08:18 AM
    I don’t have any examples on how this works in Python. You should be able to find examples on how to do “Basic” authentication in the HTTP header. What you should see is a tag within the HTTP call that has :

    Authorization: Basic **************************

    Where the ****************’s are replaced with a Base64 encoding of the login and password you plan on using.

    -Nick

    From: Andre Gronwald [mailto:iaug-sys-net@lists.iaug.org]
    Sent: Friday, October 30, 2015 12:04 PM
    To: iaug-sys-net@lists.iaug.org
    Subject: [IAUG Forums] - RE: Web Services System Manager User Management

    hi nick, it is some months ago when you helped me using SMGR webservices. Overall everything works fine now, we have now issues doing basic authentication via scripts. currently we have to login via browser and then we can use webservices within that browsersession. do you have an idea how to use basic authentication directly in the post- or get-method? just if you have a simple idea. using a tool it works fine, but building the request from scratch by python doesn't work with our knowledge. ;) kind regards and have a nice weekend, andre
    -----End Original Message-----


  • 9.  RE: Web Services System Manager User Management

    Posted 11-02-2015 11:48 PM

    SMGR forces a forwarding to https - so base64 is not needed resp. not working. we will try further on, further help is appreciateed as well. ;-)



  • 10.  RE: Web Services System Manager User Management

    Posted 11-16-2015 12:33 AM

    solved.

    we were focussing on the wrong way to authenticate by simulating a login to webgui of smgr and then fire a webservice-call.
    after using the simple way of authentication header of webservice, it is working smooth and easy. ;-)

    thanks nevertheless,

    regards,
    andre