[SOLVED] How to Copy/Paste from API Documentation

Apr 11, 2022
132
26
18
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.
 
I can't answer that since I'm not familiar with that part of the code.
But feel free to open an enhancement request in our Bugzilla: https://bugzilla.proxmox.com/
 
  • Like
Reactions: utkonos

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!