- Sep 21, 2016
You are correct, I tried to google for an easy explanation on how to create API Tokens, I gave up after a short while, but I am pretty sure the info is somewhere. I invested the time to write down the GUI way.[...]
I'm trying to use your script, but there is no information how to create the necessary TOKEN and corresponding secret for pvespiceconnect.sh
Can you elaborate on how to get this information?
Cheers and thanks
Here you go:
First go to Datacenter -> Permissions -> API Tokens and click on Add
In the following UI you have to choose a user that is connected to the API token and a name for that token. I think a nice comment for the token would be wise, but it is optional. Click on Add.
Next you are shown some important stuff, note it down, this is what you will use in the script.
You should see your token now.
Unfortunately the token is useless as it is now, the next step is to configure the permissions for the token.
Go to Datacenter -> Permissions and click on Add -> Api Token Permission
In the next UI Element you have to choose the accessible API Path, the API Token you have just created and a Role.
If you choose those as shown in the next picture it should definitely work to connect to a VM via Spice.
You may want to harden security by only allowing a certain Path. In the example I have choosen the root / Path which will allow I think at least read Access to anything in it. I am not entirely sure which minimal Path is needed for the script to work, as the script is using an API call which I didn´t find any documentation on. Link to Api Documentation
Click on Add and your Token including Permissions should be shown.
To see more go back to Datacenter -> Permissions -> API Tokens select a Token and click on Show Permissions.
Hope I could help you figure it out.