phpIPAM API reference

1.) Authentication

Method URL Description
GET /api/my_app/user/ Checks if token is still valid and returns expires value for token.
“phpipam-token” or "token" HTTP header must be present.
/api/my_app/user/token/ Returns token expiration date
/api/my_app/user/token_expires/ Returns token expiration date
/api/my_app/user/all/ Returns all users
rwa app permissions required
/api/my_app/user/admins/ Returns admin users
rwa app permissions required
POST /api/my_app/user/ Authenticates user through “authorization” header.
Successfull response contains “token” and “expires”.
This token must be included in each following interactions with API as “phpipam-token” HTTP header.
PATCH /api/my_app/user/ Same as GET, but it resets the expiration of token.
“phpipam-token” or "token" HTTP header must be present.
DELETE /api/my_app/user/ Removes (revokes) token.
“phpipam-token” or "token" HTTP header must be present.

2.) Sections controller

Method URL Description
GET /api/my_app/sections/ Returns all sections
/api/my_app/sections/{id}/ Returns specific section
/api/my_app/sections/{id}/subnets/ Returns all subnets in section
/api/my_app/sections/{id}/subnets/addresses/ 1.5 Returns all subnets in section
/api/my_app/sections/{name}/ Returns specific section by name
/api/my_app/sections/{name}/subnets/ 1.5 Returns specific subnets in names section
/api/my_app/sections/custom_fields/ Returns custom section fields
POST /api/my_app/sections/ Creates new section
PATCH /api/my_app/sections/ Updates section
DELETE /api/my_app/sections/ Deletes section with all belonging subnets and addresses

3.) Subnets controller

Method URL Description
GET /api/my_app/subnets/ Returns all subnets in all sections
/api/my_app/subnets/all/ Returns all subnets in all sections (alias)
/api/my_app/subnets/{id}/ Returns specific subnet by id
/api/my_app/subnets/{id}/usage/ Returns subnet usage
/api/my_app/subnets/{id}/slaves/ Returns all immediate slave subnets
/api/my_app/subnets/{id}/slaves_recursive/ Returns all slave subnets recursive
/api/my_app/subnets/{id}/addresses/ Returns all addresses in subnet
/api/my_app/subnets/{id}/addresses/{ip}/ Returns IP address from subnet
/api/my_app/subnets/{id}/first_free/ Returns first available IP address in subnet
/api/my_app/subnets/{id}/first_subnet/{mask}/ Returns first available subnet within selected for mask
/api/my_app/subnets/{id}/last_subnet/{mask}/ 1.5 Returns last available subnet within selected for mask
/api/my_app/subnets/{id}/all_subnets/{mask}/ Returns all available subnets within selected for mask
/api/my_app/subnets/custom_fields/ Returns all subnet custom fields
/api/my_app/subnets/cidr/{subnet}/ Searches for subnet in CIDR format
/api/my_app/subnets/search/{subnet}/ Searches for subnet in CIDR format
/api/my_app/subnets/overlapping/{subnet}/ 1.5 Returns all overlapping subnets
POST /api/my_app/subnets/ Creates new subnet
/api/my_app/subnets/{id}/first_subnet/{mask}/ Creates new child subnet inside subnet with specified mask
PATCH /api/my_app/subnets/ Updates Subnet
/api/my_app/subnets/{id}/resize/ Resizes subnet to new mask
/api/my_app/subnets/{id}/split/ Splits subnet to smaller subnets
/api/my_app/subnets/{id}/permissions/ Sets subnet permissions (?grouname1=ro&groupname2=3&43=1)
DELETE /api/my_app/subnets/{id}/ Deletes Subnet
/api/my_app/subnets/{id}/truncate/ Removes all addresses from subnet
/api/my_app/subnets/{id}/permissions/ Removes all permissions

4.) Addresses controller

Method URL Description
GET /api/my_app/addresses/{id}/ Returns specific address
/api/my_app/addresses/all/ 1.5 Returns all addresses in all sections
/api/my_app/addresses/{id}/ping/ Checks address status
/api/my_app/addresses/{ip}/{subnetId}/ Returns address from subnet by ip address
/api/my_app/addresses/search/{ip}/ searches for addresses in database, returns multiple if found
/api/my_app/addresses/search_hostname/{hostname}/ Searches for addresses in database by hostname, returns multiple if found
/api/my_app/addresses/search_linked/{value}/ 1.5 Searches in database for addresses linked by customer defined "Link addresses" field, returns multiple if found
/api/my_app/addresses/search_hostbase/{hostbase}/ 1.5 Searches for addresses by leading substring (base) of hostname, returns ordered multiple
/api/my_app/addresses/search_mac/{mac}/ 1.5 Searches for addresses by mac, returns ordered multiple
/api/my_app/addresses/first_free/{subnetId}/ Returns first available address (subnetId can be provided with parameters)
/api/my_app/addresses/custom_fields/ Returns custom fields
/api/my_app/addresses/tags/ Returns all tags
/api/my_app/addresses/tags/{id}/ Returns specific tag
/api/my_app/addresses/tags/{id}/addresses/ Returns addresses for specific tag
POST /api/my_app/addresses/ Creates new address
/api/my_app/addresses/first_free/{subnetId}/ Creates new address in subnets – first available (subnetId can be provided with parameters)
PATCH /api/my_app/addresses/{id}/ Updates address
DELETE /api/my_app/addresses/{id}/ Deletes address
use 'remove_dns=1' parameter to remove all related DNS records
/api/my_app/addresses/{ip}/{subnetId}/ Deletes address by IP in specific subnet

5.) VLAN controller

Method URL Description
GET /api/my_app/vlan/ Returns all Vlans
/api/my_app/vlan/all/ 1.5 Returns all Vlans (alias)
/api/my_app/vlan/{id}/ Returns specific Vlan
/api/my_app/vlan/{id}/subnets/ Returns all subnets attached tovlan
/api/my_app/vlan/{id}/subnets/{sectionId}/ Returns all subnets attached to vlan in specific section
/api/my_app/vlan/{id}/custom_fields/ Returns custom VLAN fields
/api/my_app/vlan/{id}/search/{number}/ Searches for VLAN
POST /api/my_app/vlan/ Creates new VLAN
PATCH /api/my_app/vlan/ Updates VLAN
DELETE /api/my_app/vlan/ Deletes VLAN

6.) VLAN domains controller

Method URL Description
GET /api/my_app/l2domains/ Returns all L2 domains
/api/my_app/l2domains/all/ 1.5 Returns all L2 domains (alias)
/api/my_app/l2domains/{id}/ Returns specific L2 domain
/api/my_app/l2domains/{id}/vlans/ Returns all VLANs within L2 domain
/api/my_app/l2domains/custom_fields/ Returns all custom fields
POST /api/my_app/l2domains/ Creates new L2 domain
PATCH /api/my_app/l2domains/ Updates L2 domain
DELETE /api/my_app/l2domains/ Deletes L2 domain

7.) VRF controller

Method URL Description
GET /api/my_app/vrf/ Returns all VRFs
/api/my_app/vrf/ 1.5 Returns all VRFs (alias)
/api/my_app/vrf/{id}/ Returns specific VRF
/api/my_app/vrf/{id}/subnets/ Returns all subnets within VRF
/api/my_app/vrf/custom_fields/ Returns all custom fields
POST /api/my_app/vrf/ Creates new VRF
PATCH /api/my_app/vrf/ Updates VRF
DELETE /api/my_app/vrf/ Deletes VRF

8.) Devices controller

Method URL Description
GET /api/my_app/devices/ Returns all devices
/api/my_app/devices/all/ 1.5 Returns all devices (alias)
/api/my_app/devices/{id}/ Returns specific device
/api/my_app/devices/{id}/subnets/ Returns all subnets within device
/api/my_app/devices/{id}/addresses/ Returns all addresses within device
/api/my_app/devices/search/{search_string}/ Searches for devices with {search_string} in any belonging field
POST /api/my_app/devices/ Creates new device
PATCH /api/my_app/devices/ Updates device
DELETE /api/my_app/devices/ Deletes device

9.) Tools controller

Method URL Description
GET /api/my_app/tools/{subcontroller}/ Returns all subcontroller objects
/api/my_app/tools/{subcontroller}/{identifier}/ Returns specific subcontroller object
/api/my_app/tools/device_types/{id}/devices/ 1.5 Returns all devices belonging to device types
/api/my_app/tools/vlans/{id}/subnets/ 1.5 Returns all subnets belonging to vlan
/api/my_app/tools/vrf/{id}/subnets/ 1.5 Returns all subnets belonging to vrf
/api/my_app/tools/locations/{id}/subnets/ 1.5 Returns all subnets belonging to location
/api/my_app/tools/locations/{id}/devices/ 1.5 Returns all devices belonging to location
/api/my_app/tools/locations/{id}/racks/ 1.5 Returns all racks belonging to location
/api/my_app/tools/locations/{id}/ipaddresses/ 1.5 Returns all ip addresses belonging to location
/api/my_app/tools/racks/{id}/devices/ 1.5 Returns all devices belonging to rack
/api/my_app/tools/nat/{id}/objects/ 1.5 Returns all objects belonging to nat
/api/my_app/tools/nat/{id}/objects_full/ 1.5 Returns all objects with all parameters belonging to nat
POST /api/my_app/tools/{subcontroller}/ Creates new subcontroller object
PATCH /api/my_app/tools/{subcontroller}/{identifier}/ Updates subcontroller object
DELETE /api/my_app/tools/{subcontroller}/{identifier}/ Deletes subcontroller object

10.) Prefixes controller

Method URL Description
GET /api/my_app/prefix/{customer_type}/ Returns all subnets used to deliver new subnets
/api/my_app/prefix/{customer_type}/{address_type}/ 1.5
/api/my_app/prefix/{customer_type}/{address_type}/{mask}/ 1.5
/api/my_app/prefix/external_id/{external_identifier_field}/ 1.5
/api/my_app/prefix/{customer_type}/{ip_version}/ Deprecated in 1.5 Returns all subnets used to deliver new subnets for specific IP version
* ip_version can be IPv4, IPv6, v4, v6
/api/my_app/prefix/{customer_type}/address/ Deprecated in 1.5 Returns all subnets used to deliver new addresses
/api/my_app/prefix/{customer_type}/address/{ip_version}/ Deprecated in 1.5 Returns all subnets used to deliver new addresses for specific IP version
/api/my_app/prefix/{customer_type}/{ip_version}/{mask}/ Deprecated in 1.5 Returns first available subnet for ip version and requested mask
/api/my_app/prefix/{customer_type}/{ip_version}/address/ Deprecated in 1.5 Returns first available address for ip version
POST /api/my_app/prefix/{customer_type}/{ip_version}/{mask}/ Creates first available subnet for ip version and requested mask
/api/my_app/prefix/{customer_type}/{ip_version}/address/ Creates first available address for ip version

11.) Search controller

Method URL Description
GET /api/my_app/search/{search_string}/ 1.6 Searches phpipam database for required string
  1. Home
  2. API documentation
  3. API reference