Conduit API – lora-devices PUT

Home Forums Conduit: AEP Model Conduit API – lora-devices PUT

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26602
    Lawrence Griffiths
    Participant

    I can get a list of devices and DELETE a device. But trying to use PUT to update an existing device results in a Path error “path not found [lora/devices/a81758fffe03757f]”. I’m running v1.6.2

    I’m using POST MAN http://www.getpostman.com
    // PUT
    HTTP Header Content-Type: application/json
    UR https://192.168.1.236/api/lora/devices/a81758fffe03757f
    Body {“serial_number” : “1234”}

    // DELETE verb works
    https://192.168.1.236/api/lora/devices/a81758fffe031408

    https://www.multitech.net/developer/software/aep/conduit-aep-api/collection-endpoints-conduit/lora-devices/

    #26605
    Jason Reiss
    Keymaster

    Looks like the doc was wrong.
    Try without the EUI in the URL.

    PUT /api/lora/devices ‘{“dev_eui”:”<EUI>”, “serial_number”:”1234″}’

    #26607
    Lawrence Griffiths
    Participant

    Jason thanks

    Been trying diffident keys/deveui formats etc all of the below result in
    “Invalid json device configuration, object expected”
    All the JSON I’m submitting is valid

    {“deveui”:”a81758fffe03757f”, “serial_number” : “1234”}
    {“deveui”:”a8-17-58-ff-fe-03-75-7f”, “serial_number” : “1234”}

    {“dev_eui”:”a81758fffe03757f”, “serial_number” : “1234”}
    {“dev_eui”:”a8-17-58-ff-fe-03-75-7f”, “serial_number” : “1234”}

    {“a8-17-58-ff-fe-03-75-7f”: {“serial_number” : “1234”}}
    {“a81758fffe03757f”: {“serial_number” : “1234”}}

    Not sure what to try next?
    This is something I was doing to show Campbell Elder…

    #26608
    Jason Reiss
    Keymaster

    That last quote looks different.

    #26629
    William Laing
    Participant

    We are able to do PUTs using Postman.

    A couple things to consider:

    + When I copied your JSON body and tried it, your double-quote characters did not work, so I needed to retype them on my machine
    + Authorization->Type: Basic Auth
    + Authorization->Username: value typed in
    + Authorization->Password: value typed in
    + The JSON body I used was of the form:
    {
    “deveui” : “00-80-00-00-04-00-99-99”,
    “serial_number” : “1234”
    }

    Hope that helps.

    #26640
    Lawrence Griffiths
    Participant

    William thanks my bad hadn’t checked the Post header Content-Type !!
    I wanted to write to the tags field/key Failed! So deiced to test write to other fields. results below

    class STRING fail // failed to update device
    firmware_version STRING pass
    hardware_version INT pass
    product_id STRING pass
    serial_number STRING pass
    tags STRING fail
    name STRING fail

    Lawrence

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.