Update Bookmark Error via REST API

In Progress

Comments

3 comments

  • Avatar
    Tagir Gadelshin

    Hi Reynard Bubb

    For updating bookmarks use Modify Bookmark endpoint:
    https://localhost:7001/#/api-tool/rest-v1-devices-deviceid-bookmarks-id-patch?version=current%20api

    curl --insecure -X PATCH "https://localhost:7001/rest/v1/devices/c9de29dc-4c88-5e47-5cbb-9cccd6760881/bookmarks/2cab1bc8-c5ab-448a-b9de-eee8ed6db91e"
    -H  "accept: application/json"
    -H  "Content-Type: application/json"
    -H  "Authorization: Bearer vms"
    -d "{\"name\":\"String\"}"

     

    curl above works for me (I substituted my auth token)

    0
    Comment actions Permalink
  • Avatar
    Tagir Gadelshin

    As you've mentioned that it's only reproduced on specific cameras -- can you provide more info about this aspect?

    Also, specific API calls with results of API calls that lists all available bookmarks might be helpful for troubleshooting. E.g., output of GET /rest/v1/devices/*/bookmarks

    0
    Comment actions Permalink
  • Avatar
    Reynard Bubb

    Hi Tagir,

    Sure, I use the /rest/v1/devices/*/bookmarks endpoint to pull bookmark information. Then I use that information to update the bookmark tags with the /rest/v1/devices/{deviceId}/bookmarks/{id} endpoint. When submitting the modify bookmark call I receive the error message "Resource '{d40d33bb-5555-497e-9cd1-d57f52a6b7a4}' is not found". When I take that same bookmark information and submit it via the deprecated API endpoint ec2/bookmarks/update, the bookmark updates correct.

    It only happens to certain cameras as mentioned. I did not see this behavior in my dev environment but as soon as I deployed the update to our production environment I saw the update error. We have 4 VMS servers in a hive configuration with a total of about 120 cameras.

    Please see the below screenshots of the API requests made via the 

    Get Bookmark:

    Update above bookmark:

    Response:

    Hope this helps - let me know if you need more information.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.