API Developer Reference

Getting Started

PHP SDK

IMPORTANT: The Axis Legacy API is deprecated and has been replaced with the Axis REST API

SDK for PHP
The SDK is a PHP based library that makes it easy to use the Axis LMS API in your PHP code.

You can download the SDK files here:

https://files.atrixware.com/files/axis/resources/axisapi.sdk.php.zip

 

Basic Usage
Here is a basic example of calling the Axis API using the PHP SDK. This example sets the return type as XML but you can also set it to return as JSON. Note that your code will also have to include the server and API key not shown in this example. Check out the sample files and template file in the PHP SDK for more details:

result = axisapi\call([
  endpoint => "user/getlist",
  p1 => "admin",
  returntype => "xml"
]);

While the Axis API natively returns results as XML, using the SDK you can set the result to be returned as either XML or JSON. You can use the built-in PHP functions to parse through either kind of result. When converted to JSON, the data could be in a few different formats (flat object, or an object of arrays for example, depending on the complexity of the data). 

When handling tagged data which some endpoints return back as values to some nodes, the PHP SDK has a few functions to help you parse through the results of that kind of data structure:

axisapi\hasTaggedData($string)

This function will return true if the $string passed has tagged data.

asixapi\getTagNames($string)

This function will return an array of tag names in $string.

axisapi\getTagData($tagname, $string)

This function will return the data value for $tagname in the $string containing tagged data.

 

The PHP SDK consists of several files including a starting template file you can use to start your coding, and some example files to get you started.

To set it up, follow these steps:

  1. Create a folder on your web server to put the PHP files.

  2. Unzip the SDK files, and copy to the folder on your web server.

  3. To try the sample files, open them up and populate the required fields with data for your LMS.

 

Note: If you are using the legacy SDK/API wrapper (which used the APICommand() function), you can still use the same coding style with the new SDK, although you won't be able to take advantage of the benefits the new SDK offers.

 

 

Axis LMS API Overview
Overview
Getting Started
API Tools
PHP SDK
Javascript SDK
ColdFusion
Understanding Return Values
Certifications Endpoints
certifications/getuserlist
certifications/getuserinfo
certifications/getuserceus
certifications/issueofflinecert
certifications/issueonlinecert
certifications/extend
certifications/getprogramid
certifications/getprogramlist
Course Endpoints
course/getcount
course/getlist
course/getrecord
course/getuserlist
course/enrolluser
course/removeuser
Gradebook Endpoints
gradebook/getreportcard
ILT Endpoints
ilt/disenrolluser
ilt/enrolluser
ilt/getcompletedusers
ilt/getmeetings
ilt/getprograms
ilt/getsessions
ilt/getusersessions
ilt/setuserattendance
Learning Paths Endpoints
learningpaths/enrolluser
learningpaths/disenrolluser
learningpaths/getpaths
learningpaths/getusers
learningpaths/getuserstatus
learningpaths/resetuser
Manager Endpoints
manager/add
manager/demote
manager/assignemployee
manager/moveemployees
manager/getcoursekeywords
manager/setcoursekeywords
manager/getusername
manager/getlist
manager/getcount
manager/getuserlist
manager/getusercount
manager/getmanagerlist
manager/getmanagercount
Organization Endpoints
organizations/adduser
organizations/getbranches
organizations/getlist
organizations/getusercount
organizations/removeuser
Report Endpoints
report/getcourseinfo
report/getcourseactivityinfo
report/getuserinfo
report/getuserarchiveinfo
report/getusercourseinfo
report/getuserdetailedscoreinfo
report/getusertrainingsummary
System Endpoints
system/getapiversion
User Endpoints
user/getcount
user/getlist
user/getrecord
user/getusername
user/getimage
user/getsso
user/add
user/update
user/elevate
user/getmanager
user/assigntomanager
user/enroll
user/disenroll
user/getsysvars
user/getsysvar
user/setsysvar
Usergroup Endpoints
usergroup/getcount
usergroup/getlist
usergroup/add
usergroup/remove
usergroup/getuserlist
usergroup/getusercount
usergroup/adduser
usergroup/removeuser