Skip to content

how to remove or delete item with API? #2

Description

@nmc79

Hi
You can guide me how to remove or delete item with your API?
I tried test but error.

test = ros.queue.simple(name="Test")[0]
ros.queue.simple.remove(test.id)
Traceback (most recent call last):
File "", line 1, in
File "D:\Mikrotik\API\rosrestpy-main\ros_base.py", line 96, in remove
self.ros.session.delete(self.filename + f"/{self._getid(o)}")
File "D:\Mikrotik\API\rosrestpy-main\ros_base.py", line 64, in _getid
assert hasattr(o, "id"), f"{o} didnt have id from the router"
AssertionError: *1 didnt have id from the router

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions