Axis REST API

Introduction and Overview

PHP Example Code

We have written a small PHP class you can use with your code to make it easy to consume the Axis REST API.

To get started, download the Axis REST API Class Files.

To use the class, simply include the axisAPI.php file in your code.

There is an example.php file included in the download with more additional details on the example code below, but for quick reference, here are a few examples using the PHP class:

First, you will want to include this bit of code (filling in the data needed) in your project files:
 
/* ************************************************************
    create an API object
    these commands should be included in every page
    the API is being used
 ************************************************************** */
 
    include "axisAPI.php";
    $api = new axisAPI();
    $api->setServerDomain("{www.yourlmssystem.com}");
    $api->setAPIKey("{key}");
    $api->useBearerTokens();
 
/* ************************************************************ */
 
 
Here are some code samples you can use to understand the format:
 
/* sample call to a GET endpoint, no filtering */
   $result = $api->get("/certifications/list/all/");
 
 
/* sample call to a GET endpoint, with filtering
   this example will get fields username, first_name and last_name for each user
   where their username is not 'admin' and their username excludes 'custom'.
   accepts 'equals', 'not', 'contains' and 'excludes' as comparisons
*/
   $api->addFieldFilter(["username", "first_name", "last_name"]);
   $api->addUserFilter("username", "not", "admin");
   $api->addUserFilter("username", "excludes", "custom");
   $result = $api->get("/users/filtered/");
   if ( $result->success ) {
       echo $result->json;
   } 
   $api->clearFilters();
 
 
/* sample call to a POST endpoint */
   $result = $api->post("/courses/enrollments/6/1/", ["start" => "20230101", "end" => "20231231"]);
 
 
/* sample call to a DELETE endpoint */
   $result = $api->delete("/courses/enrollments/6/1/");
 
 
/* sample call to a PUT endpoint */
   $result = $api->put("/users/1", ["last_name" => "Adminner"]);
 

 

Introduction and Overview
How to Use this Documentation
Authentication and API Keys
Authorization using Bearer Tokens
Data Types
Return Data Format
Pagination
API Logging
Consuming the Axis REST API
cURL Example Code
PHP Example Code
Certifications Endpoints
Certifications Endpoints Overview
GET /certifications/list/
GET /certifications/{program-id}/
GET /certifications/{program-id}/users/
GET /certifications/certificates/
GET /certifications/ceus/
POST /certifications/certificates/online/
POST /certifications/certificates/offline/
PUT /certifications/certificates/extend/
Courses Endpoints
Courses Endpoints Overview
GET /courses/count/
GET /courses/list/
GET /courses/{course-id}/
GET /courses/{course-id}/users/
POST /courses/enrollments/
DELETE /courses/enrollments/
ILT Endpoints
ILT Endpoints Overview
GET /ilt/list/
GET /ilt/users/{user-id}/sessions/
GET /ilt/{program-id}/
GET /ilt/{program-id}/sessions/
GET /ilt/{program-id}/meetings/
GET /ilt/{program-id}/completions/
POST /ilt/enrollments/
PUT /ilt/attendance/
DELETE /ilt/enrollments/
Learningpaths Endpoints
Learningpaths Endpoints Overview
GET /learningpaths/list/
GET /learningpaths/{learningpath-id}/users/
POST /learningpaths/enrollments/
DELETE /learningpaths/enrollments/
Organizations Endpoints
Organizations Endpoints Overview
GET /organizations/list/
GET /organizations/branches/
GET /organizations/users/{organization-id}/
GET /organizations/users/{organization-id}/{branch-id}/
POST /organizations/users/
DELETE /organizations/users/
Reports Endpoints
Reports Endpoints Overview
GET /reports/certifications/
GET /reports/courses/
GET /reports/learningpaths/
GET /reports/ilt/
GET /reports/users/{user-id}/courses/
GET /reports/users/all/courses/
GET /reports/users/filtered/courses/
GET /reports/users/{user-id}/archived/
GET /reports/users/all/archived/
GET /reports/users/filtered/archived/
GET/reports/users/{user-id}/certifications/
GET /reports/users/all/certifications/
GET /reports/users/filtered/certifications/
GET /reports/users/{user-id}/ilt/
GET /reports/users/all/ilt/
GET /reports/users/filtered/ilt/
GET /reports/users/{user-id}/learningpaths/
GET /reports/users/all/learningpaths/
GET /reports/users/filtered/learningpaths/
Users Endpoints
Users Endpoints Overview
GET /users/list/
GET /users/{user-id}/
GET /users/all/
GET /users/filtered/
POST /users/
PUT /users/
Usergroups Endpoints
Usergroups Endpoints Overview
GET /usergroups/list/
GET /usergroups/{usergroup-id}/
GET /usergroups/{usergroup-id}/members/
POST /usergroups/
POST /usergroups/members/
DELETE /usergroups/
DELETE /usergroups/members/