cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Unable to query Cisco Router using RestAPI and APOC

Hello,

I have a cisco router that is configurable via REST API. I would like to query in order to get some information.

First step is to get a token that will be used in next "GET" methods as a custom http header:
X-auth-token: 135136khdtg316

I try to query from neo4j desktop:

WITH 'https://192.168.12.133:55443/api/v1/interfaces/GigabitEthernet1' AS uri CALL apoc.load.jsonParams(uri, {X-auth-token: 'iCWJVgCC4JgItFHShncwKKYa1Bt8L4Gly9nOzf5KXOk='}, null) YIELD value RETURN value

But i am receiving the following error:
Failed to invoke procedure apoc.load.jsonParams: Caused by: java.lang.RuntimeException: Can't read url or key https://192.168.12.133:55443/api/v1/interfaces/GigabitEthernet1 as json: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

The get request from postman using the same url as above returns the following:
{
"kind": "object#interface",
"description": "",
"if-name": "GigabitEthernet1",
"proxy-arp": true,
"subnet-mask": "255.255.255.0",
"icmp-unreachable": true,
"ipv6-enable": false,
"nat-direction": "",
"icmp-redirects": true,
"ip-address": "192.168.12.133",
"verify-unicast-source": false,
"type": "ethernet",
"mac-address": "000c.29b0.c2eb"
}

I am unable to download the certificate from the device. There is any other option?
Thanks !

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online