[SOLVED] How to Copy/Paste from API Documentation

utkonos

Active Member
Apr 11, 2022
152
47
33
How can I copy and paste easily from the "Parameters" section of the API documentation?

Here is an example. Navigate to this page of the API docs (they're all the same, and this is just one example):

https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/config

I can copy and paste the URL endpoint into my API client from the "Usage" section, but I am unable to copy /paste any of the parameter names from the "Parameters" section of the page. There appears to be an HTML or Javascript feature preventing those fields from being selected using mouse or keyboard. I am able to work around this by just typing manually and hoping I don't make a typo. For longer strings, I'm having to use the "Inspect" feature of the browser and then selecting and copying the content from developer tools in the "Elements" tab.

Is there a better way? Am I missing something? I'm working on a pretty large API implementation and my process could be improved if I can copy those fields easily.
 
You could access the raw data of your local installation under /usr/share/pve-docs/api-viewer/apidoc.js.
It contains the complete API schema for your version of PVE.
 
Thanks. Would it be possible to make the documentation easier to use by making those fields copyable rather than blocking it?