API

delegate_zones

struct delegate_zones(struct data);

This function will delegate a list of zones into a specific group.

data.

zone_list

array. This string is a list of zone ID's. Each zone in the list will be delegated to the specified group. REQUIRED.

nt_group_id

string. The group to which the zones should be delegated. REQUIRED.

perm_write

flag. The delegate is allowed to modify this object.

perm_delete

flag. The delegate is allowed to remove the delegation of this object.

perm_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.

zone_perm_add_records

flag. The delegate is allowed to add records to this zone.

zone_perm_delete_records

flag. The delegate is allowed to delete records in this zone.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delegate_zone_records

struct delegate_zone_records(struct data);

This function will delegate a list of Zone Records into a specific Group.

data.

zonerecord_list

array. This is a list of Zone Record IDs. Each Zone in the list will be delegated to the specified Group with the supplied permissions. REQUIRED.

nt_group_id

string. The Group to which the Zones should be delegated. REQUIRED.

perm_write

flag. The delegate is allowed to modify this object.

perm_delete

flag. The delegate is allowed to remove the delegation of this object.

perm_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delete_group

struct delete_group(struct data);

This function will delete a group.

data.

nt_group_id

string. The ID of the group to delete.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delete_nameserver

struct delete_nameserver(struct data);

This function will delete a nameserver.

data.

nt_nameserver_id

string. This is the ID number of the nameserver to be deleted.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delete_users

struct delete_users(struct data);

This function will delete a list of users.

data.

user_list

string. This string is a list of user id's separated by commas. Each user in the list will be deleted.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delete_zone_record

struct delete_zone_record(struct data);

This function will delete a zone record.

data.

nt_zone_record_id

string. The record ID of the zone record to delete.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delete_zone_record_delegation

struct delete_zone_record_delegation(struct data);

This function will remove the delegation of a Zone Record to a Group.

data.

nt_zone_record_id

string. The ID of the Zone Record. REQUIRED

nt_group_id

string. The ID of the Group. REQUIRED



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delete_zone_delegation

struct delete_zone_delegation(struct data);

This function will remove the delegation of a Zone to a Group.

data.

nt_zone_id

string. The ID of the Zone. REQUIRED

nt_group_id

string. The ID of the Group. REQUIRED



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

delete_zones

struct delete_zones(struct data);

This function will delete a list of zones.

data.

zone_list

string. This string is a list of zone id's separated by commas. Each zone in the list will be deleted.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

edit_group

struct edit_group(struct data);

This function allows you modify a Group.

The permissions settings for the group may be specified explicitly using the group_..., user_..., zone_..., zonerecord_..., nameserver_..., and self_... parameters.

Note: No specific permission setting can be granted to or removed from a Group unless the currently logged-in User has that specific permission.



The usable_nameservers parameter allows you to specify a list of Nameservers which Users in the new Group will be allowed to publish zones to. The list of usable Nameservers cannot be overridden on a user to user basis.

data.

nt_group_id

string. ID number of the Group. REQUIRED.

name

string. New name of the group.

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

usable_nameservers

array. A list of up to 10 IDs of Nameserver objects. Users may publish zones to any of these Nameservers.



return. If successful, the result struct will contain an error_code value of '200'.

nt_group_id

string. The ID of the new or updated group.



edit_nameserver

struct edit_nameserver(struct data);

This function allows you to create or update a nameserver for a specific group.

data.

nt_nameserver_id

string. ID number of the nameserver to update. If you are creating a new nameserver, this element should be absent or undefined.

nt_group_id

string. ID number of the group the nameserver belongs to. REQUIRED.

datadir

string.The path to the data directory on the nameserver.

description

string.The description of the nameserver.

output_format

string.The output format for the data. Either 'djb' or 'bind'.

service_type

string.The type of the name server. Either 'hosted' or 'data-only'.

logdir

string.The path to the log directory on the nameserver.

name

string.The hostname of the nameserver.

address

string.The dotted-decimal IP address of the nameserver.

ttl

string.The TTL value for this nameserver.



return. If successful, the returned struct will contain only one element:

nt_nameserver_id

string. The nameserver's ID number.



edit_user

struct edit_user(struct data);

This function allows you to modify the settings for a User object.

The permissions settings may be specified explicitly using the group_..., user_..., zone_..., zonerecord_..., nameserver_..., and self_... parameters, or the User can inherit the permissions settings for the parent Group if none of those parameters are included. You can explicitly cause the permissions to be inherited (or not) by including the parameter inherit_group_permissions.

Note: No specific permission setting can be granted or removed from a User unless the currently logged-in User has that specific permission.



data.

nt_user_id

string. ID number of the user to update.

first_name

string. The user's first name.

email

string. The user's email address.

last_name

string. The user's last name.

username

string. The user's login name.

password

string. The user's new password.

password2

string. The user's new password again. Must match password.

old_password

string. The user's previous password. (REQUIRED if password is being changed.)

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

inherit_group_permissions

flag. If TRUE, the User object will inherit the permissions for the group it belongs to.



return. If successful, the returned struct will contain only one element:

nt_user_id

string. The user's id number.



edit_zone

struct edit_zone(struct data);

This function allows you to create or update a zone within a specific group.

data.

nt_zone_id

string. ID number of the zone to update. If you are creating a new zone, this element should be included but be undefined or the empty string.

nt_group_id

string. ID number of the group the user belongs to. REQUIRED.

zone

string. The name of the zone. This parameter is REQUIRED only if you are creating a new zone.

ttl

string. An integer string for the TTL value of the zone record.

serial

string. The serial value for BIND name servers.

nameservers

string. A comma separated list of nameserver IDs. These IDs will be the nameservers this zone is replicated to. REQUIRED if a new zone is being created.

mailaddr

string. The email address for the hostmaster of the zone. This email address should not contain an '@' character. Instead use '.'.

description

string. A description of the zone.

refresh

int. The value for the REFRESH setting in seconds.

retry

int. The value for the RETRY setting in seconds.

expire

int. The value for the EXPIRE setting in seconds.

minimum

int. The value for the MINIMUM setting in seconds.



return. If successful, the returned struct will contain only one element:

nt_zone_id

string. The new zone's id number.



edit_zone_delegation

struct edit_zone_delegation(struct data);

This function will modify the permissions for a delegation of a zone to a specific group.

data.

nt_zone_id

array. The Zone that is delegated. REQUIRED.

nt_group_id

string. The delegate of the Zone. REQUIRED.

perm_write

flag. The delegate is allowed to modify this object.

perm_delete

flag. The delegate is allowed to remove the delegation of this object.

perm_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.

zone_perm_add_records

flag. The delegate is allowed to add records to this zone.

zone_perm_delete_records

flag. The delegate is allowed to delete records in this zone.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

edit_zone_record

struct edit_zone_record(struct data);

This function allows you to create or update a zone record within a specific zone.

data.

nt_zone_record_id

string.The Zone record ID number of the zone record being updated. If you are creating a new zone record, this entry is to be left blank. REQUIRED.

nt_zone_id

string.ID of the zone which the record belongs to. REQUIRED.

name

string.The name value of the zone record.

ttl

string.The TTL value of the zone record.

description

string.The description of the zone record.

type

string.The type of the zone record. One of 'A', 'CNAME', 'NS', 'MX', and 'PTR'.

address

string.The dotted-decimal IP address or domain name of the record.

weight

string.The weight of the record (type 'MX' records only).



return. If successful, the returned struct will contain only one element:

nt_zone_record_id

string. The new zone record's id number.



edit_zone_record_delegation

struct edit_zone_record_delegation(struct data);

This function will modify the permissions for a delegation of a Zone Record to a specific Group.

data.

nt_zone_record_id

array. The Zone Record that is delegated. REQUIRED

nt_group_id

string. The delegate of the Zone Record. REQUIRED

perm_write

flag. The delegate is allowed to modify this object.

perm_delete

flag. The delegate is allowed to remove the delegation of this object.

perm_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

get_delegated_zone_records

struct get_delegated_zone_records(struct data);

Gets the list of Zone Records that have been delegated to the specified Group.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the group. REQUIRED.



return.

ZONERECORD

array. A list of structs representing the delegated Zone Records. (see get_zone_record for information about the fields inside a Zone object). In addition, the following fields representing the delegate Group's permissions for acting on the object:

delegate_write

flag. The delegate is allowed to modify this object.

delegate_delete

flag. The delegate is allowed to remove the delegation of this object.

delegate_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.





get_delegated_zones

struct get_delegated_zones(struct data);

Gets the list of Zones that have been delegated to the specified Group.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the group. REQUIRED.



return.

ZONE

array. A list of structs representing the delegated zones. (see get_zone for information about the fields inside a Zone object). In addition, the following fields representing the delegate Group's permissions for acting on the object:

delegate_write

flag. The delegate is allowed to modify this object.

delegate_delete

flag. The delegate is allowed to remove the delegation of this object.

delegate_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.

delegate_add_records

flag. The delegate is allowed to add records to this zone.

delegate_delete_records

flag. The delegate is allowed to delete records in this zone.





get_global_application_log

struct get_global_application_log(struct data);

This function returns a list of log entries for actions performed in a specific group. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'timestamp','group_name','user','action', 'object', 'title', or 'description'. The quick search fields are 'user', 'action', 'object', 'title', and 'description'.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the user's group. REQUIRED.

include_subgroups

int. 0 means false. Include results from all subgroups as well.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

log

array. An array of struct elements, each one containing information about a specific log entry. The elements of each struct are as follows:

  • description. string. Textual description of the event.

  • title. string. The name of the object that was affected.

  • nt_user_id. string. The ID of the user who invoked the action.

  • object. string. The type name of the object that was affected.

  • object_id. string. The ID of the object that was affected.

  • nt_user_global_log_id. string. The ID of the global log entry.

  • log_entry_id. string. The ID of the log entry.

  • action. string. The type of the action.

  • timestamp. string. The date and time that the event occurred in seconds since the Epoch (00:00:00 UTC, January 1, 1970) in seconds. (see the unix function time(), or the perl function localtime).



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_group

struct get_group(struct data);

This function returns information for a specific group.

data.

nt_group_id

string. REQUIRED. The group ID.

summary_data

int. Is summary data requested? 0 means false



return.

nt_group_id

string. The requested group's id.

deleted

string. Has the group been deleted? '0' means false.

parent_group_id

string. The requested group's parent's id.

name

string. The requested group's name.

has_children

string. The number of children of the requested group. (Only present if 'summary_data' is not 0.)

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

usable_ns0

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns1

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns2

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns3

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns4

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns5

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns6

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns7

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns8

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns9

string. ID of a Nameserver Users may publish zones to. (May be NULL)



get_group_branch

struct get_group_branch(struct data);

This function returns a list of all parent groups of a given group. I.E. the list of groups travelling from a subgroup up the tree to the user's group..

data.

nt_group_id

string. REQUIRED. The ID of the subgroup to return branch information about.



return.

groups

array. This is a list of struct elements, each containing information about a subgroup. The struct has the following fields:

  • nt_group_id. string. The ID of the subgroup.

  • parent_group_id. string. The ID of this subgroup's parent.

  • name. string. The name of the subgroup.

  • deleted. string. Has the subgroup been deleted? 0 means no.





get_group_groups

struct get_group_groups(struct data);

This function returns a list of all immediate subgroups of a specific group.

data.

nt_group_id

string. REQUIRED. The ID of the group to return information about.



return.

groups

array. This is a list of struct elements, each containing information about a subgroup. The struct has the following fields:

  • nt_group_id. string. The ID of the subgroup.

  • parent_group_id. string. The ID of the subgroup's parent (the same as the nt_group_id parameter in the data struct.

  • name. string. The name of the subgroup.

  • deleted. string. Has the subgroup been deleted? 0 means no.





get_group_subgroups

struct get_group_subgroups(struct data);

This function returns information about the subgroups of a particular group. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'group'. The quick-search field is 'group'.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the requested group. REQUIRED.

include_subgroups

int. 0 means false. Include results from all subgroups as well.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

groups

array. An array of struct elements, each one containing information about a specfic subgroup. The elements of each struct are as follows:

  • name. string. The name of the subgroup.

  • nt_group_id. string. The id of the subgroup.

  • deleted. string. Has this subgroup been deleted? 1 means yes.

  • parent_group_id. string. The ID of this subgroup's parent.

  • sub_groups. string. Number of subgroups within this subgroup. Undefined means 0.



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_group_users

struct get_group_users(struct data);

This function returns information about the users in a particular group. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'group_name','username','first_name','last_name',or 'email'. The quick-search field is 'username'.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the requested group. REQUIRED.

include_subgroups

int. 0 means false. Include results from all subgroups as well.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

list

array. An array of struct elements, each one containing information about a specfic user. The elements of each struct are as follows:

  • first_name. string. The user's first name.

  • group_name. string. The name of the group the user belongs to.

  • nt_group_id. string. The id of the user's group.

  • username. string. The user's login name.

  • nt_user_id. string. The user's id number.

  • last_name. string. The user's last name.

  • email. string. The user's email address.



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_group_nameservers

struct get_group_nameservers(struct data);

This function returns information about the namservers in a particular group. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'name','description','address','service_type', or 'output_format'. The quick search fields are 'name'.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the group. REQUIRED.

include_subgroups

int. 0 means false. Include results from all subgroups as well.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

list

array. An array of struct elements, each one containing information about a specfic user. The elements of each struct are as follows:

  • datadir. string.The path to the data directory on the nameserver.

  • description. string.The description of the nameserver.

  • output_format. string.The output format for the data. Either 'djb' or 'bind'.

  • service_type. string.The type of the name server. Either 'hosted' or 'data-only'.

  • logdir. string.The path to the log directory on the nameserver.

  • name. string.The hostname of the nameserver.

  • nt_group_id. string.The ID of the group of this nameserver.

  • deleted. string.Has this nameserver been deleted? '0' means false.

  • address. string.The dotted-decimal IP address of the nameserver.

  • ttl. string.The TTL value for this nameserver.

  • nt_nameserver_id. string.The ID of this nameserver.



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_group_permissions

struct get_group_permissions(struct data);

Gets the permissions settings for the specified Group.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the group. REQUIRED.



return.

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

usable_ns0

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns1

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns2

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns3

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns4

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns5

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns6

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns7

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns8

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns9

string. ID of a Nameserver Users may publish zones to. (May be NULL)



get_group_zones

struct get_group_zones(struct data);

This function returns information about the zones in a particular group. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'zone', 'group_name', or 'description'. The quick-search field is 'zone'.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the requested group. REQUIRED.

include_subgroups

int. 0 means false. Include results from all subgroups as well.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

zones

array. An array of struct elements, each one containing information about a specfic zone. The elements of each struct are as follows:

  • nt_group_id. string. The id of the zone's group.

  • group_name. string. The name of the group.

  • nt_zone_id. string. The zone's id number.

  • description. string. Textual description of the zone.

  • zone. string. The zone name.

  • queries_successful. string. The number of successful queries.

  • records. string. The number of records in this zone.

  • queries_norecord. string. The number of queries which resulted in no records, or undefined.



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_group_zones_log

struct get_group_zones_log(struct data);

This function returns a list of log entries for actions performed by on zones in a specified group. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'timestamp','group_name','user','action', 'zone', 'ttl', or 'description'. The quick-search field is 'zone'.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the group. REQUIRED.

include_subgroups

int. 0 means false. Include results from all subgroups as well.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

log

array. An array of struct elements, each one containing information about a specific log entry. The elements of each struct are as follows:

  • description. string. Textual description of the event.

  • zone. string. The name of the zone that was affected.

  • nt_user_id. string. The ID of the user who invoked the action.

  • mailaddr. string. The value of the zone's MX entry.

  • refresh. string. The value of the zone's "refresh" entry.

  • user. string. Name of the user who invoked the action. Formatted as "firstname lastname (username)".

  • retry. string. The value of the zone's "retry" entry.

  • group_name. string. The name of the zone's group.

  • ttl. string. The value of the zone's "ttl" entry.

  • expire. string. The value of the zone's "expire" entry.

  • nt_zone_id. string. The ID of the zone that was affected.

  • nt_zone_log_id. string. The ID of the zone log entry.

  • log_entry_id. string. The ID of the log entry.

  • action. string. The type of the action.

  • timestamp. string. The date and time that the event occurred in seconds since the Epoch (00:00:00 UTC, January 1, 1970) in seconds. (see the unix function time(), or the perl function localtime).



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_group_zone_query_log

struct get_group_zone_query_log(struct data);

This function returns a list of log entries for queries made to all zones in a specific group. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'timestamp','zone','query','qtype', 'flag', 'ip', or 'port'. The quick-search field is 'query'.

data. Named hash elements in the data hash:

nt_group_id

string. ID number of the group. REQUIRED.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

search_result

array. An array of struct elements, each one containing information about a specific log entry. The elements of each struct are as follows:

  • nt_nameserver_qlog_id. string. ID of the nameserver query log entry.

  • nt_nameserver_id. string. ID of the nameserver queried.

  • nt_zone_id. string. The ID of the zone queried.

  • nt_zone_record_id. string. The ID of the zone record that was returned as the result of the query.

  • object_id. string. The ID of the object that was affected.

  • nt_user_global_log_id. string. The ID of the global log entry.

  • port. string. The TCP port the query originated from on the client host.

  • ip. string. The dotted decimal IP address of the source of the query.

  • qid. string. The ID of the query.

  • flag. string. The query flag. '-' means no response was returned, '+' means the response was returned.

  • query. string. The name queried.

  • qtype. string. The type of the query. One of 'a','ns','cname','soa','ptr','hinfo','mx','txt','rp','sig','key','aaaa','axfr','any','unknown'.

  • timestamp. string. The date and time that the event occurred in seconds since the Epoch (00:00:00 UTC, January 1, 1970) in seconds. (see the unix function time(), or the perl function localtime).



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_nameserver

struct get_nameserver(struct data);

This function returns information for a specific nameserver.

data.

nt_nameserver_id

string. ID number of the nameserver. REQUIRED.



return. The data struct returned contains the contents of the database entry for the username supplied:

datadir

string.The path to the data directory on the nameserver.

description

string.The description of the nameserver.

output_format

string.The output format for the data. Either 'djb' or 'bind'.

service_type

string.The type of the name server. Either 'hosted' or 'data-only'.

logdir

string.The path to the log directory on the nameserver.

name

string.The hostname of the nameserver.

nt_group_id

string.The ID of the group of this nameserver.

deleted

string.Has this nameserver been deleted? '0' means false.

address

string.The dotted-decimal IP address of the nameserver.

ttl

string.The TTL value for this nameserver.

nt_nameserver_id

string.The ID of this nameserver.



get_nameserver_list

struct get_nameserver_list(struct data);

This function will return a list of nameserver data given a list of nameserver IDs.

data.

nameserver_list

string. This string is a list of nameserver ID's separated by commas.



return. The return data struct has a single element.

list

array. An array of struct elements, each one containing information about a specfic user. The elements of each struct are as follows:

  • datadir. string.The path to the data directory on the nameserver.

  • description. string.The description of the nameserver.

  • output_format. string.The output format for the data. Either 'djb' or 'bind'.

  • service_type. string.The type of the name server. Either 'hosted' or 'data-only'.

  • logdir. string.The path to the log directory on the nameserver.

  • name. string.The hostname of the nameserver.

  • nt_group_id. string.The ID of the group of this nameserver.

  • deleted. string.Has this nameserver been deleted? '0' means false.

  • address. string.The dotted-decimal IP address of the nameserver.

  • ttl. string.The TTL value for this nameserver.

  • nt_nameserver_id. string.The ID of this nameserver.





get_nameserver_tree

struct get_nameserver_tree(struct data);

This function returns the list of nameservers available from all groups along the path from the root to the specified group.

data.

nt_group_id

string. ID number of the group. REQUIRED.



return. The data struct returned contains the contents of the database entry for the username supplied:

nameservers

array. The list of nameservers. Each element of the array is a hash containing the following named entries:

  • datadir. string.The path to the data directory on the nameserver.

  • description. string.The description of the nameserver.

  • output_format. string.The output format for the data. Either 'djb' or 'bind'.

  • service_type. string.The type of the name server. Either 'hosted' or 'data-only'.

  • logdir. string.The path to the log directory on the nameserver.

  • name. string.The hostname of the nameserver.

  • nt_group_id. string.The ID of the group of this nameserver.

  • deleted. string.Has this nameserver been deleted? '0' means false.

  • address. string.The dotted-decimal IP address of the nameserver.

  • ttl. string.The TTL value for this nameserver.

  • nt_nameserver_id. string.The ID of this nameserver.





get_user

struct get_user(struct data);

This function returns information for a specific user.

data.

nt_user_id

string. ID number of the user (see the get_group_users function.) REQUIRED.



return. The data struct returned contains the contents of the database entry for the username supplied:

nt_user_id

string. user id

nt_group_id

string. group id

first_name

string. user's first name

last_name

string. user's last name

username

string. username

password

string. password

email

string. the user's email address

is_admin

string. 1 means true. is the user an admin?

deleted

string. 0 means false. Is the user deleted?

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

usable_ns0

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns1

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns2

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns3

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns4

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns5

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns6

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns7

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns8

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns9

string. ID of a Nameserver Users may publish zones to. (May be NULL)



get_user_global_log

struct get_user_global_log(struct data);

This function returns a list of log entries for actions performed by a specified user. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'timestamp','group_name','user','action', 'object', 'title', or 'description'. The quick-search fields are 'title', 'action', 'object', and 'description'.

data. Named hash elements in the data hash:

nt_user_id

string. ID of the user.

nt_group_id

string. ID number of the user's group. REQUIRED.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

list

array. An array of struct elements, each one containing information about a specific log entry. The elements of each struct are as follows:

  • description. string. Textual description of the event.

  • title. string. The name of the object that was affected.

  • nt_user_id. string. The ID of the user who invoked the action.

  • object. string. The type name of the object that was affected.

  • object_id. string. The ID of the object that was affected.

  • nt_user_global_log_id. string. The ID of the global log entry.

  • log_entry_id. string. The ID of the log entry.

  • action. string. The type of the action.

  • timestamp. string. The date and time that the event occurred in seconds since the Epoch (00:00:00 UTC, January 1, 1970) in seconds. (see the unix function time(), or the perl function localtime).



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_user_list

struct get_user_list(struct data);

This function will return a list of user structs given a list of user IDs.

data.

user_list

string. This string is a list of user id's separated by commas.



return. The return data struct has a single element.

list

array. An array of struct elements, each one containing information about a specfic user. The elements of each struct are as follows:

  • first_name. string. The user's first name.

  • group_name. string. The name of the group the user belongs to.

  • nt_group_id. string. The id of the user's group.

  • username. string. The user's login name.

  • nt_user_id. string. The user's id number.

  • last_name. string. The user's last name.

  • email. string. The user's email address.





get_user_permissions

struct get_user_permissions(struct data);

Gets the permissions settings for the specified User.

data. Named hash elements in the data hash:

nt_user_id

string. ID number of the User. REQUIRED.



return.

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

usable_ns0

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns1

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns2

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns3

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns4

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns5

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns6

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns7

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns8

string. ID of a Nameserver Users may publish zones to. (May be NULL)

usable_ns9

string. ID of a Nameserver Users may publish zones to. (May be NULL)



get_zone

struct get_zone(struct data);

This function returns information about a specific zone.

data.

nt_zone_id

string. ID number of the zone. REQUIRED.

nt_group_id

string. ID number of the group the zone belongs to.



return. The data struct returned contains the contents of the database entry for the zone ID supplied.

serial

string. Serial number.

description

string. Textual description of the zone.

nameservers

array. This entry contains a list of nameservers in use for the zone. Each entry is a struct with the following format:

  • datadir. string. The directory containing the nameserver's data on the nameserver.

  • output_format. string. The format for the data. May be 'djb' for djbdns nameservers, or 'bind' for bind databases.

  • description. string. Textual description of the nameserver.

  • logdir string. The logging directory on the nameserver.

  • service_type. string. The type of the nameserver. One of 'hosted', for NicTool Virtual Nameservers, or 'data-only' for data storage only.

  • nt_zone_id. string. ID of the zone that owns this nameserver.

  • name. string. Internet host name of the nameserver, in full qualified form (i.e. trailing '.').

  • nt_group_id. string. ID of the group that owns this nameserver.

  • ttl. string. The value of the "ttl" entry, formatted as an integer.

  • address. string. The dotted decimal IP address of this nameserver.

  • deleted. string. Has this nameserver been deleted? '1' means true.

  • nt_nameserver_id. string. The ID of the nameserver.



zone

string. The name of the zone.

mailaddr

string. The MX entry for the zone.

nt_zone_id

string. The ID of the zone.

refresh

string. The "refresh" entry value formatted as an integer.

retry

string. The "retry" entry value formatted as an integer.

minimum

string. The "minimum" entry value formatted as an integer.

nt_group_id

string. The ID of the group this zone belongs to.

ttl

string. The "ttl" entry value formatted as an integer

expire

string. The "expire" entry value formatted as an integer

deleted

string. Has this zone been deleted? 0 means false.



get_zone_delegates

struct get_zone_delegates(struct data);

Gets the list of Groups that have been made delegates of the specified Zone.

data. Named hash elements in the data hash:

nt_zone_id

string. ID number of the Zone. REQUIRED.



return.

delegates

array. A list of structs representing the delegate Groups.

nt_group_id

string. The ID of the Group.

group_name

string. The name of the Group.

In addition, the following fields representing the delegate Group's permissions for acting on the object:
delegate_write

flag. The delegate is allowed to modify this object.

delegate_delete

flag. The delegate is allowed to remove the delegation of this object.

delegate_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.

delegate_add_records

flag. The delegate is allowed to add records to this zone.

delegate_delete_records

flag. The delegate is allowed to delete records in this zone.





get_zone_list

struct get_zone_list(struct data);

This function will return a list of zone data given a list of zone IDs.

data.

zone_list

string. This string is a list of zone ID's separated by commas.



return. The return data struct has a single element.

zones

array. An array of struct elements, each one containing information about a specfic user. The elements of each struct are as follows:

  • description. string.The description of this zone.

  • zone. string.The zone.

  • mailaddr. string.The email for the zone.

  • ns0. string.The first nameserver id for the zone.

  • nt_group_id. string.The group of this zone.

  • nt_zone_id. string.The ID of the zone.

  • deleted. string.Has the zone been deleted? '0' for false.

  • expire. string.The "expire" value for the zone.

  • serial. string.The "serial" value for the zone.

  • minimum. string.The "minimum" value for the zone.

  • refresh. string.The "refresh" value for the zone.

  • retry. string.The "retry" value for the zone.

  • ttl. string.The TTL value for the zone.

  • ns1. string.The second nameserver id for the zone.

  • ns2. string.A nameserver id for the zone.

  • ns3. string.A nameserver id for the zone.

  • ns4. string.A nameserver id for the zone.

  • ns5. string.A nameserver id for the zone.

  • ns6. string.A nameserver id for the zone.

  • ns7. string.A nameserver id for the zone.

  • ns8. string.A nameserver id for the zone.

  • ns9. string.A nameserver id for the zone.





get_zone_log

struct get_zone_log(struct data);

This function returns a list of log entries for actions performed on a specified zone. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'timestamp','user','action','zone', 'ttl', 'description', or 'group_name'.

data. Named hash elements in the data hash:

nt_zone_id

string. ID of the zone.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

data

array. An array of struct elements, each one containing information about a specific log entry. The elements of each struct are as follows:

  • minimum. string. The "minimum" TTL value for records in this zone.

  • serial. string. The serial number of the zone entry (for BIND nameservers).

  • description. string. Textual description of the event.

  • zone. string. The name of the zone that was affected.

  • mailaddr. string. Email address for zone contact.

  • refresh. string. The refresh value

  • retry. string. The retry value

  • user. string. The name of the user who performed the action.

  • nt_user_id. string. The ID of the user who invoked the action.

  • group_name. string. The name of the zone's group.

  • nt_group_id. string. The ID of the zone's group.

  • ttl. string. The TTL value for the zone.

  • expire. string. The expire value.

  • nt_zone_id. string. The ID of the zone that was affected.

  • nt_zone_log_id. string. The ID of this zone log entry.

  • action. string. The type of the action.

  • timestamp. string. The date and time that the event occurred in seconds since the Epoch (00:00:00 UTC, January 1, 1970) in seconds. (see the unix function time(), or the perl function localtime).



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_zone_record

struct get_zone_record(struct data);

This function returns the data for a specific zone record.

data.

nt_zone_record_id

string. ID number of the zone record. REQUIRED.

nt_group_id

string. ID number of the group the zone belongs to.



return. The data struct returned contains the contents of the database entry for the zone ID supplied.

  • nt_zone_record_id. string.The Zone record ID number of the zone record being updated. If you are creating a new zone record, this entry is to be left blank. REQUIRED.

  • nt_zone_id. string.ID of the zone which the record belongs to. REQUIRED.

  • name. string.The name value of the zone record.

  • ttl. string.The TTL value of the zone record.

  • description. string.The description of the zone record.

  • type. string.The type of the zone record. One of 'A', 'CNAME', 'NS', 'MX', and 'PTR'.

  • address. string.The dotted-decimal IP address or domain name of the record.

  • weight. string.The weight of the record (type 'MX' records only).



get_zone_record_delegates

struct get_zone_record_delegates(struct data);

Gets the list of Groups that have been made delegates of the specified Zone Record.

data. Named hash elements in the data hash:

nt_zone_record_id

string. ID number of the Zone Record. REQUIRED.



return.

delegates

array. A list of structs representing the delegate Groups.

nt_group_id

string. The ID of the Group.

group_name

string. The name of the Group.

In addition, the following fields representing the delegate Group's permissions for acting on the object:
delegate_write

flag. The delegate is allowed to modify this object.

delegate_delete

flag. The delegate is allowed to remove the delegation of this object.

delegate_delegate

flag. The delegate is allowed to further delegate the object to another sub-group.





get_zone_record_log

struct get_zone_record_log(struct data);

This function returns a list of log entries for actions performed on zone records in a specified zone. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'action','user','timestamp','name', 'description', 'type', 'address', or 'weight'. The quick-search field is 'name'.

data. Named hash elements in the data hash:

nt_zone_id

string. ID of the zone.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

log

array. An array of struct elements, each one containing information about a specific log entry. The elements of each struct are as follows:

  • nt_zone_record_id. string.The ID of the affected zone record.

  • nt_user_id. string.The ID of the user who performed the action.

  • nt_zone_record_log_id. string.The ID of the zone record log entry.

  • nt_zone_id. string.The ID of the zone.

  • ttl. string.The TTL value for the record.

  • action. string.The action performed on the zone record.

  • user. string.The name of the user who performed the action

  • timestamp. string.The time the action occurred.

  • name. string.The name of the zone record.

  • description. string.The description of the zone record.

  • type. string.The type of the zone record.

  • address. string.The address of the zone record.

  • weight. string.The weight of the zone record (valid only for type 'MX').



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_zone_record_log_entry

struct get_zone_record_log_entry(struct data);

This function returns a single log entry for an action performed on a zone record in a specific zone.

data. Named hash elements in the data hash:

nt_zone_id

string. ID of the zone.

nt_zone_record_id

string. ID of the zone record.

nt_zone_record_log_id

string. ID of the zone record log entry.



return.

nt_zone_record_id

string.The ID of the affected zone record.

nt_user_id

string.The ID of the user who performed the action.

nt_zone_record_log_id

string.The ID of the zone record log entry.

nt_zone_id

string.The ID of the zone.

ttl

string.The TTL value for the record.

action

string.The action performed on the zone record.

user

string.The name of the user who performed the action

timestamp

string.The time the action occurred.

name

string.The name of the zone record.

description

string.The description of the zone record.

type

string.The type of the zone record.

address

string.The address of the zone record.

weight

string.The weight of the zone record (valid only for type 'MX').



get_zone_records

struct get_zone_records(struct data);

This function returns a list of records in the given zone. The results may be split over multiple pages, by specifying values for the page, start, and limit parameters. The field to perform a search on is specified in the N_field parameter, and it may be one of 'name','description','type','type', 'address', 'weight', or 'queries'. The quick-search field is 'name'.

data. Named hash elements in the data hash:

nt_zone_id

string. ID number of the requested zone. REQUIRED.

page

int. Number of page to start on if results span multiple pages. (default 1)

start

int. Number of the result to start with, if page is not defined. (default is 1)

limit

int. Total number of results to return (default 20, max 255)

Sort

int. 0 means false. Indicates that sort parameters have been included.

N_sortfield

string. Sort the results by the given field. N is an integer: the hierarchy of the sort (up to 3). Possibly values are the same as N_field.

N_sortmod

string. Sort the Nth sortfield in the given order. May be 'Ascending' or 'Descending'

N_field

string. Search parameter number N is searching over the given field name. This may be one of the field names given in the function description.

search_query

string. String describing the search in simple english.

Search

int. 0 means false. Indicates that search parameters have been included. If false, return all results.

N_option

string. Search parameter number N has the given condition. This option may be 'contains','starts with','ends with', 'equals', '>', '>=', '<','<='

N_value

string. The search string for search parameter number N.

N_inclusive

string. The search parameter number N should be added to the search with the given boolean term (for N>1). May be 'And' or 'Or'.

quick_search

int. 0 means false. Indicates that the search is to search all of the quick-search fields listed in the function description above to see if they contain search_value.

search_value

string. The search string for the quick-search.



return.

records

array. An array of struct elements, each one containing information about a specfic user. The elements of each struct are as follows:

  • description. string. The description of the record.

  • nt_zone_record_id. string. The ID of this zone record.

  • ttl. string. The TTL value of the record.

  • address. string. The dotted-decimal IP address of the record, or hostname if the record is of type PTR.

  • deleted. string. Has the record been deleted? '0' means no.

  • weight. string. The weight of the record.

  • queries. string. The number of queries for this record.

  • type. string. The type code for the record.

  • name. string. The zone record's name value.



page

string. The current page number.

total_pages

string. The total number of pages.

end

string. The position in the full list of matches of the last result returned in list.

total

string. Total number of results in the list element.

start

string. The position in the full list of matches of the first result returned in list.

limit

string. The maximum number of results returned.



get_zone_summary

struct get_zone_summary(struct data);

This function returns summary information for a particular zone.

data. Named hash elements in the data hash:

nt_zone_id

string. ID number of the requested zone. REQUIRED.



return.

nt_zone_id

string.The chosen zone.

range_start

string.The number of the first period this summary covers.

range_end

string.The number of the last period this summary covers.

zone_records

string.The number of zone records for this zone.

zone_record_modifications

string.The number of zone record changes.

zone_record_additions

string.The number of zone record additions.

zone_record_deletions

string.The number of zone record deletions.

queries_norecord

string.The number of unsuccessful queries for this zone.

queries_successful

string.The number of successful queries for this zone.



login

struct login(struct data);

The Login function creates a session with the NicToolServer, and allows further communication with the server. Once finished with communication, the function logout should be called.

data. The data struct for login contains the following named elements

username

string. username for NicToolServer

password

string. password for user



return. The data struct returned contains the contents of the database entry for the username supplied:

nt_user_id

string. user id

nt_group_id

string. group id

first_name

string. user's first name

last_name

string. user's last name

username

string. username

password

string. password

email

string. the user's email address

is_admin

string. 1 means true. is the user an admin?

deleted

string. 0 means false. Is the user deleted?

nt_user_session

string. the session ID string



logout

struct logout(void);

The logout function terminates the current session (if one exists).

return. The returned data is the same as the function verify_session.

move_nameservers

struct move_nameservers(struct data);

This function will move all the nameservers in the list into a specific group. Nameserver ID's must be valid and accessible.

data.

nameserver_list

string. This string is a list of nameserver ID's separated by commas.

nt_group_id

string. The group to which the nameservers should be moved.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

move_users

struct move_users(struct data);

This function will move a list of users into a specific group. Only valid user IDs will be moved, and only if the specified nt_group_id is valid and within your access rights.

data.

user_list

string. This string is a list of user id's separated by commas. Each user in the list will be moved to the specified group.

nt_group_id

string. The group to which the users should be moved.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

move_zones

struct move_zones(struct data);

This function will move a list of zones into a specific group. Only valid zone IDs will be moved, and only if the specified nt_zone_id is valid and within your access rights.

data.

zone_list

string. This string is a list of zone ID's separated by commas. Each zone in the list will be moved to the specified group.

nt_group_id

string. The group to which the zones should be moved.



return. No parameters other than error_code, and error_msg are returned. See the API Notes.

new_group

struct new_group(struct data);

This function allows you to create a group.

The permissions settings for the group may be specified explicitly using the group_..., user_..., zone_..., zonerecord_..., nameserver_..., and self_... parameters.

Note: No specific permission setting can be granted to a Group unless the currently logged-in User has that specific permission.



The usable_nameservers parameter allows you to specify a list of Nameservers which Users in the new Group will be allowed to publish zones to. The list of usable Nameservers cannot be overridden on a user to user basis.

data.

nt_group_id

string. ID number of the group's parent group. REQUIRED.

gid

string. ID of the group being updated. This should be empty if you are creating a new group. REQUIRED

name

string. New name of the group.

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

usable_nameservers

array. A list of up to 10 IDs of Nameserver objects. Users may publish zones to any of these Nameservers.



return. If successful, the result struct will contain an error_code value of '200'.

nt_group_id

string. The ID of the new or updated group.



new_nameserver

struct new_nameserver(struct data);

This function allows you to create or update a nameserver for a specific group.

data.

nt_nameserver_id

string. ID number of the nameserver to update. If you are creating a new nameserver, this element should be absent or undefined.

nt_group_id

string. ID number of the group the nameserver belongs to. REQUIRED.

datadir

string.The path to the data directory on the nameserver.

description

string.The description of the nameserver.

output_format

string.The output format for the data. Either 'djb' or 'bind'.

service_type

string.The type of the name server. Either 'hosted' or 'data-only'.

logdir

string.The path to the log directory on the nameserver.

name

string.The hostname of the nameserver.

address

string.The dotted-decimal IP address of the nameserver.

ttl

string.The TTL value for this nameserver.



return. If successful, the returned struct will contain only one element:

nt_nameserver_id

string. The nameserver's ID number.



new_user

struct new_user(struct data);

This function allows you to create a user in a specific group.

The permissions settings may be specified explicitly using the group_..., user_..., zone_..., zonerecord_..., nameserver_..., and self_... parameters, or the User can inherit the permissions settings for the parent Group if none of those parameters are included. You can explicitly cause the permissions to be inherited (or not) by including the parameter inherit_group_permissions.

Note: No specific permission setting can be granted to a User unless the currently logged-in User also has that specific permission setting.



data.

nt_group_id

string. ID number of the group. This parameter must be included..

first_name

string. The user's first name.

email

string. The user's email address. This parameter must be included.

last_name

string. The user's last name.

username

string. The user's login name. This parameter must be included.

password

string. The user's password. This parameter must be included.

password2

string. The user's password again. Must match password. This parameter must be included.

group_write

flag. Users may modify Group objects.

group_create

flag. Users may create new Group objects.

group_delete

flag. Users may delete Group objects.

zone_write

flag. Users may modify Zone objects.

zone_create

flag. Users may create Zone objects.

zone_delegate

flag. Users may delegate Zone objects.

zone_delete

flag. Users may delete Zone objects.

zonerecord_write

flag. Users may modify Zone Record objects.

zonerecord_create

flag. Users may create Zone Record objects.

zonerecord_delegate

flag. Users may delegate Zone Record objects.

zonerecord_delete

flag. Users may delete Zone Record objects.

user_write

flag. Users may modify User objects.

user_create

flag. Users may create User objects.

user_delete

flag. Users may delete User objects.

nameserver_write

flag. Users may modify Nameserver objects.

nameserver_create

flag. Users may create Nameserver objects.

nameserver_delete

flag. Users may delete Nameserver objects.

self_write

flag. Users may modify themselves.

inherit_group_permissions

flag. If TRUE, the User object will inherit the permissions for the group it belongs to.



return. If successful, the returned struct will contain only one element:

nt_user_id

string. The user's id number.



new_zone

struct new_zone(struct data);

This function allows you to create or update a zone within a specific group.

data.

nt_zone_id

string. ID number of the zone to update. If you are creating a new zone, this element should be included but be undefined or the empty string.

nt_group_id

string. ID number of the group the user belongs to. REQUIRED.

zone

string. The name of the zone. This parameter is REQUIRED only if you are creating a new zone.

ttl

string. An integer string for the TTL value of the zone record.

serial

string. The serial value for BIND name servers.

nameservers

string. A comma separated list of nameserver IDs. These IDs will be the nameservers this zone is replicated to. REQUIRED if a new zone is being created.

mailaddr

string. The email address for the hostmaster of the zone. This email address should not contain an '@' character. Instead use '.'.

description

string. A description of the zone.

refresh

int. The value for the REFRESH setting in seconds.

retry

int. The value for the RETRY setting in seconds.

expire

int. The value for the EXPIRE setting in seconds.

minimum

int. The value for the MINIMUM setting in seconds.



return. If successful, the returned struct will contain only one element:

nt_zone_id

string. The new zone's id number.



new_zone_record

struct new_zone_record(struct data);

This function allows you to create or update a zone record within a specific zone.

data.

nt_zone_record_id

string.The Zone record ID number of the zone record being updated. If you are creating a new zone record, this entry is to be left blank. REQUIRED.

nt_zone_id

string.ID of the zone which the record belongs to. REQUIRED.

name

string.The name value of the zone record.

ttl

string.The TTL value of the zone record.

description

string.The description of the zone record.

type

string.The type of the zone record. One of 'A', 'CNAME', 'NS', 'MX', and 'PTR'.

address

string.The dotted-decimal IP address or domain name of the record.

weight

string.The weight of the record (type 'MX' records only).



return. If successful, the returned struct will contain only one element:

nt_zone_record_id

string. The new zone record's id number.



save_group

DEPRECATED since version 2.00b (see new_group and edit_group).

save_nameserver

DEPRECATED since version 2.00b (see new_nameserver and edit_nameserver).

save_user

DEPRECATED since version 2.00b (see new_user and edit_user).

save_zone

DEPRECATED since version 2.00b (see new_zone and edit_zone).

save_zone_record

DEPRECATED since version 2.00b (see new_zone_record and edit_zone_record).

verify_session

struct verify_session(void);

This function verifies that you have a current session.

return. The returned data is the same as the function login, with one additional parameter:

last_access

string. The time of the last access by the user.