Prime 2.2 API och curl

Hi!
I have a question regarding Cisco prime and The api.. How can I extract the information under “Inventory, Network devices, switches and hubs” with Curl..
I have been successful in some curl questions, but need help with how to extract data under “switches and hubs”
Example of curl cmd that works for me…
curl -k -u user:password https://192.168.62.25/webacs/api/v1/data/
Regards
Lasse

Hi Philipp,
What is the get you are doing to have "all the clients we are seeing on our network" ?
Thanks.

Similar Messages

  • Prime Infrastructure 2 - API rate limit change?

    Good day -
    The Prime API is pretty sweet, and can give you JSON data back easily with a call like this:
    https://prime/webacs/api/v1/data/Clients.json?.full=true
    It is, however, limited to 100 results. We'd like to see more than that.
    How do I change this rate limit for the API?

    I have found that this command does work, but still limits to 1000. 
    https://prime/webacs/api/v1/data/Clients.json?.maxResults=9999&.full=true
    Now I get Tomcat a HTTP Status 503 error.  There's another setting I've not found yet.
    My json results say "@count":"6980", suggesting I have that many clients in the database.

  • Cisco Prime 2.2 API maxResults parameter

    Dear Mr Cisco,
    Concerning the maxResults parameter in an URL, is it possible to surpass 100, or is this the absolute maximum ?
    Using the API, we would like to extract all clients (wired & wireless), there are 50000+ clients, so this results in a lot of queries !!
    So, is it possible to surpass 100 or is it possible to change a certain parameter so it could be possible to do queries with more than 100 entries ?
    Thanks in advance,
    Lieven Stubbe
    Belgian railways

    You can thin provision. Trying to change the overall profile though will most likely result in issues sooner or later. When you run out of disk space it will fail in ungraceful ways.

  • Cisco Prime Infrastructure 2.2 Rest API XML does not add LF

    I am using several scripts that dig the data from XML files created through Cisco Prime Infrastructure Rest API. It worked fine until 2.1. Now, with 2.2, seems Cisco stopped adding LF to each line and everything is 'one' line.
    Here is an example with 2.1, there is a LF to the end of each line:
    ?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <queryResponse type="AccessPointDetails" rootUrl="https://server/webacs/api/v1/data" requestUrl="https://server/webacs/api/v1/data/AccessPointDetails?type=contains(UnifiedAp)&amp;.full=true&amp;.maxResults=1000&amp;.firstResult=0" responseType="listEntityInstances" count="715" first="0" last="714">
        <entity url="https://server/webacs/api/v1/data/AccessPointDetails/1505569" type="AccessPointDetails" dtoType="accessPointDetailsDTO">
            <accessPointDetailsDTO id="1505569" displayName="1505569">
                <adminStatus>ENABLE</adminStatus>
                <apType>AP1240</apType>
                <cdpNeighbors>
                    <cdpNeighbor>
                        <capabilities>Switch IGMP </capabilities>
                        <duplex>Half Duplex</duplex>
                        <interfaceSpeed>100Mbps</interfaceSpeed>
                        <localPort>2</localPort>
                        <neighborIpAddress>10.1.1.1</neighborIpAddress>
                        <neighborName>switch</neighborName>
                        <neighborPort>FastEthernet0/1</neighborPort>
                        <platform>cisco WS-C3560-8PC</platform>
                    </cdpNeighbor>
    Now, with 2.2, there is not LF anywhere:
    ?xml version="1.0" encoding="UTF-8" standalone="yes"?><queryResponse type="AccessPointDetails" rootUrl="https://server/webacs/api/v1/data" requestUrl="https://server/webacs/api/v1/data/AccessPointDetails?type=contains(UnifiedAp&amp;.full=true&amp;.maxResults=1000&amp;.firstResult=0" responseType="listEntityInstances" count="715" first="0" last="714">
    <entity url="https://server/webacs/api/v1/data/AccessPointDetails/1505569" type="AccessPointDetails" dtoType="accessPointDetailsDTO">
    <accessPointDetailsDTO id="1505569" displayName="1505569"><adminStatus>ENABLE</adminStatus><apType>AP1240</apType><cdpNeighbors><cdpNeighbor>
    Does anyone know, is this intentional or a mistake? Or is there a way how I control this?
    I am reading on-line CPI Rest API docs, but seems cannot find anything.
    Thanks,
    Vlad

    PI 2.0 is in Beta mode for testing in closed group already. However it may still take some time to get released on CCO for FCS.
    I think it is expected to be released between aug-sep. BU has also started working on CPI 2.1, which you can see test uploads on CCO.
    For what does it have for customers?
    > As Cisco have a vision of one network Management software for both wired and wireless infrastructure, which started getting real partially with Cisco PI.
    As WCS got evolved to NCS and eventually to Cisco Prime Infrastructure, but it doesnt yet have full Management capability for wired infra., which is there with LMS.
    With CPI 2.x Cisco plans to blend entire LMS and WCS features together.
    -Thanks

  • Cisco PI 2.0 API - GET Device Interface Description

    Hi,
    we are using Cisco Prime Infrastructure 2.0 as our central device discovery and inventory for all network equipment. Then we export the database to multiple other systems, primary through the REST API. My question is if anyone have used the PI API to retrive a device interface descriptions?
    Looking at the documentation at https://[prime IP]/webacs/api/v1/data/InventoryDetails?_docs you'll see under the value PhysicalPort[] a description field, but it seems like it only get the port name i.e. FastEthernet1/1. Basically the same as the Name field.
    Do anyone know how to get the description on an interface through the Cisco PI 2.0 API?
    Cheers // Mattias

    Because you would think that GET InventoryDetails -> PhysicalPort -> Description would be it... but no, it shows exactly the same thing as "name"!?
    PhysicalPort[]
    physicalPort
    This nested field provides information about the physical ports associated with this device.
    Type
    Attribute Name
    Description
    String
    description
    The port description (i.e. Fast Ethernet Port, etc.).
    long
    deviceId
    An internal id to recognize the device, which is the id of the associated management network element associated with this device.
    long
    equipmentId
    The ID of the equipment object that this port is contained in.
    String
    name
    The name of the port.
    String
    residingModule
    The module that contains the port.
    String
    vendorEquipmentType
    The vendor equipment type.

  • Accessing the user management API programmatically

    I am looking for the officially supported method that could be used to access the user management API via "curl" for CRX:
    There is a user management API described here:
    http://sling.apache.org/site/managing-users-and-groups-jackrabbitusermanager.html
    However, executing a command on CRX 2.2 such as:
    curl -u:admin:admin http://localhost:7402/system/userManager/user.tidy.1.json
    Only returns a message indicating that the contents have been redirected (without providing another URL).
    Using the Content Explorer in CRX shows the list of users at: /home/users but I am not sure if a curl command could access the user list via that URL.
    Any pointers on how this could be done are appreciated.  This is for a partner.
    Regards,
    Blair

    I am a co-worker of MorrellJ.  I am trying to do a change password request using the Jackrabbit User Manager with the REST URL /system/userManager/user/<username>.changePassword.json.  The problem I am having is that this request requires an oldPwd form param in the request.  The issue is that when I am trying to do this request it is in response to the user selecting "Forgot Password" so our logic has created a random password which we then email to the user so they can use that the next time they want to login.  We need to change that user's password in CRX so they can log in using it next time.  Since they haven't logged in there is no session, NOT the problem.  THE PROBLEMS, I don't know 1. how to use the userManager to get that user's old password, since /system/userManager/user/<username>.json doesn't appear to return the password and 2. if I could get the old password it most certainly will be encoded, some how, so I will need some decoding algorithm to pass it through in order to get the actual password to set as the oldPwd form param to my change password request.  Please let me know if you require any further explanation.  Any assistance would be greatly appreciated.  Thank you, in advance, for your assistance.
    Sincerely,
    Mike Sucena
    [email protected]

  • Cisco Prime 2.1 problem with API/Client

    Hi,
    im having a problem with the API output i get from Cisco Prime Infrastructure. The URL im trying to GET info from is:
    https://<URL>/webacs/api/v1/data/Clients
    The output shows that im missing data from a specific ID. Example:
    {"@url":"https:\/\/prime.lmv.lm.se\/webacs\/api\/v1\/data\/Clients\/1280389614","@type":"Clients","$":"1280389614"}
    Then i try to GET the info regarding this ID: https://<URL>/webacs/api/v1/data/Clients/1280389614
    {"errorDocument":{"httpResponseCode":500,"httpMethod":"GET","message":"No such entity as Clients \/ 1280389614.-PRS-101","id":"presentation.PRS-101","uriPath":"data\/Clients\/1280389614","queryParams":"{}"}}
    So something is wrong here, so when i add ".full=true" parameter i get the following error as it cannot show the client data:
    https://<URL>/webacs/api/v1/data/Clients.json?.full=true&.firstResult=1000&.maxResults=1000
    {"errorDocument":{"httpResponseCode":500,"httpMethod":"GET","message":"Exception while invoking valueOf method 'getEnum' of enumeration class 'class com.cisco.ncs.nbi.client.ClientProtocolEnum'; nested exception is org.hibernate.HibernateException: Exception while invoking valueOf method 'getEnum' of enumeration class 'class com.cisco.ncs.nbi.client.ClientProtocolEnum'","exception":"org.springframework.orm.hibernate3.HibernateSystemException: Exception while invoking valueOf method 'getEnum' of enumeration class 'class com.cisco.ncs.nbi.client.ClientProtocolEnum'; nested exception is org.hibernate.HibernateException: Exception while invoking valueOf method 'getEnum' of enumeration class 'class com.cisco.ncs.nbi.client.ClientProtocolEnum'","uriPath":"data\/Clients","queryParams":"{.full=[true], .firstResult=[1000], .maxResults=[1000]}"}}
    Any idea how to solve this issue, how can i find the client that is causing this problem? In my script im reading all the clients in the network to a third party application. But right now its hard to get this output in a smart way. It might be resolved in 2.2, but it feels like the data i corrupt in some way so i doubt that this error is related to the version?
    Best Regards // Mattias Andersson

    Hi,
    I have also run into this problem on two different Prime 2.1-systems when trying to get all Client-data available. I haven't figured out a way to fix it more than making small calls (.maxResults=100) then trying to pin-point and skip the ID giving the error. I've been using 2.2 for a while now but haven't tested the Client-API that much yet. I'll experiment some more on it and see if I can recreate the problem to see if it's related to the version.

  • HP Prime: How to Do Curl

    I am trying to use the curl function on the Prime. The syntax given on p. 327 of the User Guide is
    curl([Expr1, Expr2, ..., ExprN], [Var1,Var2, ..., VarN])
    and it gives the example
    curl([2*x*y,x*z,y*z],[x,y,z]) returns [z-x,0,z-2*x]
    Notice that the syntax is a comma-separted list of expressions inside square brackets, followed by a comma, followed by a comma-separated list of variables. But when I try to enter the left brackets, the calculator inserts the matrix template, and I'm not able to enter the comma-separated lists. What is the exact key sequence to enter this example? Thanks.
    This question was solved.
    View Solution.

    Hi,
    This is indeed odd. However, it can still be used by entering data in the top row only:
    HTH
    Note: I do not work for HP, I just like playing with calculators :-)

  • Cisco Prime Infrastructure 2.2 API not working

    Just upgraded to PI 2.2. API got error of "Access is denied to prime Infrastructure". Even assigned the user with 'Super Users' and 'NBI credential, NBI read, NBI', we still got denied error.
    We use Perl to access API. Any sample code for authentication and authorization in Perl? Now even URL of https://prime.nm.nd.edu/webacs/api/v1/data got denied error.
    Thank you.

    PI 2.2 API changed authorization group for API access. We added "NBI Read" and "NBI Credential" to API user, and resolved the access issue.
    Cheers.

  • Prime Infrastructure API add device

    I've been looking at the Prime Infrastructure 2.1 API at /webacs/api/v1/ on my PI instance but I can't seem to find a way to add devices using the API? Looking to write a script for our techs to run after the provisioning of a new device and would love a way to get it added to Prime. Any ideas?

    It isn't possible in Prime Infrastructure 2.1 to add devices via API, however, it now is possible with version 2.2. I've used it myself and I can confirm that it works.

  • Prime Infrastructure 2.0 API maximum client response

    Hey guys,
    we are using the REST API of PI2.0 to get all the clients we are seeing on our network, the issue is there is obviously a maximum of 50.000 clients in a API call response, due to using guest access with a huge amount of devices I would like to know 2 things:
    1. Is there a way to increase the limit on the API calls from 50.000 to something higher
    2. Is there a way to filter the clients which are stored in the client and users database? (We would like to filter on devices or interfaces)
    Thanks

    Hi Philipp,
    What is the get you are doing to have "all the clients we are seeing on our network" ?
    Thanks.

  • Cisco Prime Infrastructure API

    Hello,
    does Cisco PI provide an API to access its data? We have a list of ip addresses with correct timestamps and i want to know which user had the ip address in the corresponding timeframe. Is there any way to accomplish this?
    thanks for any response
    regards
    -andreas

    yes,you can access API documentation https:///webacs/api/v1  for detailed information.

  • Prime Infrastructure maps and API

    Anyone know of a way to get map info from PI via API that allows you to associate APs to it?
    I can get Sites which shows me the map names/structure along with apCount.
    AccessPointDetails has a field called <mapLocation> however it only has the string description one liner location such as "default location".
    I'm guessing that Sites has the DB links to what APs are associated, I just need a way to pull out which ones they are.
    Thanks.

    Alex, Suwa
    You can still monitor interfaces with the following workaround (which works for me):
    Under Design > Monitoring Configuration:
    From the tree on the left, expand Features > Interface Health
    If needed, select the interface parameters to poll and the polling intervals, provide a name to your template and then click "Save as new template"
    Under Deploy > Monitoring Deployment:
    Locate your template and click the green "Deploy" button
    Select which devices you want to poll, or just select a group like "Routers", Switches etc.
    That should do the trick and information should show up after few minutes.
    Hope it helps,
    Tomer
    BTW- you can also perform the same for device health, by using "Device Health" Metrics template under "Design".

  • Agregar Código de Barra desde DI API (Add-ON)

    Hola a todos.
    Estoy desarrollando un ADD-On para la versión 9 y estoy teniendo un problema para agregar el código de barras de un producto.
    En esta nueva versión el código de barras tiene que estar creado previamente en la tabla OBCD ANTES de asignarlo a un artículo, a diferencia de la 8 en la que este campo era uno de texto y se le podía colocar lo que quisieras.
    Mi problema radica en que tengo un procedimiento dentro de mi add-on que se encarga de generar un código de barras automático cuando el usuario ingresa un nuevo artículo, pero no puedo directamente asignarlo al item como se hacía antes (Item.BarCode = XXXXX) por lo que expliqué previamente. Además, si lo hago d esta manera salta una nueva ventana para definir códigos de barra y es lo que no quiero.
    He revisado el SDK y habla de dos clases: SAPbobsCOM.BarCodesService y SAPbobsCOM.BarCode.
    El problema está en que cuando trato de instanciarlas, me da error.
                                    Dim BarCodeService As New SAPbobsCOM.BarCodesService
                                    Dim BarCode As New SAPbobsCOM.BarCode
                                    BarCode.ItemNo = Codigo
                                    BarCode.BarCode = Generar_Codigo_Barras(Codigo)
                                    BarCodeService.Add(BarCode)
    No puedo pasar siquiera del primer NEW. Alguién tendrá idea de cómo hacerlo o saber porqué generar error al hacer el new?
    También he visto que existe una clase llamada SAPbobsCOM.ItemsBarCodes pero no consigo tampoco instanciarla
    Muchas Gracias
    Saludos.

    Hola
    en la nota 1856704 aparece:
    Symptom
    You cannot add, update or delete a bar code when you use the Items object to add or update an item. You must use the BarCodeService object to do that.
    Solution
    The ItemBarCodes object is exposed as a sub object of the Items object in DI API. You can now add, update and delete a bar code when you add or update an item.
    Other terms
    SDK, OBCD, Bar Code, ItemBarCodes
    Hace referencia a la versión 9.0 PL05 y es un error con prioridad media.
    Un saludo
    Agustín Marcos Cividanes

  • ISE 1.2 Patch 7 ERS API problem updating some endpoints with a new group

    Hi,
    I have a php library that i have implemented most of the ers api functions with curl requests, and it works fine, i can get all endpoints, search for a specific endpoint, delete endpoints and to some degree i can modify endpoints, but not all endpoints it seems. For some reason when i use my function on some endpoints, the static endpoint group assigment does not get updated, and the response from the ers api is just empty, whereas when it goes good, i get a list of the attributes that were updated.
    Is there some specific requirements for which information has to be sent using the update_endpoint function in the ers api ? The examples have all information in every request, however what is actually needed in the request?
    Jan

    Have now tested by sending all parameters, even though i only want to change group or description, and it works.

Maybe you are looking for

  • Loading Non-English Characters using VBA and BAPI

    Hi Experts, I am trying to load Non-English characters (Chinese, Korean, Japanese, etc.) into a SAP Table using BAPI and VBA. I have set the connection language and codepage values but when I run the tool, the non-English characters display as ?????

  • How can I audio scrub in Photoshop CC?

    So I am making a lip sync animation and I need to be able to hear the audio as I scrub it. But so far I can only hear the audio when I play the clip. Is there a way to switch it to stream the audio as I scrub it?

  • Material Priceing Report

    Hello every body,                Plz help me, I am stuck with a report is to display all the priceing details based on Sales organization and division ( Material Priceing Report ) Kindly Plz send me as early as possible.

  • Can I transfer pictures stored on my pc to my ipad2? Pc has windows7 and did the original sync but have new pictures to add.

    Can I transfer pictures stored on my pc to ipad2?  Pc has windows7 and I did the original sync but have additional pictures now.

  • Schema Problem

    hii I have created a DB user(SEPT) using "create user sept identified by **** " and i created many tables for that user .... IS this user (SEPT) considered to be a SCHEMA that i can create a workspace over it if not how can i build a schema with tabl