Apteriks REST API

We keep adding features to Apteriks REST API. If you want to raise the priority of features that you need, tell us about it here or drop us a line at info@apteriks.com

Enabling the API

By default the API functionality is disabled. In order to enable it, log in to the Apteriks portal and navigate to
Your Account > REST API Settings.

Enable the REST API functionality and obtain both API Username and Password.

Authentication

Every API request must be authenticated. Authentication to the API is performed via HTTP Basic Authentication. Provide both API Username and Password when making an API request.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Authorization

You can control Read/Write privileges of your API account on REST API Settings page. The following access levels have been defined.

Disabled. The credentials of your API account remain intact, but the access to the information is denied. Use this access level when you want to disable API function without completely removing API authentication credentials.

Read Only. You will be able to obtain data via API GET calls, but will not be able to change existing data or create new data using POST, PUT or DELETE API calls.

Read Write. You have full access to your data.

Request methods

Apteriks uses the following HTTP Methods

GET
Read the object details. This method can be executed with Read Only API access privileges.

POST
Create the new object. This method requires Read Write API access privileges.

PUT
Modify the existing object. This method requires Read Write API access privileges.

DELETE
Delete the object. This method requires Read Write API access privileges.

X-HTTP-Method-Override

In some cases you may not use any other methods except GET and POST. This may be due to limitations of HTTP proxies, your firewall settings, or browser restrictions. In that case in order to execute PUT or DELETE requests, send the POST request but include the X-HTTP-Method-Override header.

POST request with X-HTTP-Method-Override header equal to "PUT" will be treated as native PUT request.

POST request with X-HTTP-Method-Override header equal to "DELETE" will be treated as native DELETE request.

Response format

JSON vs XML

The data can be returned in both JSON and XML formats. We recommend to use JSON as it is more lightweight and easier to parse.

Set the ACCEPT HTTP header to "application/json" in order to receive the response in JSON format.

Set the ACCEPT HTTP header to "application/xml" in order to receive the response in XML format.

Response codes

Apteriks uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in 4xx range indicate errors on the client side, and codes in 5xx range indicate errors on the server side.

"Success" response structure

When the HTTP response code is in 2xx range, the response body contains the requested object(s).

"Error" response structure

Unsuccessful API response with HTTP status codes 4xx or 5xx return the following object in the response body.

Field Type Description
IsSuccess boolean FALSE as an indication of an unsuccessful request
Code integer HTTP response code
Message string Empty if the requested operation was successfully completed. In case of error this field contains the description of error.
ModelState ModelState object During POST or PUT requests, the submitted data is validated for correctness. In case of out-of-range or missing values this field contains the description of errors. In other cases this field is NULL. Refer to Model Validation section.

Errors

Let's look at several most common error scenarios.

Incorrect URL

An incorrect URL was used for contacting Apteriks API

General
Request URL:https://www.apteriks.com/api/incorrect-url
Request Method:GET
Status Code:404 Not Found
Response Body
{
"IsSuccess": false,
"Code": 404,
"Message": "Incorrect Request-URI does not match any resource",
"ModelState": null
}

Missing resource

The request URL is correct but the requested resource is missing.

The following example demonstrates an attempt to retrieve the details of IPv4 network with incorrect ID = 99.

General
Request URL:https://www.apteriks.com/api/v1/ipv4/networks/99
Request Method:GET
Status Code:404 Not Found
Response Body
{
"IsSuccess": false,
"Code": 404,
"Message": "Entity not found",
"ModelState": null
}

Authentication failure

Either a combination of authentication Username/Password is incorrect, or assigned API privileges are not sufficient to perform the requested action.

General
Request URL:https://www.apteriks.com/api/v1/spaces/12
Request Method:GET
Status Code:401 Unauthorized
Response Body
{
"IsSuccess": false,
"Code": 401,
"Message": "Authorization has been denied for this request",
"ModelState": null
}

Model Validation error

With POST or PUT requests, request body must contain the object data in the correct format. When the format of data fails the validation, the response with ModelState object provides the detailed error list for every failed condition.

The following example demonstrates an attempt to create new IP Node by submitting incorrect data:
a) IP Address in incorrect format;
b) Too long Name string.

General
Request URL:https://www.apteriks.com/api/v1/ipv4/nodes
Request Method:POST
Status Code:400 Bad Request
Response Body
{
"IsSuccess": false,
"Code": 400,
"Message": "Model state is invalid",
"ModelState": {
"ModelStates": [
{
"Key": "node.Address",
"Values": [
"Please enter valid IP address",
"The field Address must be a string with a maximum length of 100."
]
},
{
"Key": "node.Name",
"Values": [
"Name cannot exceed 80 characters"
]
}
]
}
}

Subscription quota error

An attempt to store more data than allowed for your subscription plan will result in the following response.

General
Request URL:https://www.apteriks.com/api/v1/ipv4/nodes
Request Method:POST
Status Code:402 Payment Required
Response Body
{
"IsSuccess": false,
"Code": 402,
"Message": "You have reached the quota limit of your subscription. Obtain the Limit object to see your quota. Consider upgrading your subscription if you need more storage.",
"ModelState": null
}

OData support

The Open Data Protocol (OData) is a data access protocol for the web. OData provides a uniform way to query and manipulate data sets through CRUD operations (create, read, update, and delete).

An API GET request that retrieves an array of data can use the OData query to modify the response.

Apteriks API supports some (but not all) OData options. This chapter provides some quick examples on how the the syntax is used.

Filtering

Option Description
$filter Filters the results, based on a Boolean condition

Examples

/api/ipam/v1/ipv4/networks?$filter=SpaceId eq 19 and ParentId eq null Retrieve Root networks (where ParentId is NULL) in IP Address Space with ID=19
/api/ipam/v1/admin-types?$filter=Name eq 'Firewall' Retrieve entries where the "Name" field equals "Firewall"
Other valid operands are "lt" (less than), "le" (less or equal), "gt" (greater than), "ge" (greater or equal)
/api/ipam/v1/admin-types?$filter=Id gt 10 Retrieve entries where the "Id" field is greater than 10
/api/ipam/v1/admin-types?$filter=substringof('virtual', Name) Retrieve entries where the "Name" field contains the substring "virtual"
/api/ipam/v1/admin-types?$filter=substringof('virtual', Name) and Id le 10 Retrieve entries where the "Name" field contains the substring "virtual" and "Id" field is less or equal 10

Sorting

Option Description
$orderby Sorts the result

Examples

/api/ipam/v1/admin-types?$orderby=Name Sort in the ascending order by the field "Name"
/api/ipam/v1/admin-types?$orderby=Name desc Sort in the descending order by the field "Name"
/api/ipam/v1/admin-types?$orderby=Name,Id desc Sort first by the field "Name", than in the descending order by the field "Id"

Selecting

Option Description
$select Select which properties to include in the response

Examples

/api/ipam/v1/admin-types?$select=Name Retrieve only the field "Name"
/api/ipam/v1/admin-types?$select=Name,Id Retrieve only the fields "Name" and "Id"

Paging

Option Description
$skip Skip the first N results
$top Returns only the first N results

Examples

/api/ipam/v1/admin-types?$top=5 Retrieve only the first 5 entries
/api/ipam/v1/admin-types?$top=5&$skip=10 Skip first 10 entries and then retrieve 5 following entries

Server enforced paging

Some GET requests may return a lot of data. In order to prevent the flooding, this data is supplied in pages with maximum size of 500 entries. Also, the X-Total-Count response header provides the total amount of entries, so that the pagination can be used to navigate through them.

Example

The "Get all IPv4 networks in IP Space with ID=19" request (/api/ipam/v1/ipv4/networks?$filter=SpaceId eq 19) returns 500 IP networks and X-Total-Count response header set to 1700. After learning the total amount of networks (1700), use the following queries to retrieve all IPv4 networks :

/api/ipam/v1/ipv4/networks?$filter=SpaceId eq 19 - returns entries from 1 to 500
/api/ipam/v1/ipv4/networks?$filter=SpaceId eq 19&$skip=500- returns entries from 501 to 1000
/api/ipam/v1/ipv4/networks?$filter=SpaceId eq 19&$skip=1000 - returns entries from 1001 to 1500
/api/ipam/v1/ipv4/networks?$filter=SpaceId eq 19&$skip=1500 - returns entries from 1501 to 1700

Quick Start Guide

IP Address Spaces

An IP Address Space is a collection of non-overlapping IP networks and nodes. As an example, a IpamSpace will allow the creation of networks 192.168.0.0/16 and 192.168.1.0/24 as they will be treated as parent (supernet) and child (subnet), but it will not allow the creation of two networks with identical IP addresses and masks.

IPAM Hierarchy tree vs Flex tree

Remember that Apteriks provides you two ways to look at the same IP data.

IP Hierarchy Tree shows you the actual relationship among networks based on their IP addresses and masks. You cannot re-arrange networks here because their position is auto-determined. You cannot create Folders here. IPv4 and IPv6 networks have their own hierarchical trees.

IP Flex Tree allows you to create folders and re-arrange networks in the way you need. You can mix IPv4 and IPv6 networks in a single folder, or re-position them they way you like.

Using IP Hierarchy tree

Let's see how to explore and re-construct the IP Hierarchy tree using API and sample IPAM data.

Step 1. Retrieve the list of IP Address Spaces as they reside at the top of hierarchy.

Request:

GET
/api/ipam/v1/spaces

Response:
List of two Spaces: 1) ID = 19, Name = Corporate; 2) ID = 20, Name = Lab. Let's explore the Corporate one.

Step 2. For a given IP Address Space with ID 19, retrieve the list of top level (Root) networks. Separately for IPv4 and IPv6. Let's explore IPv4 hierarchy.

Request:

GET
/api/ipam/v1/ipv4/spaces/19/ipv4-tree/top
OR
GET
/api/ipam/v1/ipv4/networks?$filter=SpaceId eq 19 and ParentId eq null

Response:
List of two networks: 1) ID = 506, Address = 192.168.0.0/16; 2) ID = 507, Address = 10.5.0.0/16

Step 3, etc

For each network that you received in the previous step, obtain the list of child networks. Continue this process for received child networks, and you will re-construct the IPAM Hierarchy Tree.

Requests:

GET
/api/ipam/v1/ipv4/networks/506/slaves
OR
GET
/api/ipam/v1/ipv4/networks?$filter=ParentId eq 506

and

GET
/api/ipam/v1/ipv4/networks/507/slaves
OR
GET
/api/ipam/v1/ipv4/networks?$filter=ParentId eq 507

IP Address Spaces

An IP Address Space is a collection of non-overlapping IP addresses: networks and nodes. It may represent the whole company, or a particular VPN/VRF.

Methods overview

Create a space
POST
/api/ipam/v1/spaces
Retrieve all spaces
GET
/api/ipam/v1/spaces
Retrieve a space
GET
/api/ipam/v1/spaces/{id}
Update a space
PUT
/api/ipam/v1/spaces/{id}
Delete a space
DELETE
/api/ipam/v1/spaces/{id}

Network Hierarchy

Retrieve top networks
GET
/api/ipam/v1/spaces/{id}/ipv4-tree/top OR /api/ipam/v1/spaces/{id}/ipv6-tree/top

The AddressSpace object

API requests in this section deal with IPAM IP Address Space object that has the following structure.

Field Type Description
Name string (max 40) Name of the object
Description string (max 255) Description of the object
Comment string (max 255) Comment field
Location string (max 255) Location of the object
Contact string (max 255) Contact information
Domain string (max 255) DNS or other domain
Url string (max 255) Resource Location
CreateTime DateTime Timestamp of a creation time, in DateTime format
ModifyTime DateTime Timestamp of a last modification time, in DateTime format
CreatedBy nullable integer ID of a User that has created this entity (can be a person, or Sentinel, or Api account). If the user account has been deleted later, this field is NULL.
ModifiedBy nullable integer ID of a User that did the last modification of this entity (can be a person, or Sentinel, or Api account). If the user account has been deleted later, this field is NULL.

Create an Address Space

Purpose Create a new Address Space object
URL /api/ipam/v1/spaces
Method
POST
URL Params None
Data Params AddressSpace object
Success Response HTTP 201 Created response.
Response header Location field contains the URL to the new resource.
Message body contains the newly created AddressSpace object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/spaces
Request Method:POST
Status Code:201 Created
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
Name:CompanyABC
Description:All company IP's
Url:http://www.company-abc.com
Response Headers
Location: https://www.apteriks.com/api/ipam/v1/spaces/20
Response Body
{
"Id": 20,
"Name": "CompanyABC",
"Description": "All company IP's",
"Comment": "",
"Location": "",
"Contact": "",
"Domain": "",
"Url": "http://www.company-abc.com",
"CreateTime": "2016-09-08T22:28:33.1348817Z",
"ModifyTime": "2016-09-08T22:28:33.1348817Z",
"CreatedBy": null,
"ModifiedBy": null
}

Retrieve all Address Spaces

Purpose Retrieve the list of all Address Spaces
URL /api/ipam/v1/spaces
This method supports OData filtering and queries
Method
GET
URL Params None
Data Params None
Success Response HTTP 200 OK response.
Message body contains an array of AddressSpace objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/spaces
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
[
{
"Id": 1,
"Name": "Testlab",
"Description": "Test IP's",
"Comment": "",
"Location": "",
"Contact": "J. Smith",
"Domain": "",
"Url": "",
"CreateTime": "2016-07-21T05:12:38.214",
"ModifyTime": "2016-09-08T16:28:33.13017",
"CreatedBy": null,
"ModifiedBy": null
},
{
"Id": 20,
"Name": "CompanyABC",
"Description": "All company IP's",
"Comment": "",
"Location": "",
"Contact": "",
"Domain": "",
"Url": "http://www.company-abc.com",
"CreateTime": "2016-09-08T22:28:33.1348817Z",
"ModifyTime": "2016-09-08T22:28:33.1348817Z",
"CreatedBy": null,
"ModifiedBy": null
}
]

Retrieve an Address Space

Purpose Retrieve the details of an existing Address Space
URL /api/ipam/v1/spaces/{id}
Method
GET
URL Params id (integer) - Address Space ID
Data Params None
Success Response HTTP 200 OK response.
Message body contains the AddressSpace object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/spaces/20
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"Id": 20,
"Name": "CompanyABC",
"Description": "All company IP's",
"Comment": "",
"Location": "",
"Contact": "",
"Domain": "",
"Url": "http://www.company-abc.com",
"CreateTime": "2016-09-08T22:28:33.1348817Z",
"ModifyTime": "2016-09-08T22:28:33.1348817Z",
"CreatedBy": null,
"ModifiedBy": null
}

Update an Address Space

Purpose Update an existing Address Space.
URL /api/ipam/v1/spaces/{id}
Method
PUT
URL Params id (integer) - The Address Space ID
Data Params

AddressSpace object.
All data fields of the supplied object overwrite the stored values. If a certain field was not supplied, its value is set to NULL (for strings) or zero (for integers).

 

Note that the following fields will not be overwritten; their values are set by the portal.

Id. The value supplied in the URL is used to find the target object

CreateTime

ModifyTime

CreatedBy

ModifiedBy

Success Response HTTP 200 OK response.
Message body contains the updated AddressSpace object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/spaces/20
Request Method:PUT
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
Name:CompanyX-Internet
Description: Internet VRF
Response Body
{
"Id": 20,
"Name": "CompanyX-Internet",
"Description": "Internet VRF",
"Comment": "",
"Location": "",
"Contact": "",
"Domain": "",
"Url": "",
"CreateTime": "2016-09-08T22:28:33.1348817Z",
"ModifyTime": "2016-09-09T09:30:12.5",
"CreatedBy": null,
"ModifiedBy": null
}

Delete an Address Space

Purpose Deletes an existing Address Space
URL /api/ipam/v1/spaces/{id}
Method
DELETE
URL Params id (integer) - Address Space ID
Data Params None
Success Response HTTP 204 No Content response
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/spaces/20
Request Method:DELETE
Status Code:204 No Content
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
 

Retrieve Network Hierarchy top networks

Purpose Retrieve the list of IPv4/IPv6 networks that reside at the top of the network hierarchy (root networks)
URL /api/ipam/v1/spaces/{id}/ipv4-tree/top - for IPv4 networks
/api/ipam/v1/spaces/{id}/ipv6-tree/top - for IPv6 networks
This method supports OData filtering and queries
This method returns data in pages of 500 entries
Method
GET
URL Params id (integer) - Address Space ID
Data Params None
Success Response HTTP 200 OK response.
Response header X-Total-Count contains the total amount of root networks.
Message body contains an array of Network objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/spaces/19/ipv4-tree/top
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Headers
X-Total-Count: 6
Response Body
[
{
"Id": 1413,
"SpaceId": 19,
"ParentId": null,
"AdminStatusId": 1,
"Address": "10.2.0.0",
"Mask": 16
"Vlan": null,
"Name": "Americas",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-05-21T16:06:02.1",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
},
{
"Id": 1414,
"SpaceId": 19,
"ParentId": null
"AdminStatusId": 1,
"Address": "192.168.0.0",
"Mask": 16
"Vlan": null,
"Name": "APAC",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
}
... more data skipped...
]

Administrative Statuses

An Administrative Status is a property that can be assigned to IPAM Networks and Nodes, reflecting their operational or organizational status. There are a number of pre-defined system-wide statuses, and next to them you can create your own custom statuses.

Methods overview

Create a status
POST
/api/ipam/v1/admin-statuses
Retrieve all statuses
GET
/api/ipam/v1/admin-statuses
Retrieve a status
GET
/api/ipam/v1/admin-statuses/{id}
Update a status
PUT
/api/ipam/v1/admin-statuses/{id}
Delete a status
DELETE
/api/ipam/v1/admin-statuses/{id}

The AdminStatus object

API requests in this section deal with IPAM Administrative Status object that has the following structure.

Field Type Description
Id integer ID of an administrative status
Name string (max 20) Name of an administrative status
IsSystem boolean TRUE if the administrative status is system wide and therefore cannot be modified or deleted. FALSE if the administrative status is private to your account; you can modify or delete it.

Create an Administrative Status

Purpose Create a new Administrative Status object
URL /api/ipam/v1/admin-statuses
Method
POST
URL Params None
Data Params Name (string) - Name of the Administrative Status
Success Response HTTP 201 Created response.
Response header Location field contains the URL to the new resource.
Message body contains the newly created AdminStatus object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-statuses
Request Method:POST
Status Code:201 Created
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
Name:ReservedForProjectABC
Response Headers
Location: https://www.apteriks.com/api/ipam/v1/admin-statuses/23
Response Body
{
"Id": 23,
"Name": "ReservedForProjectABC",
"IsSystem": false
}

Retrieve all Administrative Statuses

Purpose Retrieve the list of all Administrative Statuses
URL /api/ipam/v1/admin-statuses
This method supports OData filtering and queries
Method
GET
URL Params None
Data Params None
Success Response HTTP 200 OK response.
Message body contains an array of AdminStatus objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-statuses
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
[
{
"Id": 1,
"Name": "Allocated",
"IsSystem": true
},
{
"Id": 2,
"Name": "Legacy",
"IsSystem": true
},
{
"Id": 23,
"Name": "ReservedForProjectABC",
"IsSystem": false
}
]

Retrieve an Administrative Status

Purpose Retrieve the details of an existing Administrative Status
URL /api/ipam/v1/admin-statuses/{id}
Method
GET
URL Params id (integer) - AdminStatus ID
Data Params None
Success Response HTTP 200 OK response.
Message body contains the AdminStatus object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-statuses/2
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"Id": 2,
"Name": "Legacy",
"IsSystem": true
}

Update an Administrative Status

Purpose Update an existing Administrative Status. Note that system-wide statuses cannot be updated or deleted.
URL /api/ipam/v1/admin-statuses/{id}
Method
PUT
URL Params id (integer) - The AdminStatus ID
Data Params Name (string) - New name of the Administrative Status
Success Response HTTP 200 OK response.
Message body contains the updated AdminStatus object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-statuses/23
Request Method:PUT
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
Name:PreparedForDecomission
Response Body
{
"Id": 23,
"Name": "PreparedForDecomission",
"IsSystem": false
}

Delete an Administrative Status

Purpose Deletes an existing Administrative Status. Note that system-wide statuses cannot be updated or deleted.
URL /api/ipam/v1/admin-statuses/{id}
Method
DELETE
URL Params id (integer) - AdminStatus ID
Data Params None
Success Response HTTP 204 No Content response
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-statuses/23
Request Method:DELETE
Status Code:204 No Content
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
 

Administrative Types

An Administrative Type is a property that can be assigned to IPAM Networks and Nodes, reflecting their operational or organizational type. There are a number of pre-defined system-wide types, and next to them you can create your own custom types.

Methods overview

Create a type
POST
/api/ipam/v1/admin-types
Retrieve all types
GET
/api/ipam/v1/admin-types
Retrieve a type
GET
/api/ipam/v1/admin-types/{id}
Update a type
PUT
/api/ipam/v1/admin-types/{id}
Delete a type
DELETE
/api/ipam/v1/admin-types/{id}

The AdminType object

API requests in this section deal with IPAM Administrative Type object that has the following structure.

Field Type Description
Id integer ID of an administrative type
Name string (max 20) Name of an administrative type
IsSystem boolean TRUE if the administrative type is system wide and therefore cannot be modified or deleted. FALSE if the administrative type is private to your account.

Create an Administrative Type

Purpose Create a new Administrative Type object
URL /api/ipam/v1/admin-types
Method
POST
URL Params None
Data Params Name (string) - Name of the Administrative Type
Success Response HTTP 201 Created response.
Response header Location field contains the URL to the new resource.
Message body contains the newly created AdminType object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-types
Request Method:POST
Status Code:201 Created
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
Name:Supercomputer
Response Headers
Location: https://www.apteriks.com/api/ipam/v1/admin-types/23
Response Body
{
"Id": 23,
"Name": "Supercomputer",
"IsSystem": false
}

Retrieve all Administrative Types

Purpose Retrieve the list of all Administrative Types
URL /api/ipam/v1/admin-types
This method supports OData filtering and queries
Method
GET
URL Params None
Data Params None
Success Response HTTP 200 OK response.
Message body contains an array of AdminType objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-types
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
[
{
"Id": 1,
"Name": "Database",
"IsSystem": true
},
{
"Id": 2,
"Name": "Firewall",
"IsSystem": true
},
{
"Id": 23,
"Name": "Supercomputer",
"IsSystem": false
}
]

Retrieve an Administrative Type

Purpose Retrieve the details of an existing Administrative Type
URL /api/ipam/v1/admin-types/{id}
Method
GET
URL Params id (integer) - AdminType ID
Data Params None
Success Response HTTP 200 OK response.
Message body contains the AdminType object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-types/2
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"Id": 2,
"Name": "Firewall",
"IsSystem": true
}

Update an Administrative Type

Purpose Update an existing Administrative Type. Note that system-wide types cannot be updated or deleted.
URL /api/ipam/v1/admin-types/{id}
Method
PUT
URL Params id (integer) - The AdminType ID
Data Params Name (string) - New name of the Administrative Type
Success Response HTTP 200 OK response.
Message body contains the updated AdminType object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-types/23
Request Method:PUT
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
Name:DRAC
Response Body
{
"Id": 23,
"Name": "DRAC",
"IsSystem": false
}

Delete an Administrative Type

Purpose Deletes an existing Administrative Type. Note that system-wide types cannot be updated or deleted.
URL /api/ipam/v1/admin-types/{id}
Method
DELETE
URL Params id (integer) - AdminType ID
Data Params None
Success Response HTTP 204 No Content response
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/admin-types/23
Request Method:DELETE
Status Code:204 No Content
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
 

DateTime

Many API objects have timestamps that are supplied in Greenwich Mean Time (GMT) timezone, sometimes also called Coordinated Universal Time (UTC). Note that this timezone never changes for Daylight Saving Time (DST)

All timestamps have the following format.

yyyy-MM-ddTHH:mm:ss.FFF

yyyy The year as a four-digit number
MM The month, from 01 through 12
dd The day of the month, from 01 through 31
T Letter "T" as a separator between the Data and Time fields
HH The hour, using a 24-hour clock from 00 to 23
mm The minute, from 00 through 59
ss The second, from 00 through 59
FFF If non-zero, the milliseconds in a date and time value

Example:

{
"CreateTime": "2016-06-14T07:23:59.98",
"ModifyTime": "2016-06-27T12:13:16.597"
}

Limits

A Limit is an object describing the user quota within Apteriks portal.

Methods overview

Retrieve current limit
GET
/api/ipam/v1/limits/current

The Limit object

API requests in this section deal with Limit object that has the following structure.

Field Type Description
Users integer Maximum amount of user accounts
ClientLogKeepDays integer Amount of days the client log entries are stored
IpamSize integer Maximum amount of IP entries in the IPAM database
IpamSpaces integer Maximum amount of IP Address Spaces in the IPAM database
IpamIpRangesPerNetwork integer Maximum amouont of IP Ranges that can be configured per single network
IpamSmartFilters integer Maximum amount of Smart Filters that can be configured in IPAM
InfraDiscoveryIsAllowedToScanTcpPortsWellKnown boolean TRUE if the client is allowed to scan TCP Well Known ports
InfraDiscoveryIsAllowedToScanTcpPortsRegistered boolean TRUE if the client is allowed to scan TCP Registered ports
InfraDiscoveryIsAllowedToScanTcpPortsCustom boolean TRUE if the client is allowed to scan custom TCP port ranges
InfraDiscoveryMaxNetworkSize integer The shortest mask length of a network that can be scanned using Infrastructure Discovery tools
InfraDiscoveryMaxNetworkCount integer The maximum amount of networks that can be scanned during a single Infrastructure Discovery scan
InfraDiscoveryMaxSnmpCredentialsCount integer The maximum amount of SNMP credentials that can be used during a single Infrastructure Discovery scan
PeriodicDiscoveriesMaxCount integer The maximum amount of Periodic Discoveries that can be scheduled at once
AdminStatusOrTypeMaxCount integer Maximum amount of Administrative Statuses or Types that can be stored

Retrieve current Limit

Purpose Retrieve the current client limit within Apteriks portal
URL /api/ipam/v1/limits/current
Method
GET
URL Params None
Data Params None
Success Response HTTP 200 OK response.
Message body contains a Limit object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/limits/current
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"Users": 10,
"ClientLogKeepDays": 365,
"IpamSize": 8000,
"IpamSpaces": 10,
"IpamIpRangesPerNetwork": 10,
"IpamSmartFilters": 20,
"InfraDiscoveryIsAllowedToScanTcpPortsWellKnown": true,
"InfraDiscoveryIsAllowedToScanTcpPortsRegistered": true,
"InfraDiscoveryIsAllowedToScanTcpPortsCustom": true,
"InfraDiscoveryMaxNetworkSize": 10,
"InfraDiscoveryMaxNetworkCount": 10,
"InfraDiscoveryMaxSnmpCredentialsCount": 5,
"PeriodicDiscoveriesMaxCount": 5,
"AdminStatusOrTypeMaxCount": 10
}

Networks

Methods overview

Create a network
POST
/api/ipam/v1/ipv4/networks OR /api/ipam/v1/ipv6/networks
Retrieve all network
GET
/api/ipam/v1/ipv4/networks OR /api/ipam/v1/ipv6/networks
Retrieve a network
GET
/api/ipam/v1/ipv4/networks/{id} OR /api/ipam/v1/ipv6/networks/{id}
Retrieve a network with details
GET
/api/ipam/v1/ipv4/networks/{id}/details OR /api/ipam/v1/ipv6/networks/{id}/details
Update a network
PUT
/api/ipam/v1/ipv4/networks/{id} OR /api/ipam/v1/ipv6/networks/{id}
Delete a network
DELETE
/api/ipam/v1/ipv4/networks/{id}/{flag} OR /api/ipam/v1/ipv6/networks/{id}/{flag}
Retrieve subnetworks
GET
/api/ipam/v1/ipv4/networks/{id}/slaves OR /api/ipam/v1/ipv6/networks/{id}/slaves

Network object

API requests in this section deal with IPAM Network object that has the following structure.

Field Type Description
Id long integer ID of a network
SpaceId long integer ID of an IP Address Space that contains the network
ParentId nullable long integer ID of a parent Network (supernet) that contains this network on the IP Hierarchy tree. For root networks at the top of hierarchy this field equals NULL
AdminStatusId nullable integer ID of one of Administrative Statuses. If no AdminStatus has been set, this field is NULL
Address string (max 100) IP Address of a network
Mask byte Length of network mask in bits
Vlan nullable integer Vlan number. If no Vlan assignment is present, this field equals NULL
Name string (max 80) Name given to a network
Description string (max 255) Description of a network
Comment string (max 255) Comment field
Location string (max 255) Location of a network
Contact string (max 255) Contact information
CreateTime DateTime Timestamp of a creation time, in DateTime format
ModifyTime DateTime Timestamp of a last modification time, in DateTime format
CreatedBy nullable integer ID of a User that has created this entity (can be a person, or Sentinel, or Api account). If the user account has been deleted later, this field is NULL.
ModifiedBy nullable integer ID of a User that did the last modification of this entity (can be a person, or Sentinel, or Api account). If the user account has been deleted later, this field is NULL.
Nodes Array of Node objects When network with details is requested, this field contains the list of IP nodes associated with given network

Create a Network

Purpose Create a new IP Network object
URL /api/ipam/v1/ipv4/networks - for IPv4 network
/api/ipam/v1/ipv6/networks - for IPv6 network
Method
POST
URL Params None
Data Params

Network object (only fields listed below are taken into account)

 

Mandatory fields:

SpaceId

Address

Mask

 

Optional fields:

Parent ID. If you specify the ID of "expected" parent network, it will be compared to the actual auto-determined parent. If they do not match, the ModelState error will be returned.

AdminStatusId

Vlan

Name

Description

Comment

Location

Contact

 

The network Id and ParentId will be auto-assigned upon the creation and returned as part of the HTTP response. The parent network will be determined based on the IP Address/Mask combination (IP Hierarchy tree).

Success Response HTTP 201 Created response.
Response header Location field contains the URL to the new resource.
Message body contains the newly created Network object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/networks
Request Method:POST
Status Code:201 Created
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
SpaceId: 19
Address: 1.2.3.0
Mask: 24
Name: Server Vlan
AdminStatusId: 1
Response Headers
Location: https://www.apteriks.com/api/ipam/v1/ipv4/networks/567
Response Body
{
"Id": 567,
"SpaceId": 19,
"ParentId": 207 "AdminStatusId": 1,
"Address": "1.2.3.0",
"Mask": 24
"Vlan": null,
"Name": "Server Vlan",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
}

Retrieve all Networks

Purpose Retrieve the list of all networks
URL /api/ipam/v1/ipv4/networks - for IPv4 networks
/api/ipam/v1/ipv6/networks - for IPv6 networks
This method supports OData filtering and queries
This method returns data in pages of 500 entries
Method
GET
URL Params None
Data Params None
Success Response HTTP 200 OK response.
Response header X-Total-Count contains the total amount of networks.
Message body contains an array of Network objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/networks
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Headers
X-Total-Count: 1732
Response Body
[
{
"Id": 207,
"SpaceId": 19,
"ParentId": null,
"AdminStatusId": 1,
"Address": "1.2.0.0",
"Mask": 16
"Vlan": null,
"Name": "Houston DC",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-05-21T16:06:02.1",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
},
{
"Id": 567,
"SpaceId": 19,
"ParentId": 207 "AdminStatusId": 1,
"Address": "1.2.3.0",
"Mask": 24
"Vlan": null,
"Name": "Server Vlan",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
}
... more data skipped...
]

Retrieve a Network

Purpose Retrieve the details of an existing network
URL /api/ipam/v1/ipv4/networks/{id} - for IPv4 network
/api/ipam/v1/ipv6/networks/{id} - for IPv6 network
Method
GET
URL Params id (long integer) - Network ID
Data Params None
Success Response HTTP 200 OK response.
Message body contains the Network object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/networks/567
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"Id": 567,
"SpaceId": 19,
"ParentId": 207 "AdminStatusId": 1,
"Address": "1.2.3.0",
"Mask": 24
"Vlan": null,
"Name": "Server Vlan",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
}

Retrieve a Network with details

Purpose Retrieve the details of an existing network along with child Nodes
URL /api/ipam/v1/ipv4/networks/{id}/details - for IPv4 network
/api/ipam/v1/ipv6/networks/{id}/details - for IPv6 network
Method
GET
URL Params id (long integer) - Network ID
Data Params None
Success Response HTTP 200 OK response.
Message body contains the Network object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/networks/567/details
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"Id": 567,
"SpaceId": 19,
"ParentId": 207 "AdminStatusId": 1,
"Address": "1.2.3.0",
"Mask": 24
"Vlan": null,
"Name": "Server Vlan",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes":
[
{
"Id": 720,
"SpaceId": 19,
"NetworkId": 567,
"AdminStatusId": 3,
"AdminTypeId": 2,
"Address": "1.2.3.15",
"Name": "GBLONR15",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-22T08:15:46.23",
"ModifyTime": "2016-09-22T08:15:54.487",
"CreatedBy": 1,
"ModifiedBy": 1
},
{
"Id": 721,
"SpaceId": 19,
"NetworkId": 567,
"AdminStatusId": 1,
"AdminTypeId": 5,
"Address": "1.2.3.20",
"Name": "GBLONS06",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-22T08:15:46.25",
"ModifyTime": "2016-09-22T08:09:02.66",
"CreatedBy": 1,
"ModifiedBy": 23
}
... more data skipped...
]
}

Update a Network

Purpose Update an existing Network.
URL /api/ipam/v1/ipv4/networks/{id} - for IPv4 network
/api/ipam/v1/ipv6/networks/{id} - for IPv6 network
Method
PUT
URL Params id (long int) - The Network ID
Data Params

Network object.
All data fields of the supplied object overwrite the stored values. If a certain field was not supplied, its value is set to NULL (for strings) or zero (for integers).

 

Note that only the following fields can be modified; others are auto-assigned by the system or cannot change during the lifetime of a network (such as IP address or Mask)

AdminStatusId

Vlan

Name

Description

Comment

Location

Contact

Success Response HTTP 200 OK response.
Message body contains the updated Network object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/networks/567
Request Method:PUT
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
AdminStatusId: 3,
Name: Zion servers
Response Body
{
"Id": 567,
"SpaceId": 19,
"ParentId": 207 "AdminStatusId": 3,
"Address": "1.2.3.0",
"Mask": 24
"Vlan": null,
"Name": "Zion servers",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-17T09:43:14.1",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
}

Delete a Network

Purpose Deletes an existing Network
URL /api/ipam/v1/ipv4/networks/{id}/{flag} - for IPv4 networks
/api/ipam/v1/ipv6/networks/{id}/{flag} - for IPv6 networks
Method
DELETE
URL Params id (long int) - Network ID
flag (string) - optional parameter explaining how to treat the child objects.

The "flag" parameter is case-insensitive and may be one of the following:
- deleteNodes: delete IP nodes associated with this network. If no flag specified, nodes are kept and re-associated with the new upstream parent network. If no upstream network exists, nodes are deleted.
- deleteHierarchy: delete child networks on the IP Hierarchy tree, if any, along with all their child objects. If no flag specified, child networks are kept and re-associated with the new upstream parent network.
- deleteAll: delete both child nodes and networks
Data Params None
Success Response HTTP 204 No Content response
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/networks/567
Request Method:DELETE
Status Code:204 No Content
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
 

Retrieve subnetworks

Purpose Retrieve the list of all subnetworks of a given network
URL /api/ipam/v1/ipv4/networks/{id}/slaves - for IPv4 networks
/api/ipam/v1/ipv6/networks/{id}/slaves - for IPv6 networks
This method supports OData filtering and queries
This method returns data in pages of 500 entries
Method
GET
URL Params id (long integer) - Network ID
Data Params None
Success Response HTTP 200 OK response.
Response header X-Total-Count contains the total amount of subnetworks.
Message body contains an array of Network objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/networks/225/slaves
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Headers
X-Total-Count: 4
Response Body
[
{
"Id": 1234,
"SpaceId": 19,
"ParentId": 225,
"AdminStatusId": 1,
"Address": "192.168.14.0",
"Mask": 24
"Vlan": null,
"Name": "Houston DC",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-05-21T16:06:02.1",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
},
{
"Id": 1235,
"SpaceId": 19,
"ParentId": 225,
"AdminStatusId": 1,
"Address": "192.168.15.0",
"Mask": 24
"Vlan": null,
"Name": "Server Vlan",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
"Nodes": null
}
... more data skipped...
]

Nodes

An IP host, also referred to as Node, is an IP address that is active on a network.

Methods overview

Create a node
POST
/api/ipam/v1/ipv4/nodes OR /api/ipam/v1/ipv6/nodes
Retrieve all nodes
GET
/api/ipam/v1/ipv4/nodes OR /api/ipam/v1/ipv6/nodes
Retrieve a node
GET
/api/ipam/v1/ipv4/nodes/{id} OR /api/ipam/v1/ipv6/nodes/{id}
Update a node
PUT
/api/ipam/v1/ipv4/nodes/{id} OR /api/ipam/v1/ipv6/nodes/{id}
Delete a node
DELETE
/api/ipam/v1/ipv4/nodes/{id} OR /api/ipam/v1/ipv6/nodes/{id}

Node object

API requests in this section deal with IPAM Node (host) object that has the following structure.

Field Type Description
Id long integer ID of a node
SpaceId long integer ID of an IP Address Space that contains the node
NetworkId long integer ID of a parent Network that contains the node
AdminStatusId nullable integer ID of one of Administrative Statuses. If no AdminStatus has been set for a node, this field is NULL
AdminTypeId nullable integer ID of one of Administrative Types. If no AdminType has been set for a node, this field is NULL
Address string (max 100) IP Address of a node
Name string (max 80) Name given to a node
Description string (max 255) Description of a node
Comment string (max 255) Comment field
Location string (max 255) Location of a node
Contact string (max 255) Contact information
CreateTime DateTime Timestamp of a creation time, in DateTime format
ModifyTime DateTime Timestamp of a last modification time, in DateTime format
CreatedBy nullable integer ID of a User that has created this entity (can be a person, or Sentinel, or Api account). If the user account has been deleted later, this field is NULL.
ModifiedBy nullable integer ID of a User that did the last modification of this entity (can be a person, or Sentinel, or Api account). If the user account has been deleted later, this field is NULL.

Create a Node

Purpose Create a new IP Node object
URL /api/ipam/v1/ipv4/nodes - for IPv4 node
/api/ipam/v1/ipv6/nodes - for IPv6 node
Method
POST
URL Params None
Data Params

Node object (only fields listed below are taken into account)

 

Mandatory fields:

SpaceId

Address

 

Optional fields:

AdminStatusId

AdminTypeId

Name

Description

Comment

Location

Contact

 

The NodeId and NetworkId will be auto-assigned upon the creation and returned as part of the HTTP response. The parent network will be determined based on the IP Address/Mask combination.
Note that every IP Node needs a parent network to exist.

Success Response HTTP 201 Created response.
Response header Location field contains the URL to the new resource.
Message body contains the newly created Node object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/nodes
Request Method:POST
Status Code:201 Created
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
SpaceId: 19
Address: 1.2.3.99
Name: ZionServer
AdminStatusId: 4
Response Headers
Location: https://www.apteriks.com/api/ipam/v1/ipv4/nodes/2527
Response Body
{
"Id": 2527,
"SpaceId": 19,
"NetworkId": 21,
"AdminStatusId": 4,
"AdminTypeId": null,
"Address": "1.2.3.99",
"Name": "ZionServer",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-15T16:12:02.8487441Z",
"ModifyTime": "2016-09-15T16:12:02.8487441Z",
"CreatedBy": 9,
"ModifiedBy": 9
}

Retrieve all Nodes

Purpose Retrieve the list of all nodes
URL /api/ipam/v1/ipv4/nodes - for IPv4 nodes
/api/ipam/v1/ipv6/nodes - for IPv6 nodes
This method supports OData filtering and queries
This method returns data in pages of 500 entries
Method
GET
URL Params None
Data Params None
Success Response HTTP 200 OK response.
Response header X-Total-Count contains the total amount of nodes.
Message body contains an array of Node objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/nodes
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Headers
X-Total-Count: 3612
Response Body
[
{
"Id": 720,
"SpaceId": 19,
"NetworkId": 21,
"AdminStatusId": 3,
"AdminTypeId": 2,
"Address": "192.168.15.10",
"Name": "GBLONR15",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-09T08:15:46.23",
"ModifyTime": "2016-09-09T08:15:54.487",
"CreatedBy": 1,
"ModifiedBy": 1
},
{
"Id": 721,
"SpaceId": 19,
"NetworkId": 21,
"AdminStatusId": 1,
"AdminTypeId": 5,
"Address": "192.168.15.32",
"Name": "GBLONS06",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-09T08:15:46.25",
"ModifyTime": "2016-09-14T08:09:02.66",
"CreatedBy": 1,
"ModifiedBy": 23
}
... more data skipped...
]

Retrieve a Node

Purpose Retrieve the details of an existing node
URL /api/ipam/v1/ipv4/nodes/{id} - for IPv4 node
/api/ipam/v1/ipv6/nodes/{id} - for IPv6 node
Method
GET
URL Params id (long integer) - Node ID
Data Params None
Success Response HTTP 200 OK response.
Message body contains the Node object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/nodes/721
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"Id": 721,
"SpaceId": 19,
"NetworkId": 21,
"AdminStatusId": 1,
"AdminTypeId": 5,
"Address": "192.168.15.32",
"Name": "GBLONS06",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-09T08:15:46.25",
"ModifyTime": "2016-09-14T08:09:02.66",
"CreatedBy": 1,
"ModifiedBy": 23
}

Update a Node

Purpose Update an existing Node.
URL /api/ipam/v1/ipv4/nodes/{id} - for IPv4 node
/api/ipam/v1/ipv6/nodes/{id} - for IPv6 node
Method
PUT
URL Params id (long int) - The Node ID
Data Params

Node object.
All data fields of the supplied object overwrite the stored values. If a certain field was not supplied, its value is set to NULL (for strings) or zero (for integers).

 

Note that only the following fields can be modified; others are auto-assigned by the system or cannot change during the lifetime of a node (such as IP address)

AdminStatusId

AdminTypeId

Name

Description

Comment

Location

Contact

Success Response HTTP 200 OK response.
Message body contains the updated Node object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/nodes/721
Request Method:PUT
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/x-www-form-urlencoded
Request Form Data
AdminStatusId: 3, Name: Spare NAS
Response Body
{
"Id": 721,
"SpaceId": 19,
"NetworkId": 21,
"AdminStatusId": 3,
"AdminTypeId": null,
"Address": "192.168.15.32",
"Name": "Spare NAS",
"Description": "",
"Comment": "",
"Location": "",
"Contact": "",
"CreateTime": "2016-09-09T08:15:46.25",
"ModifyTime": "2016-09-16T14:29:02.66",
"CreatedBy": 1,
"ModifiedBy": 23
}

Delete a Node

Purpose Deletes an existing Node
URL /api/ipam/v1/ipv4/nodes/{id} - for IPv4 nodes
/api/ipam/v1/ipv6/nodes/{id} - for IPv6 nodes
Method
DELETE
URL Params id (long int) - Node ID
Data Params None
Success Response HTTP 204 No Content response
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/ipv4/nodes/721
Request Method:DELETE
Status Code:204 No Content
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
 

Users

User Profiles are created for every user registered on Apteriks portal. Majority of IPAM objects, such as networks or nodes, capture the User ID's of those who created and modified them.

Methods overview

Retrieve all users
GET
/api/ipam/v1/users
Retrieve a user
GET
/api/ipam/v1/users/{id}

The UserProfile object

API requests in this section deal with User Profile object that has the following structure.

Field Type Description
Id integer User ID
Email string User email
Firstname string User first name
Surname string User surname
Timezone string User timezone

Retrieve all Users

Purpose Retrieve the list of all User Profiles
URL /api/ipam/v1/users
This method supports OData filtering and queries
Method
GET
URL Params None
Data Params None
Success Response HTTP 200 OK response.
Message body contains an array of UserProfile objects
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/users
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
[
{
"UserId": 31,
"Email": "j.smith@company.com",
"Firstname": "John",
"Surname": "Smith",
"TimeZone": "W. Europe Standard Time"
},
{
"UserId": 35,
"Email": "n.kumara@company.com",
"Firstname": "Nalaka",
"Surname": "Kumara",
"TimeZone": "W. Europe Standard Time"
}
]

Retrieve a User

Purpose Retrieve the details of an existing User Profile
URL /api/ipam/v1/users/{id}
Method
GET
URL Params id (integer) - User ID
Data Params None
Success Response HTTP 200 OK response.
Message body contains the UserProfile object
Sample call
General
Request URL:https://www.apteriks.com/api/ipam/v1/users/31
Request Method:GET
Status Code:200 OK
Request Headers
Accept:application/json
Authorization:Basic QXBpLTc2YmRkYWVhLWIyZxMmZlNmY=
Content-Type:application/json, application/x-www-form-urlencoded
Response Body
{
"UserId": 31,
"Email": "j.smith@company.com",
"Firstname": "John",
"Surname": "Smith",
"TimeZone": "W. Europe Standard Time"
}