7 posts / 0 new
Last post
sdarveau
sdarveau's picture
REST Api - Authenticated but no vehicle connection.

Hello,

I can connect with Postman to https://api.openvehicles.com:6869/api/vehicles and I get a response:

[
    {
        "id": "<my vehicle id>",
        "v_apps_connected": 0,
        "v_btcs_connected": 0,
        "v_net_connected": 0
    }
]

But when I try something like https://api.openvehicles.com:6869/api/charge/<my vehicle id>

404 Not Found is returned

I guess this is related to v_net_connected being 0. Should 1 be returned?  The car is communicating normally with the iOS app and the Web Console.

Thanks

 

markwj
markwj's picture
I think the counts in api

I think the counts in api/vehicles being wrong is a bug. I have raised the issue here to follow up:

https://github.com/openvehicles/Open-Vehicle-Server/issues/9

I can't find any '404 Not Found' response to /api/charge/<vehicleid> possible? Are you sure that is the response you get? Can you share the 'curl -v' command you are running (with authentication redacted) so I can check?

sdarveau
sdarveau's picture
I'm using postman. Here is

I'm using postman. Here is the Url (I removed my password) that returns the "not found". If my vehicle https://api.openvehicles.com:6869/api/charge/H23VAS?username=sdarveau&password=xx Equivalent curl command: curl --location --request GET 'https://api.openvehicles.com:6869/api/charge/H23VAS?username=sdarveau&password=xx'

markwj
markwj's picture
I am checking...

I am checking...

markwj
markwj's picture
It seems to be a bug.

It seems to be a bug. Tracking it here:

https://github.com/openvehicles/Open-Vehicle-Server/issues/11

sdarveau
sdarveau's picture
I've fixed it.
markwj
markwj's picture
Looks good. Running now live

Looks good. Running now live on api.openvehicles.com.

Log in or register to post comments
randomness