cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
332
Views
1
Helpful
7
Replies

Cisco Bug API Issue

jdtrepagny9
Level 1
Level 1

Hi, 

I'm trying to request the Cisco Bug API for this product id: ISR4431/K9.
But the API returned a 404 response.
My Request is:
GET https://apix.cisco.com/bug/v2.0/bugs/products/product_id/ISR4431/K9?page_index=1&modified_date=5
I tried to encode the pid parameter but I have the same result.
GET https://apix.cisco.com/bug/v2.0/bugs/products/product_id/ISR4431%2FK9?page_index=1&modified_date=5

The PID is correct and I can see all bugs for this PID with the Cisco website.

Any idea how to send this type of PID ?

 

 

7 Replies 7

Torbjørn
VIP
VIP

I believe the PID you should use here is "ISR4331" without the "/K9".

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

I tried to request it but the response is:

"ErrorResponse": {
"APIError": [{
"ErrorCode": "420",
"ErrorDescription": "Error: Invalid Hardware Part (ID)",
"SuggestedAction": "Please contact API support team at supportapis-help@cisco.com"
}]
}

Interesting error. I will have a look further into this later today or tomorrow.

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

Really no expert here, but wondering if ISR4431/K9 is being treated as part of the path (like /products/product_id/ISR4431/K9). When the API encounters the second / in ISR4431/K9, it expects it to be a new path segment, not part of the product_id?

So if you did  a GET https://apix.cisco.com/bug/v2.0/bugs/products?product_id=ISR4431%2FK9&page_index=1&modified_date=5


Your product_id is then a key value pair in the query string, so the slash might not be misinterpreted as a path separator. You could open the developer tools in chrome and see if  ISR4431/K9 and it's not encoded or is being split, this might confirm the server is treating the slash as a path separator. If you use a query parameter, you should see it correctly as product_id=ISR4431%2FK9.
 
A lot of me guessing here...
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

wordenj
Level 1
Level 1

Appears to be broken regardless what product id you use:
https://apix.cisco.com/bug/v2.0/bugs/products/product_id/WS-C2960-8TC-S

Even the example in the API documentation gives you the same error

https://apix.cisco.com/bug/v2.0/bugs/products/product_id/WS-C3560-48PS-S

 

{
    "ErrorResponse": {
        "APIError": [
            {
                "ErrorCode": "420",
                "ErrorDescription": "Error: Invalid Hardware Part (ID)",
                "SuggestedAction": "Please contact API support team at supportapis-help@cisco.com"
            }
        ]
    }
}

@wordenj I am guessing https://apix.cisco.com/bug/v2.0/bugs/products/product_id/WS-C3560-48PS-S fails because, while it includes the required base_pid in the path, it does not include any of the optional query parameters that the API seems to implicitly require for this specific endpoint, even though they are listed as "No" in the "Required" column.

https://developer.cisco.com/docs/support-apis/bug/#get-bugs-by-base-product-id

For ref, here is a working URL https://apix.cisco.com/bug/v2.0/bugs/products/product_id/WS-C3560-48PS-S?sort_by=severity&page_index=1 - this works because it includes the base_pid within the path (WS-C3560-48PS-S) and provides values for sort_by and page_index.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

wordenj
Level 1
Level 1

@bigevilbeard I've tested this further. Looks like older part numbers are no longer in the system. If you use a more current part number you get results. For example:

https://apix.cisco.com/bug/v2.0/bugs/products/product_id/C9200-24T?page_index=1&modified_date=5&sort_by=modified_date

The documentation is still is referencing the WS-C3560-48PS-S so I was using that as a test.

Is there an API to pull valid part numbers?