Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Python API client library for IX-API

License

NotificationsYou must be signed in to change notification settings

peering-manager/pyixapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python API client library forIX-API.

Supported versions are:

Installation

To install runpip install pyixapi.

Quick Start

To begin, import pyixapi and instantiate the API.

importpyixapiixapi=pyixapi.api("https://api.de-cix.net/api/v1/","3LH3G72VH7H1SGogEsFeQOPsGjOQotMUZQRt2pK7YbH","cEtrt8s0vR0CsG0vpAmcaxtnolzZj7DEG0B7izvwPlV",)ixapi.authenticate()

The first argument the.api() method takes is the IX-API URL. The second andthird arguments are the API key and secret used for authentication.

Authenticating will generate a pair of access and refresh tokens that can bepassed as argument to the.api() method.

Queries

The pyixapi API is setup so that IX-API's endpoints are attributes of the.api() object. Each endpoint has a handful of methods available to carry outactions on the endpoint. For example, in order to query all the objects in thenetwork-service-configs endpoint you would do the following:

>>>nsc=ixapi.network_service_configs.all()>>>foriinnsc:...print(i)...DXDB:PAS:00001DXDB:PAS:00002DXDB:PAS:00003DXDB:PAS:00004DXDB:PAS:00005DXDB:PAS:00006DXDB:PAS:00007DXDB:PAS:00008>>>

Write queries are not implemented yet.


[8]ページ先頭

©2009-2025 Movatter.jp