Introduction
Web API Introduction
The IN Tester web API provides features for accessing and updating the IN Tester database of flows, executing tests and administering application configuration.
The web API is designed as a RESTful API where HTTP access methods
(GET
, PUT
, POST
and DELETE
) are used to identify the type of
operation, and the URL itself identifies the resource.
For example, to get the list of folders, the URL is:
http://localhost/jarvis-agent/n2int-angular/api/folder
Base URL
All access to the IN Tester API is through the base URL:
http://<server>/jarvis-agent/n2int-angular/api/
For example:
http://localhost/jarvis-agent/n2int-angular/api/
Security
Access to the API is granted once login has been successful. The web API uses cookies to store login tokens and so any command line access must keep and reuse cookies between requests.
An easy way to do this is to either try commands through
the web browser (via the links provided in this documentation)
or through tools such as curl
on the command line.
Note that when using this API through the web browser,
browser extensions are useful in allowing PUT
, POST
and DELETE
actions.
Login
To log in to the web API, call the __status
method with
a username and password (this example using the default username/password
the IN Tester is installed with):
http://localhost/jarvis-agent/n2int-angular/__status?username=admin&password=admin
Note that thes __
methods do not have the /api/
prefix.
This request will provide a response, such as the following
if successful:
{
"logged_in" : 1,
"error_string" : "",
"sid" : "41b3cb5e9ae83949152167983e35a941",
"group_list" : "function.execute.single,function.execute.group,function.execute.custom,view.organise.edit,view.organise.view,view.design.edit,view.design.view,view.admin.ocncc-balance-type.edit,view.admin.diameter-config.edit,view.admin.group-scheduler.edit,view.admin.noa-rule.edit,view.admin.user.edit,view.admin.osd-operation.view,__administrator",
"license" : {
"license_error" : null,
"licensee" : "Example Telco"
"licensed" : 1,
"licensed_until_description" : " 1st January 2016",
"packages" : {
"load" : 1,
"ocncc-osd" : 1,
"inap-interaction" : 1,
"camel-charging" : 1,
"inscript" : 1,
"nca" : 0,
"beta" : 1,
"intest" : 1,
"ocncc-provisioning" : 1,
"map" : 0,
"diameter-client" : 1
}
},
"sid_param" : "INTEST_CGISESSID",
"version" : "development",
"username" : "admin"
}
Note this response provides a range of clear details on the
login - including the important logged_in: 1
. If this shows
0
instead of 1
, then login has failed.
Logout
To log out of the web API, call the __logout
method:
http://localhost/jarvis-agent/n2int-angular/__logout
Login Status
To retrieve a status of the login, call the __status
method, without parameters:
http://localhost/jarvis-agent/n2int-angular/__status