Layout refresh
AnsweredHi,
We're trying to update a layout item using the API, which we are halfway successfully doing with the "Replace Layout Item" / "PUT /rest/v3/layouts/{layoutId}/items/{id}" endpoint.
However, this doesn't seem to be refreshing the image in Nx Witness Client automatically. It is updated when the layout is closed and reopened, but we'd like this to be updated in real time.
Are we missing something?
Best regards,
-
Official comment
Hello,
As per discussion in the related support ticket:
- PUT/PATCH /rest/v3/layouts/{layoutId}/items/{id} methods are expected to modify the layout item in the runtime - i.e. Desktop Client should reflect the changes that server received over the API calls.
- There is a known limitation of those methods not being able to change only resourceId value on the fly(i.e. change the original camera stream).
- If there is a need to "replace" the camera feed on the open layout there are 2 possible workarounds:
- Delete the item first(with DELETE /rest/v3/layouts/{layoutId}/items/{id}) first and then add a new one(with PATCH /rest/v3/layouts/{layoutId}/items/{id})
- Modify the whole layout instead of items one by one with PATCH/PUT /rest/v3/layouts/{layoutId}
Comment actions
Please sign in to leave a comment.
Comments
1 comment