API Tools
Atrixware has created some tools to make it easier for you to learn about and use the API.
Axis LMS API Integration Tile
When you log into the Partition Admin, located in the SYSTEM area is the API Integration tile - which brings you to an area where you can (1) generate API keys, (2) view logs of your API calls, and (3) get to the API Builder App.
Axis API Builder App
Your system comes equipped with an API Builder app. It is located at:
https : // your.axissystem.com / lms / apibuilder.php
Simply open a web browser and navigate to the address above (replace the your.axissystem.com piece with your own system address).
This form is designed to enable you to quickly test out API functions. It lets you enter an API key (you set up API keys in the global system config file — discussed later), an API command, and the parameters. When you submit, it echo’s the response, as well as the querystring you can use (or paste in to your code) to execute that exact API call.
The API Code Kit
The API Code Kit is a PHP based library that makes it easy to use the Axis LMS API in your PHP code. You can download the files here:
http://files.atrixware.com/files/axis/resources/axis-lms.apicodekit.zip
The code kit consists of 2 library files you will use in your projects (api_wrapper.php and api_template.php) and a few example files.
To set it up, follow these steps:
-
Create a folder on your web server to put the PHP files.
-
Copy the api_wrapper.php and api_template.php files over into the folder.
-
Enter the proper values for $api_key and $api_server inside the api_template.php file
(open the file using a text editor).
-
Use the api_template.php file as a starting point for any PHP script that needs to use
the Axis LMS API in your project.
To try out the example1 file:
1. Copy the file named api_example1.php and api_wrapper.php into a folder on your web server.
2. Open api_example1.php in a text editor, and enter the proper values for $api_key and $api_server.
3. On line #12, change partition_username to that of your partition username.
4. Save.
5. Open your web browser and navigate to the file.
To try out the example2 file:
1. Copy the file named api_example2.php and api_wrapper.php into a folder on your web server.
2. Open api_example2.php in a text editor, and enter the proper values for $api_key and $api_server.
3. On line #12, change partition_username to that of your partition username.
4. Also on line #12, change course_name to that of a course name with some activity.
5. Save.
6. Open your web browser and navigate to the file.