Skip to main content

phpIPAM API implementation

Project description

phpipam-api

An incomplete phpIPAM API implementation in python.

import phpipam_api

ipam = phpipam_api.PhpipamAPI("https://phpipam.example.com/", "myapp", "apiuser", "p4s5word")

Usage:

data = ipam.<controller>.<operation>(<arguments>)

All functions return a dictionary object or a list of dictionary objects. Refer to the API Doc for data layout. If an error is encountered, an exception is raised.

Controllers

Functions shared by all controllers:

  • get() returns all obejcts in in controller
  • byID(object_id=<object id>) get specific obejct by ID
  • create(object_id=<object id>, data=<data>)
  • edit(object_id=<object id>, data=<data>)
  • delete(object_id=<object id>)

sections

  • getSubnets(section_id=<section id>)

subnets

  • search(search=<query>) search for subnet by CIDR
  • getIP(subnet_id=<subnet id>, ip=<ip>) get address object from subnet by IP
  • getAddresses(subnet_id=<subnet id>) get all addresses in subnet

addresses

  • getByIP(subnet_id=<subnet id>, ip=<ip>)
  • getByTag(tag_id=<tag id>)
  • search(ip=<ip>)
  • getFirstFree(subnet_id=<subnet id>)
  • getTags()
  • getTag(tag_id=<tag id>)
  • createFirstFree(subnet_id=<subnet id>)

vlan

l2domains

vrf

devices

  • getAddresses(device_id=<device id>)
  • getSubnets(device_id=<device id>)

prefix

requires

  • dateutil
  • requests

License: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phpipam-api-1.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

phpipam_api-1.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file phpipam-api-1.1.0.tar.gz.

File metadata

  • Download URL: phpipam-api-1.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for phpipam-api-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f4fd768ce040ffc1db6a3e7588d2409fbee901286c02167164a2c1be682cd662
MD5 78217eced45914ed70107238cc15567a
BLAKE2b-256 dc80acc1bda98f7f7781d6c2aa9aaab7bce5fa5ca1ab96a0c906b028e4566da6

See more details on using hashes here.

File details

Details for the file phpipam_api-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: phpipam_api-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for phpipam_api-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6854f6776d170f9c4137bfca6f92c5d1450052def797b1b0fdd29b0bebaebba
MD5 b5ecb8a56670f2db76430c379cafef8d
BLAKE2b-256 0e134dbc333a264de4d78f7185abe1ee0729b1cd7fedb8fcdbacbf5df22db6ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page