How to get all change logs linked to a particular script execution or bulk update inside? #13612
Unanswered
dylanbob
asked this question in
Help Wanted!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks, and thank you for developing open-source!
I developed a script using the diffsync library (used by nautobot) to import some data (a few thousands of devices and their attributes, including other objects recursively : device_type, device_role, site, etc.) from an HTTP API.
A script execution may add, modify and/or delete entries. I would like to list them exhaustively in the web UI after the script execution (directly on the page or through a URL).
The quite handy
Request IDfilter of the changelog page is great, e.g.f.q.d.n/extras/changelog/?request_id=e821abb0-7a3a-45eb-...which does the trick because in my case, everything is updated in one go.However... my current process is to check the script execution time and scroll through changelogs for the corresponding request ID, which is not practical when many entries are modified by many script executions.
I would like to be able to add a link at the end of my script execution pointing at this web UI page, but I need this
request_idfor that.How may I get the request_id in my script?
NB: when using the netbox HTTP API (which I am NOT using, I am using the direct python API), the
X-Request-IDHTTP header seems adequate. How could I get such information when using the direct python API?Beta Was this translation helpful? Give feedback.
All reactions