Comments (3)
Seems it's not possible using Linode API - it returns only ipv4 addresses. Please remember, this library is only a wrap for Linode's API - the library just reflects the API abilities with all existing restrictions.
From another hand, the library wraps the APIv3, which is going to be replaced by new APIv4 soon (https://developers.linode.com/v4/reference/endpoints/linode/instances/:id/ips). Sorry, I haven't completed the library for APIv4 yet, but you can try to use the APIv4 manually and check - maybe the new API returns ipv6 now. Please be aware that APIv4 is still in beta, updates often, and may introduce BC changes btw its versions.
from linode-api3.
Being curious, I have just tried their APIv4 using curl. First I've created an access token in the new Linode Manager (see https://developers.linode.com/v4/guides/curl/testing-with-curl) providing this token with "view only" access to everything.
No matter the token has access to all the endpoints, it's failed with "Your OAuth token is not authorized to use this endpoint" message when I tried the following (assume $token
and $id
are real token and Linode ID):
curl -H "Authorization: token $token" https://api.linode.com/v4/linode/instances/$id/ips
But the upper level endpoint worked fine and returned ipv6 as well:
curl -H "Authorization: token $token" https://api.linode.com/v4/linode/instances/$id
{
"group": "",
"transfer_total": 1000,
"vcpus": 1,
"region": "us-west-1a",
"distribution": "linode/ubuntu16.04lts",
"updated": "2017-09-01T11:25:19",
"created": "2017-09-01T07:27:33",
"ipv4": ["192.168.xxx.xxx", "45.79.xxx.xxx"],
"status": "running",
"alerts": {
"transfer_out": 10,
"io": 10000,
"cpu": 90,
"transfer_quota": 80,
"transfer_in": 10
},
"backups": {
"enabled": false,
"schedule": {
"window": null,
"day": null
}
},
"id": 1234567,
"label": "...",
"memory": 1024,
"ipv6": "xxxx:xxxx::xxxx:xxxx:xxxx:xxxx/64",
"type": "g5-nanode-1",
"hypervisor": "kvm",
"disk": 20480
}
Hope this helps.
from linode-api3.
perfect. thanks you!
from linode-api3.
Related Issues (7)
- List all linodes and associated public ip address HOT 3
- Fatal error: Uncaught exception 'RuntimeException' with message 'Empty response' HOT 5
- does curl use the system or php timeout timeout value? HOT 2
- can we get the error code returned when an error occurs? HOT 3
- any plans for api v4 support? - thanks! HOT 2
- Linode API SSL upgrade - library no longer works out of the box HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linode-api3.