aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md62
1 files changed, 60 insertions, 2 deletions
diff --git a/README.md b/README.md
index f4555cc..0023869 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,65 @@
# phpipam
-An incomplete phpIPAM API implementation for python
+An incomplete phpIPAM API implementation in python.
-[API Doc](https://phpipam.net/api-documentation/)
+Refer to the [API Doc](https://phpipam.net/api-documentation/) for data layout.
+
+```
+import phpipam
+
+ipam = phpipam.phpipam("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.
+If an error is encountered, an exception is raised.
+
+## Controllers
+
+* `get()` returns all obejcts in in controller
+* `byID(object_id=<object id>)` get specific obejct by ID
+* `create(data=<data>)`
+* `edit(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
+
+### addresses
+
+* `getByIP(subnet_id=<subnet id>, ip=<ip>)`
+* `search(ip=<ip>)`
+* `getFirstFree(subnet_id=<subnet 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