Topic
  • 11 replies
  • Latest Post - ‏2015-07-15T18:57:23Z by DanGoetz
AntonZ
AntonZ
4 Posts

Pinned topic RESTful API for accessing events data: where can I find docs/exampes?

‏2012-05-22T10:48:45Z |
Hi All,

I'm trying to find a way to retrieve data from netcool impact data sources using RESTful services. To be more specific this data is a part of incoming event and stored in the database.
The infocenter says that in netcool impact 5.1 there is a "REST API for the data access layer", but I couldn't find the reference doc or user's guide. I have found a devWorks article (http://www.ibm.com/developerworks/webservices/library/ws-impactJRulesInt/index.html?ca=drs-) that also states the following:
"The Impact server also exposes the data through Restful APIs. This Restful API provides a way to retrieve the data from the configured Data source and Data type. In this scenario the end user does not have to define a policy to retrieve the data. They could use their favourite HTTP Client to retrieve the data. The data can be returned as JSON format or XML format. This alternative access pattern has not been included in the walkthrough in the next section." So it seems that funcitonality is really available.

Any links to documentation or examples are very appreciated.

Thanks1
Updated on 2012-06-20T13:53:44Z at 2012-06-20T13:53:44Z by gulfsoft
  • AntonZ
    AntonZ
    4 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T10:33:31Z  
    It seems that nobody used that functionality.

    Maybe there are some other ways to interact externaly with netcool impact? I need to retreve programmatically some events data.

    Thanks!
  • SystemAdmin
    SystemAdmin
    255 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T10:51:17Z  
    • AntonZ
    • ‏2012-05-23T10:33:31Z
    It seems that nobody used that functionality.

    Maybe there are some other ways to interact externaly with netcool impact? I need to retreve programmatically some events data.

    Thanks!
    Hi,
    There is a webservices interface available to interact with Impact.

    What version of impact are you using ?

    Thanks and Regards
    Sudhakar
  • AntonZ
    AntonZ
    4 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T11:07:57Z  
    Hi,
    There is a webservices interface available to interact with Impact.

    What version of impact are you using ?

    Thanks and Regards
    Sudhakar
    Hi Sudhakar,

    Thank you for answering,

    I'm using 5.1.1. Can you please say where those webservices are described?
    Anton Zorin
  • SystemAdmin
    SystemAdmin
    255 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T13:08:07Z  
    • AntonZ
    • ‏2012-05-23T11:07:57Z
    Hi Sudhakar,

    Thank you for answering,

    I'm using 5.1.1. Can you please say where those webservices are described?
    Anton Zorin
    Hi,
    Here are some of the links
    http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/index.jsp?topic=%2Fcom.ibm.netcoolimpact.doc5.1.1%2Fdsa%2Fimdsa_web_web_services_dsa_overview_c.html

    Please look in the section "Web services listener"

    Thanks and regards
    Sudhakar
  • gulfsoft
    gulfsoft
    12 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T13:14:54Z  
    I'm still trying to find more info, but I have found two URLs for Impact 5.1.1 (I found them in some TBSM-supplied policies):

    (in /opt/IBM/tivoli/tbsm/policy/TBSM_REST_GetByKey.ipl)
    http://guiserverhost:port/nci/data/cluster/datasource/datatype/key

    and ( (in /opt/IBM/tivoli/tbsm/policy/TBSM_REST_GetByFilter.ipl)
    http://guiserverhost:port/nci/data/cluster/datasource/datatype?filter=filter

    But those would only work for 5.1.1 - the /nci context root is no longer valid on version 6.1 (it appears to be /impactAdmin now, and /impactAdmin/data is handled by the RESTDataServlet class), but it can't figure out the cluster name, and so keeps throwing an error no matter what URI I try.

    Frank

    We can make Tivoli software work for you!
    www.gulfsoft.com
  • SystemAdmin
    SystemAdmin
    255 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T13:23:59Z  
    • gulfsoft
    • ‏2012-05-23T13:14:54Z
    I'm still trying to find more info, but I have found two URLs for Impact 5.1.1 (I found them in some TBSM-supplied policies):

    (in /opt/IBM/tivoli/tbsm/policy/TBSM_REST_GetByKey.ipl)
    http://guiserverhost:port/nci/data/cluster/datasource/datatype/key

    and ( (in /opt/IBM/tivoli/tbsm/policy/TBSM_REST_GetByFilter.ipl)
    http://guiserverhost:port/nci/data/cluster/datasource/datatype?filter=filter

    But those would only work for 5.1.1 - the /nci context root is no longer valid on version 6.1 (it appears to be /impactAdmin now, and /impactAdmin/data is handled by the RESTDataServlet class), but it can't figure out the cluster name, and so keeps throwing an error no matter what URI I try.

    Frank

    We can make Tivoli software work for you!
    www.gulfsoft.com
    Hi Frank,

    Looks like there is a need to make changes to the Impact 5.1.1 REST API and to make it work for Impact 6.1 and future releases.

    If you were using Impact 5.1.1, attached is the document that describes the uses and examples.

    Thanks,

    Oskar Zinger
    Product Architect - Netcool/Impact
  • AntonZ
    AntonZ
    4 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T13:53:28Z  
    Hi Frank,

    Looks like there is a need to make changes to the Impact 5.1.1 REST API and to make it work for Impact 6.1 and future releases.

    If you were using Impact 5.1.1, attached is the document that describes the uses and examples.

    Thanks,

    Oskar Zinger
    Product Architect - Netcool/Impact
    Hi Guys,

    Thanks a lot for your answers! Your links and the attachement are very helpful.

    Best regards,

    Anton Zorin
  • gulfsoft
    gulfsoft
    12 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-05-23T18:45:54Z  
    Hi Frank,

    Looks like there is a need to make changes to the Impact 5.1.1 REST API and to make it work for Impact 6.1 and future releases.

    If you were using Impact 5.1.1, attached is the document that describes the uses and examples.

    Thanks,

    Oskar Zinger
    Product Architect - Netcool/Impact
    Thanks for the great info, Oskar. And it would be great to have it working in 6.1.

    Frank

    We can make Tivoli software work for you!
    www.gulfsoft.com
  • SystemAdmin
    SystemAdmin
    255 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-06-20T13:15:47Z  
    • gulfsoft
    • ‏2012-05-23T18:45:54Z
    Thanks for the great info, Oskar. And it would be great to have it working in 6.1.

    Frank

    We can make Tivoli software work for you!
    www.gulfsoft.com
    Hallo,

    i have been working with the REST API in Impact 5.1.1 with Operator Views.
    It seems that the REST API in Impact 6.1 does not work anymore. I didn´t find
    any documentation changes, but the access via the URL http://guiserverhost:port/nci/data/cluster/source/type?filter=filter does not work ?

    Has anybody used the REST API in Version 6.1 ?

    Thanks for any help

    Heinz-Werner
  • gulfsoft
    gulfsoft
    12 Posts

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2012-06-20T13:53:44Z  
    Hallo,

    i have been working with the REST API in Impact 5.1.1 with Operator Views.
    It seems that the REST API in Impact 6.1 does not work anymore. I didn´t find
    any documentation changes, but the access via the URL http://guiserverhost:port/nci/data/cluster/source/type?filter=filter does not work ?

    Has anybody used the REST API in Version 6.1 ?

    Thanks for any help

    Heinz-Werner
    No. Read the previous replies and you'll see that it no longer works in 6.1, and that Oskar at IBM is aware of this.

    We can make Tivoli software work for you!www.gulfsoft.com
  • DanGoetz
    DanGoetz
    1 Post

    Re: RESTful API for accessing events data: where can I find docs/exampes?

    ‏2015-07-15T18:57:23Z  

    Not sure if this helps but it would have been useful when I was hunting through the docs...

     

    You can use curl and the http api via the built-in sql factory (so you don't have to url encode the query parameters) and feed it direct sql.

    Example:

    curl -u "username:password" -H "Content-Type: application/json" -X POST -d '{"sqlcmd" : "select Customer, max(Severity) as MAX_S, count(*) as eCOUNT from alerts.status group by Customer order by MAX_S;"}' http://yourobjectserver:8081/objectserver/restapi/sql/factory

    or

    curl -u "user:password" -H "Content-Type: application/json" -X POST -d '{"sqlcmd" : "select Node, Summary from alerts.status;"}' http://yourobjectserver:8081/objectserver/restapi/sql/factory

     

    That will give you some nice json output of the alerts.status table, but you can query/join etc from other tables also (e.g. users). You can also update/create/delete new events that way but I believe it bypasses the Impact processing if you do.

     

    Handy mechanism for building home-grown event views or dashboards so you don't have to use the horrible java web interface.