GithubHelp home page GithubHelp logo

Comments (3)

webinarium avatar webinarium commented on June 9, 2024

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.

webinarium avatar webinarium commented on June 9, 2024

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.

lcanali avatar lcanali commented on June 9, 2024

perfect. thanks you!

from linode-api3.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.