CA Spectrum REST API Office Hours Transcript - August 2016

Document created by Melissa Potvin Employee on Aug 30, 2016Last modified by SamCreek on Dec 17, 2016
Version 3Show Document
  • View in full screen mode

Community, Thank you for joining today's  Office Hours for CA Spectrum REST API

With this office hours event we included use of audio and the Spectrum Product Team gave a brief presentation with a live demo. Big thanks to the entire Spectrum Product and Support Team especially kiran_diwakar,  Nagesh jaina01 and Mahboob baima09

The presentation slides can be found toward the bottom of this post.   Did you like the use of audio?  leave a comment and tell us what you think. 

 

Keep the conversation going with the tag "Programming with Spectrum"  (Thanks to rwill for the idea)

 

Here is a streaming link to the recording:

https://catechnologies.webex.com/catechnologies/ldr.php?RCID=74141e85baaaa997604f4d4550f97f80

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

 from Nagesh Jaiswal to Everyone:    While session is going on ........feel free to ask questions on the chat windows and we will be happy to answer

 

 from Mike Arnone to Everyone:    Are you going to cover Maintenance Mode using REST?

 

from Nagesh Jaiswal to Everyone:    @Mike, It is not part of the demo or presentation, But any questions you had on it?

 

from Mike Arnone to Everyone:    Automating Maintenance Mode is very important to us when we want to schedule changes to our environment. Perhaps if you have time, you can mention this topic.

 

from Mike Arnone to Everyone:    Otherwise we get Alarms for devices when we make changes to them.

 

from Rajanikanta Sahoo to Everyone:    do you mean to put a device into maintenance mode using rest api ?

 

from Mike Arnone to Everyone:    YES

 

from Eric Miner to Everyone:    what was the payload on the POST to create the model?

 

from Ravindra Kumar Puli to Everyone:    there is none

 

from Ajay Gudipati to Everyone:    @Mike, you can put the device in maintenance mode through Rest Calls.

 

from Mike Arnone to Everyone:    Yes, understood. If you have time, please show this in the demo.

 

from Ajay Gudipati to Everyone:    Mahboob will be covering the updation for the models, as part of that you can see how the updates are sent to the attributes

 

from Ajay Gudipati to Everyone:    you can update device condition attribute to maintenance

 

from Kiran Diwakar (CA) to Everyone:    @Ajay & @Nagesh - Since there is a specifc request for maintenance mode - we should try and show this as part of the samples that we have. Can we please do that?

 

from Nagesh Jaiswal to Everyone:    Yes

 

from Christopher Scollin to Everyone:    I believe there is a knowledge document on how to put a device in maintenance mode using the REST API.

 

from Mike Arnone to Everyone:    OK, I'll look out for that one.

 

from Nagesh Jaiswal to Everyone:    @Chris, Thanks. Can you post that link?

 

from Frank Tonjes to Everyone:    Remove the 'Payload : ' in the XML

 

from Eric Miner to Everyone:    will CA support accept cases related to our use of the REST API?

 

from Balram Kakani to Everyone:    https://communities.ca.com/thread/99043995

 

from Balram Kakani to Everyone:    above link is for the maintenance mode toggle using rest api

 

from Mike Arnone to Everyone:    Thanks!

 

from Nagesh Jaiswal to Everyone:    @Eric, Community Idea would be th ideal way to post this request

 

from Nagesh Jaiswal to Everyone:    @Eric, by the way you were talking about new REST API request or issues related to API?

 

from Eric Miner to Everyone:    this REST API that is being demo'd.  When we come across issues, can we open up cases with CA Spectrum support?

 

from Christopher Scollin to Everyone:    @Eric, you can open up a support case if you are having issues with the REST API.

 

from Eric Miner to Everyone:    thx

 

from Nagesh Jaiswal to Everyone:    Thanks Chris

 

from Mark to Everyone:    Which Spectrum versions support the REST API?

 

from Ravindra Kumar Puli to Everyone:    @Mark since 9.2

 

from Todd Phipps to Everyone:    For model handle, be sure to use "Significant Model Handle" 0x12a56 attribute.

 

from Ricardo Nunez to Everyone:    I didn't get how I'll receive the pushed subscribed notifications once there's an attribute change

 

from Ravindra Kumar Puli to Everyone:    @Ricardo You have to have a capability in the servlet with the mentioned url.

 

from Ajay Gudipati to Everyone:    @Ricardo, there will be a subscriptionId for the request we sent

 

from Ravindra Kumar Puli to Everyone:    @Ricardo the change events would be as part of HTTP Request POST BODY

 

from Ravindra Kumar Puli to Everyone:    @Ricardo in the PUSH Mechanism

 

from Ajay Gudipati to Everyone:    then periodically we send the subscriptionid to the Spectrum to get any updates for the attributes which we are intrested in

 

from Bill Barnes to Everyone:    How can you create a global model?  For example, how can you create a user that exists on multiple landscapes?

 

from Rick to Everyone:    Is it possible to subscribe for push for specific alarms - like 0x10d35

 

from Frank Tonjes to Everyone:    Are the details around subscriptions documented in details anywhere? e.g. What does <added-instance preexisting="false"> mean and can this be true? What are the different combinations regarind if it is a new alarm, an update or a removal? Some of the tags look obvious but it's not always safe to assume?

 

from Fernando Sendelbach to Everyone:    To put in maintenance mode:•    HTTP Method
PUT
http://<hostname><:portnumber>/spectrum/restful/model/0x19014c0?attr=0x1295d&val=0

 

from Rajanikanta Sahoo to Everyone:    yes this is documented

 

from Balram Kakani to Everyone:    @Bill we will get back to you on the creation of global models

 

from Frank Tonjes to Everyone:    Ok I will find it - Been looking for detail so perhaps it's been updated

 

from Ajay Gudipati to Everyone:    @Rick, you can have filter criteria in the post body for specfic  model's alarm

 

from Todd Phipps to Everyone:    What is the tool you were using to run your REST api queries?

 

from Frank Tonjes to Everyone:    https://communities.ca.com/ideas/235722267

- is it now possible to see which attributes have changed. You were able to see the value but not the actual attribute!

 

from Ajay Gudipati to Everyone:    it is chrome plug in

 

from Rick to Everyone:    Hi, I'd like to subscribe to all alarms of a certain type. Not per device model. Is that possible. Like get all 0x10d35 alarms?

 

from Ajay Gudipati to Everyone:    the examples are demoed using the tool of chrome plug in named Advanced Rest Client

 

from stephen warne to Everyone:    You aid

 

from Ajay Gudipati to Everyone:    @Rick, yes you can subscribe the alarms for specific type. define the filter criteria in the post body for specifi model type

 

from stephen warne to Everyone:    you said that yu

 

from Rick to Everyone:    thanks

 

from Miroslav Pjescak to Everyone:    Can you distribute the REST API example command list you used during the demo (including the payload info)?

 

from Rick to Everyone:    I'd like to suggest a new category for the Community specific to 'programming with Spectrum'.

 

from Melissa Potvin (CA) to Everyone:    @Rick,   the 'categories' in the community are tied to a specific product but we can certainly use a consistent tagging nomenclature. will that work .. ?

 

from Nagesh Jaiswal to Everyone:    @Rick, Sounds like an idea. We can do a tagging and filter out such questions/discussion/coversions

 

from Elio to Everyone:    What about using something like Process Automation?

 

from Daya to Everyone:    if we have to use API in perl, how could we do?

 

from Daya to Everyone:    can you offer any help please..?

 

from Todd Phipps to Everyone:    example of passing a variable into put for putting model into maint.  $mhval = 0x12a56

 

from Todd Phipps to Everyone:    'https://'.$spect_server.'/spectrum/restful/model/'.$mhval.'?attr=0x1295d&val=FALSE


from Melissa Potvin (CA) to Everyone:    @rick, when i post the replay to the community, i will make a note of this so that others will leverage tag

 

from Melissa Potvin (CA) to Everyone:    tag will allow you and others to 'search' in community on this topic

 

from Melissa Potvin (CA) to Everyone:    to those that may have joined late.   we have 15 minutes left.  this office hours has audio and chat activated.  feel free to dial in to ask questions live

 

from Melissa Potvin (CA) to Everyone:    dial in numbers:  1-866-376-6162 or 1-816-788-9003
conference code 177 533 1850

 

from Mike Arnone to Everyone:    Spectrum Web Services API Reference Guide: https://support.ca.com/cadocs/1/m003631e.pdf

 

from Fred to Everyone:    Can you manipulate the Global Collections attribute so that a copy of the model would appear in that Global Collection group?

 

from Balram Kakani to Everyone:    @Daya: yes it is possible to use rest api via perl. Please this commnity link on how customers are using it already: https://communities.ca.com/thread/113522514

 

from Elio to Everyone:    Yes Fred, it is possible. You need to specify the model handle for the collectionNameString attribute or something like that, and relate it to the model handle of the specific model you need

 

from Todd Phipps to Everyone:    Can someone show a way via rest of mapping a host model back to a landscape?

 

from Elio to Everyone:    Yes, I have a question in regards to creating users using REST

 

from Frank Tonjes to Everyone:    if you get the modelHandle you can just set the last 5 zero's - that will be the landscapeId

 

from Todd Phipps to Everyone:    Not landsacpe -> host.  Looking for host -> landscape.

 

from Elio to Everyone:    I created a PAM process which creates the POST URL, but I cannot add the password to the user

 

from Frank Tonjes to Everyone:    eg. 0x634531 would be on landscape 0x600000

 

from Elio to Everyone:    //Defino variables locales y las cargo con los valores de variables definidas en el proceso
var p=Process.POST_Usuario.pos; //Posición del array
var landID="?landscapeid="+Process.crear_array_OCyLH.oclh[p].landID;
var mtypeid="&mtypeid="+Process.mhUser;
var suscID="&attr="+Process.mhID+"&val="+Process.crear_array_OCyLH.oclh[p].suscID;
var Name="&attr="+Process.mhName+"&val="+Process.crear_array_OCyLH.oclh[p].username;
var fullName="&attr="+Process.mhFullName+"&val="+Process.crear_array_OCyLH.oclh[p].suscID+"%2D"+Process.crear_array_OCyLH.oclh[p].razonSocial;
var pass="&attr=0x11f9a&val="+Process.crear_array_OCyLH.oclh[p].pass;
var commString="&attr="+Process.mhCommString+"&val="+Process.crear_array_OCyLH.oclh[p].suscID;
var org="&attr="+Process.mhUserOrg+"&val="+Process.crear_array_OCyLH.oclh[p].razonSocial;
Process[OpName].POSTuser=Process.crear_array_OCyLH.oclh[p].modelURL+landID+mtypeid+Name+fullName+pass+suscID+commString+org;
//var fullName="&attr="+Process.mhFu

 

from Todd Phipps to Everyone:    Right (Frank Tonjes).  Having to take "0x?" of host model handle back to same landscape.

 

from Elio to Everyone:    spanish, yes

 

from Elio to Everyone:    sorry

 

from Eric Miner to Everyone:    regarding this "The CA Spectrum Web Services API accepts XML only for input and produces XML or JSON for output. If you choose JSON as output, you may need to parse it out and produce XML for the next request."  Do you intend to fully support JSON in the future?

 

from Elio to Everyone:    it's a comment about how I populate some variables before creating the url

 

from Frank Tonjes to Everyone:    Just a warning. There is a PTF for a memory leak for REST on 10.1.1

 

from Elio to Everyone:    Ok

 

from Todd Phipps to Everyone:    Take first three chars of host model type ex.  0x6 and then find match to first three chars of landscape ID ex. 0x6.  Is there a cleaner way to do this?

 

from Todd Phipps to Everyone:    Thank you.

 

from Elio to Everyone:    I didn't see that documented anywhere

 

from Todd Phipps to Everyone:    I don't find a get for //spectrumserver:port/spectrum/restful/model?0x12a95=0x6xxxxx&Landscape ... as an example.  Done on this subject.

 

from Melissa Potvin (CA) to Everyone:    thank you for joining office hours today. we are going to wrap up now after answering final questions.  the chat transcript and recording will publish to community end of day today.   

 

from Elio to Everyone:    For instance, I want to create a user with by POSTing this URL: http://10.200.60.175:80/spectrum/restful/model?landscapeid=0x200000&mtypeid=0x10004&attr=0x1006e&val=Rest10&attr=0x10074&val=4538792%2DFiber&attr=0x11f9a&val=MyPassword&attr=0x101f3&val=4538792&attr=0x1007a&val=4538792&attr=0x10077&val=Fiber

 

from Elio to Everyone:    the attribute 0x11f9 represents the passqord

 

from Melissa Potvin (CA) to Everyone:    join us for a WEBCAST on Sept 8 Spectrum - UIM Integration... https://communities.ca.com/events/3138

 

from Frank Tonjes to Everyone:    but the password is encrypted is it not?

 

from Elio to Everyone:    but I cannot send it in clear text

 

from Elio to Everyone:    How do I encrypt it?

 

from Eric Miner to Everyone:    thx!

 

from Elio to Everyone:    No @Frank, it is not. But I didn't find the way to do it

 

from Frank Tonjes to Everyone:    Thanks everyone!

 

from Frank Tonjes to Everyone:    Sorry for all the questions!

 

from Aliabbas Syed to Everyone:    Thank you for great demos.

2 people found this helpful

Outcomes