SkyPrep API

Introduction

Welcome to the SkyPrep API. The API allows you to do most common actions in SkyPrep. This includes create, read, update and delete operations for users, groups, courses and enrollments.

The API is a simple HTTP GET or POST interface using query string parameters (e.g. a request can look like https://api.skyprep.io/admin/api/create_user?api_key=12345
&[email protected]&first_name=James....
) or POST body parameters. It is designed around ease-of-use and is fairly simple to get working with in many programming and scripting languages.

Note: It is highly recommended to make all API requests using the HTTP POST method as this will prevent your API key from being accidentally revealed in server logs/browser histories. HTTP GET requests are deprecated and will eventually become unsupported. Every route supports HTTP POST so it is highly recommended to use HTTP POST with the API key as a parameter inside the POST-body. Alternatively, you can make HTTP GET requests, but pass in the API key using a header called X-SkyPrep-API-Key

All responses are returned in JSON format by default. To return XML, append the parameter format equal to xml to the request.

A RESTful version of the API will become available in the near future.

We recommend using the Postman Client to test using the API to understand how data is returned.

If you are simply testing the API in the Google Chrome browser, you should also install JSONView which will format and properly unescape JSON-formatted text.

All API requests are made to https://api.skyprep.io/admin/api

Any questions can be sent to [email protected]


SDKs

				
			

Authentication

The API requires the account's API key (api_key) and SkyPrep domain (acct_key) to be provided as part of every request, as well as your platform's domain (without any HTTP or HTTPS prefix). The API key can be found in the Customization tab of the platform. All requests MUST include the api_key.

The API key can also be passed in as a HTTP header named X-SkyPrep-API-Key. Similarly, the SkyPrep domain can be passed in a HTTP header named X-SkyPrep-Acct-Key.

** Make sure to keep the api_key private and secure. DO NOT expose the API key (for example, in publically-facing URLs, or within client-facing HTML/JS source code).**

A version of the API that authenticates using signed parameters (HMAC/SHA2) that do not include an API key as part of the request payload will be made available in the near future to allow embedding API calls in public-facing/non server-side links.

        

 GET https://api.skyprep.io/admin/api/test_connection

 #sample parameters

  {
  	"api_key" : "Your API Key", //Required
  	"acct_key" : "yourskyprepdomain.skyprepapp.com" //Required
  }


 #sample response

  {
  	"message" : "success"
  }

        
      

Users

The SkyPrep API lets you add, update and delete users.

Get All Users

Get all the users in the system.
Returns a JSON array.

GET https://api.skyprep.io/admin/api/get_users
limit
integer The number of results per page
offset / page
integer The page based on the limit above.
email
string The username of the user you're looking for
first_name
string Find users by first name
last_name
string Find users by last name
created_within_the_past_day
boolean Users that have been created within the past 24 hours, to now.
order_by_created_at_desc
boolean Order results by decending user creation date
include_groups
boolean Include user group info that the user is part of in the response
include_learning_paths
boolean Include learning path info that the user is part of in the response
				
					GET https://api.skyprep.io/admin/api/get_users


					#sample response 
					[ {
						"id" : 32,
						"first_name" : "John",
						"last_name" : "Doe",
						"username" : "[email protected]",
						"card_no" : "Emp. # 3211221",
						"created_at" : "June 23 2013 12:00:00"
						//More JSON data

						
					},
					{
						"id" : 44,
						"first_name" : "James",
						"last_name" : "Deere",
						"username" : "[email protected]",
						"card_no" : "Emp. # 1472546",
						"created_at" : "June 28 2013 12:00:00"
						//More JSON data

						
					},
					....
					]
				
			

Get a User

A single user's data can be retrieved using the API.

GET https://api.skyprep.io/admin/api/get_user
user_id (or user_email ):
integer / string The internal ID of the user (this cannot be changed) OR the users email.

	GET https://api.skyprep.io/admin/api/get_user

	#sample parameters
	{
		"user_id" : The internal SkyPrep user_id (unique) //OR
		"user_email" : "The users email"
	}

	#sample response
	{
		"id" : 32,
		"first_name" : "John",
		"last_name" : "Doe",
		"username" : "[email protected]",
		"card_no" : "Emp. # 3211221"
		//More JSON data					
	}

			

Create a User

Users (learners, admins, managers) can be created through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/create_user
email:
string (required) The email of the user
password:
string (optional ) The password of the user. This must be 8 characters. Otherwise, a password will be automatically generated.
first_name:
string The first name of the user
last_name:
string The last name of the user
email_notifications
boolean Whether the user receives email notifications
sms_notifications
boolean Whether the user receives SMS notifications (requires Twilio integration)
card_no:
string The unique user identifier of the user (e.g. student #, badge #)
cell:
string The users cell phone number
title:
string The users title
work_phone:
string The users work phone number
address:
string The users address
role:
string Available roles: "admin", "manager", "content_manager", "learner"
ca_{x}:
string Custom Attribute {x}
(Note: x is a number between 0 and 10, e.g. ca_3) for a total of 11 custom attributes
send_login_information:
boolean (false) Whether to email the user their log-in information (username/password).
				
					POST https://api.skyprep.io/admin/api/create_user

					#sample parameters
					{
						"email" : '[email protected]'
						"first_name" : "James",
						"last_name" : "Doakes",
						"role" : "manager",
						"title" : "Detective",
						"cell" : "818-333-3333",
						"work_phone" : "818-444-4444",
						"address " : "10 Dexter Drive Miami FL"
						"card_no" : "Badge No. 158-612",
						"ca_0" : "Alias: Bay Harbour Butcher"

					}

					#sample response
					{
						"id" : 21,
						"first_name" : "James",
						"last_name" : "Doakes",
						"username" : "[email protected]",
						"card_no" : "Badge No. 158-612",
						"role" : "manager"

						//Additional user data	
					}
				
			

Update a User

Users (learners, admins, managers) can be updated through the API by passing in these parameters. If parameters are ommited, they are not updated.

POST https://api.skyprep.io/admin/api/update_user

Note: parameters are the same as create above

				
					POST https://api.skyprep.io/admin/api/update_user

					#sample parameters
					{
						"user_email" : '[email protected]'
						"first_name" : "James",
						"last_name" : "Doakes",
						"role" : "admin"
						"title" : "Detective",
						"cell" : "818-333-3333",
						"work_phone" : "818-444-4444",
						"address " : "10 Dexter Drive Miami FL"
						"card_no" : "Badge No. 158-612",
						"ca_0" : "Alias: Bay Harbour Butcher",
						"access_start_date" : "July 31, 2015",
						"access_end_date" : "July 30, 2017",
						"password_expiration_date" : "July 19, 2022"
					}

					#sample response
					{
						"id" : 21,
						"first_name" : "James",
						"last_name" : "Doakes",
						"username" : "[email protected]",
						"card_no" : "Badge No. 158-612"

						//Additional user data

						
					}
				
			

Delete a User

Deletes a user permanentely from the system.

POST https://api.skyprep.io/admin/api/destroy_user
user_email:
string (required) The email of the user to delete

POST https://api.skyprep.io/admin/api/destroy_user

#sample parameters
{
	"user_email" : "[email protected]"
}

#sample response
{
	"message" : "success"
}



Retrieve automatic sign-in link (SSO)

Get an automatic sign-in URL for a user (by email)

user_email:
string (required) The email of the user
autocreate:
boolean (false) If set, the user will be automatically created if the user does not exist in the platform
user_first_name:
string The first name of the user
user_last_name:
string The last name of the user
key_type:
string (daily) can be either 'otl' or 'daily'. OTL generate one-time login keys so if the link returned is followed, it no longer works. Daily generates a login key usable for the entire day (UTC time)
redirect_full_url:
string (optional) The URL that the user should be redirected to. For example, to redirect them to a specific course with ID 644, you can set this to '/courses/show/644'
user_groups:
string The list of user groups names the user should be enrolled in, separated by semi-colons (;). If a group does not exist, the group will be automatically created as well.
(Note: This should be the names as strings, not the IDs)

GET https://api.skyprep.io/admin/api/get_login_key/

#sample parameters
{
	"user_email" : '[email protected]',
	"autocreate" : true,
	"key_type" : "daily",
	"user_groups" : "Forensics Lab;Miami PD Staff"

}

#sample response
{
	"email": "[email protected]",
	"login_key": "abcdefghijklmnopqrstuvwxyz0123456789",
	"url": "https://yourskyprepdomain.skyprepapp.com/account/[email protected]&login_key=abcdefghijklmnopqrstuvwxyz012345689"
}


Get Courses a User is Enrolled In

Get all the courses a user is currently enrolled in (directly, through groups and course bundle).
Returns a JSON array of courses.

GET https://api.skyprep.io/admin/api/get_user_courses
user_email:
string (required) The email of the user

GET https://api.skyprep.io/admin/api/get_user_courses


#sample response (Array)
[

 {
 	//Course JSON 1
 },

 {
 	//Course JSON 2
 },

 ///.... More courses
]



Mass Enroll Users into Courses, Groups and Course Bundles

Users data can be mass-enrolled into courses, groups and course bundles.

POST https://api.skyprep.io/admin/api/mass_enroll
user_ids
integers (required) comma-seperated IDs of the users
OR user_emails
emails (required) comma-seperated emails of the users
user_group_ids
integers comma-seperated IDs of the groups to enroll into
course_ids
integers comma-seperated IDs of the courses to enroll into
course_bundle_ids
integers comma-seperated IDs of the course bundles to enroll into

GET https://api.skyprep.io/admin/api/mass_enroll

#sample parameters
{
	"user_emails" : "[email protected],[email protected]"
	"course_ids" : "84,96,101,323",
	"user_group_ids" : "505,680,4,122",
	"course_bundle_ids" : "222"
}

#sample response
{

	"message" : "success" 
	
}



Permissions and Roles

The SkyPrep API lets you create new Power Users (i.e. assigning Datasets and Roles to Users)

Get Power Users

Retrive the list of all power users in the platform.

GET https://api.skyprep.io/admin/api/get_power_users

	GET https://api.skyprep.io/admin/api/get_power_users

	#sample response
	[{
		"id" : 32,
		"first_name" : "John",
		"last_name" : "Doe",
		"username" : "[email protected]",
		"card_no" : "Emp. # 3211221",
		"role" : "power_user",
		"permissions" : {
			//Permissions on the user
		}
		//More JSON data					
	},
	 ...
	]

			

Get User Roles

Retrive the list of all User Roles in the platform.

GET https://api.skyprep.io/admin/api/get_user_roles
			
				GET https://api.skyprep.io/admin/api/get_user_roles

				#sample response
				[
					{
						"id" : 781,
						"name" : "Basic Admin"
					},
					{
						"id" : 6721,
						"name" : "Course Editor"
					},
					...
				]
			
			

Get Datasets

Retrive the list of all Datasets in the platform.

GET https://api.skyprep.io/admin/api/get_datasets
			
				GET https://api.skyprep.io/admin/api/get_datasets

				#sample response
				[
					{
						"id" : 7481,
						"name" : "New York Location"
					},
					{
						"id" : 4211,
						"name" : "Chicago Location"
					},
					...
				]
			
			

Create a User

Create or Update Power Users by passing in their user_ids, dataset_ids and user_role_ids.

POST https://api.skyprep.io/admin/api/create_or_update_power_users
user_ids:
array (integers) (required) The IDs of the users
user_role_id:
integer (required) ) The ID of the user role (only a single role can be assigned at a time)
dataset_ids:
array (integers) (required) The IDs of the datasets
				
					POST https://api.skyprep.io/admin/api/create_or_update_power_users

					#sample parameters
					{
						"user_ids" : [513, 3123, 444],
						"user_role_id" : 781,
						"dataset_ids" : [7481, 4211]
					}

					#sample response
					[{
						"id" : 32,
						"first_name" : "John",
						"last_name" : "Doe",
						"username" : "[email protected]",
						"card_no" : "Emp. # 3211221",
						"role" : "power_user",
						"permissions" : {
							//Permissions on the user
						}
						//More JSON data					
					},
					 ...
					]
				
			

Destroy a Power User's Permissions

This will NOT delete the user. It will only remove their permissions.

POST https://api.skyprep.io/admin/api/destroy_power_user
user_id:
integer (required) The user ID of the user who's Power User permissions you want to remove/revoke.
					
					POST https://api.skyprep.io/admin/api/destroy_power_user

					#sample parameters
					{
						"user_id" : 545
					}

					#sample response
					{
						"message" : "success"
					}


					
					

Courses

The SkyPrep API lets you update and delete courses. It also allows you to enroll users, and user groups into courses.

Get All Courses

Get All the Courses in the System

GET https://api.skyprep.io/admin/api/get_courses

GET https://api.skyprep.io/admin/api/get_courses

#sample response 
[
 {
 	//Course JSON 1
 },
 {
 	//Course JSON 2
 }
]



Get a Course

A single course's data can get retrieved using the API.

course_id:
integer The internal ID of the course.

GET https://api.skyprep.io/admin/api/get_course

#sample parameters
{
	"course_id" : 101 //The internal SkyPrep course_id (unique)
}

#sample response
{
	"id" : 101,
	"name" : "My Course",
	"description" : "My Sample Course",
	....
	//More JSON data	
}

Create a Course

Creates a course.

POST https://api.skyprep.io/admin/api/create_course
name:
string The name of the course
description:
string The description of the course.
start_date:
datetime The start date of the course.
end_date:
string The end date of the course.
active:
boolean Whether the course is active or not (i.e. available to learners)

	POST https://api.skyprep.io/admin/api/create_course


	#sample parameters
{
		"name" : "Pratice to Perfect",
		"active" : "true"
	}

	#sample response 

	 {
	 	"id" : "8877",
	 	"name" : "Pratice to Perfect",
	 	....
	 }

			

Update a Course

Updates a course.

POST https://api.skyprep.io/admin/api/update_course
course_id:
integer (required) The ID of the course
name:
string The name of the course
description:
string The description of the course.
start_date:
datetime The start date of the course.
end_date:
string The end date of the course.
active:
boolean Whether the course is active or not (i.e. available to learners)

POST https://api.skyprep.io/admin/api/update_course


#sample parameters
{
	"course_id" : "6294",
	"name" : "How to Catch A Serial Killer",
	"active" : "true"
}

#sample response 
 {
 	"message" : "success"
 }


Delete a Course

Deletes a course permanentely from the system.

POST https://api.skyprep.io/admin/api/destroy_course
course_id
integer (required) The Internal SkyPrep course id

POST https://api.skyprep.io/admin/api/destroy_course

#sample parameters
{
	"course_id" : "8812"
}

#sample response
{
	"message" : "success"
}



Enroll a User into a Course

Users data can be retrieved using the API.

GET https://api.skyprep.io/admin/api/enroll_user_in_course
user_id
integer (required) The ID of the user
OR user_email
string (required) The email of the user
course_id
integer The ID of the course
course_enrollment_expiration_date
datetime or string The date the enrollment will expire

POST https://api.skyprep.io/admin/api/enroll_user_in_course

#sample parameters
{
	"user_email" : "[email protected]",
	"course_id" : "144123"
}

#sample response 
{	
	"message" : "success"
}



Remove a User from a Course

POST https://api.skyprep.io/admin/api/remove_user_from_course
user_id
integer (required) The ID of the user
OR user_email
string The email address of the user
course_id
integer(required) The ID of the user group

POST https://api.skyprep.io/admin/api/remove_user_from_course

#sample parameters 

{
	"user_email" : "[email protected]",
	"course_id" : "18872"
}

#sample response

{
	"message" : "success"	
}




Enroll a User into Courses

Enroll a single user into multiple courses. The courses are passed in as a comma-separated list of course IDs

POST https://api.skyprep.io/admin/api/enroll_user_in_courses
user_id
integer (required) The ID of the user
course_ids
integer(required) The IDs of the courses (comma-separated)

POST https://api.skyprep.io/admin/api/enroll_user_in_courses

#sample parameters
{
	"user_id" : "77121"
	"course_ids" : "13,889,15,796,9788"
}

#sample response 
{
	"message" : "success"	
}



Add a Course into a User Group

POST https://api.skyprep.io/admin/api/add_course_to_user_group
course_id
integer (required) The ID of the course
user_group_id
integer(required) The ID of the user group
end_date
datetime or string The last day this course is part of this group
				
POST https://api.skyprep.io/admin/api/add_course_to_user_group

#sample parameters
{
	"user_group_id" : "1821",
	"course_id" : "123123"
}

#sample response
{
	"message" : "success"
}
				
			

Get a Course One-Time Password (OTP) Subscribe Key for a Course

OTP keys are course enrollment keys that can be provided to learners so they can self-enroll into a course using the courses self-enrollment link.

They are similar to the subscribe key for a course that you can set within the SkyPrep interface. The only difference is that an OTP key can only be used once, by a single user.

OTP keys are useful for scenarios where you need to provide limited access to a course, but you don't want to enroll users ahead of time. You can simply send them the key and they can enroll when they are ready.

OTP keys are also useful for selling courses. When a buyer buys the course, you can provide them the OTP key and the link to enroll into the course. OTP keys can only be used once.

Please note that a generated OTP key is tied to the main subscribe_key value in the course. If the subscribe_key changes, OTP keys become invalidated unless the subscribe_key is reverted back to what it was previously.

GET https://api.skyprep.io/admin/api/get_course_otp
course_id:
integer / string The ID of the course
count (default: 10):
integer The number of OTP keys to generate
      
      GET https://api.skyprep.io/admin/api/get_course_otp

      #sample parameters
{
      	"course_id" : "171",
      	"count" : 2
      }

      #sample response:
      [
      	"1234-5123-412",
      	"6712-zhja-181"
      ]


      
      

Get a User's Status in a Course

Users data can be retrieved using the API.

GET https://api.skyprep.io/admin/api/get_user_course_status
user_id (or user_email ):
integer / string The internal ID of the user (this cannot be changed) OR the users email.
course_id
integer The internal ID of the course.

GET https://api.skyprep.io/admin/api/get_user_course_status

#sample parameters 
{
	"user_id" : The internal SkyPrep user_id (unique) //OR
	"user_email" : "The users email",
	"course_id" : "8781"
}

#sample response 
{
	"status" : "passed"	
}



Add Courses or Learning Paths to the Catalog

Add courses or learning paths to the catalog. Also, be able to restrict the catalog access for the course and learning path by user group.

POST https://api.skyprep.io/admin/api/add_course_or_learning_path_to_catalog
course_ids:
integers comma-seperated IDs of the courses to add to the catalog
learning_path_ids:
integers comma-seperated IDs of the learning paths to add to the catalog
user_group_ids:
integers comma-seperated IDs of the user groups to restrict the above courses or learning paths to
				
					POST https://api.skyprep.io/admin/api/add_course_or_learning_path_to_catalog

					#sample parameters
					{
						"course_ids" : "90210, 55555",
						"learning_path_ids" : "33162, 60606",
						"user_group_ids" "77070, 84060"
					}

					#sample response 
					{
						"message" : "success"
					}
				
			

Remove Course or Learning Path from the Catalog

Remove a course or a learning path from the catalog. This will effectively also remove visibility from the user groups that the course or learning path was restricted to.

POST https://api.skyprep.io/admin/api/remove_course_or_learning_path_from_catalog
course_id:
integer ID of the course to remove from the catalog
learning_path_id:
integer ID of the learning path to remove from the catalog

	POST https://api.skyprep.io/admin/api/remove_course_or_learning_path_from_catalog

	#sample parameters
	{
		"course_id" : "55555" //AND/OR
		"learning_path_id" : "66890"
	}

	#sample response 
	{
		"message" : "success"
	}

			

Update Courses or Learning Paths Enrollments from the Catalog

POST https://api.skyprep.io/admin/api/update_catalog_enrollments
course_id:
integers ID of the course to add to the catalog
available_to_all_users:
boolean This option only relates to the course_id above. If this is set to true, then the course above would be made available to everyone in the platform through the course catalog.
learning_path_id:
integers ID of the learning path to add to the catalog
user_group_ids:
integers comma-seperated IDs of the user groups to restrict the above courses or learning paths to
				
					POST https://api.skyprep.io/admin/api/update_catalog_enrollments

					#sample parameters
					{
						"course_id" : "90210, 55555",
						"learning_path_id" : "33162, 60606",
						"user_group_ids" "77070, 84060"
					}

					#sample response 
					{
						"message" : "success"
					}
				
			

User Groups

The SkyPrep API lets you add, update and delete user groups.

User Groups

User Groups (i.e. Groups) are collections of users and collections of courses. A user who is enrolled into a user group has access to all the courses the user group has part of it.

GET https://api.skyprep.io/admin/api/get_user_groups



Get a User Group

Get a User Group and list of all of its users.

GET https://api.skyprep.io/admin/api/get_user_group

user_group_id
integer (required) The ID of the user group

	#sample parameters 
	{
		"user_group_id" : "6401"
	}

	#sample response 
	{
		"name" : "My Course",
		"users" : [
			//List of Users
		]
	}

			

Create a User Group

User Groups (learners, admins, managers) can be created through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/create_user_group
name
string (required) The name of the user group
course_ids
string Comma separated IDs of courses that this user group should have access to
user_ids
string Comma separated IDs of users that should be members of this group.
subscribe_key
string A password that users will need to enter in order to register to the group if enrolling via the web registration URL.
user_group_id
integer The user group ID that this user group belongs to.
				
					POST https://api.skyprep.io/admin/api/create_user_group

					#sample parameters
					{
						"name" : 'Sales Team',
						"course_ids" : "693,431,6090",
						"user_ids" : "352,454,5553"
					}

					#sample response
					{
						"id" : "123",
						"name" : "Sales Team"
						....
					}
				
			

Update a User Group

Update a User Group

POST https://api.skyprep.io/admin/api/update_user_group

name
string (required) The name of the user group
description
string The description of the user group
subscribe_key
string A password that users will need to enter in order to register to the group if enrolling via the web registration URL.
user_group_id
integer (required) The user group ID that this user group belongs to.
				
			

Delete a User Group

Delete a User Group

POST https://api.skyprep.io/admin/api/destroy_user_group

				
					POST https://api.skyprep.io/admin/api/destroy_user_group

					#sample parameters
{
						"user_group_id" : "6612"
					}

					#sample response 
					{
						"message" : "success"
					}
				
			

Enroll a User into a User Group

POST https://api.skyprep.io/admin/api/enroll_user_in_user_group
user_id
integer (required) The ID of the user
user_group_id
integer(required) The ID of the user group
user_group_enrollment_expiration_date
datetime or string The date the user group enrollment will expire

POST https://api.skyprep.io/admin/api/enroll_user_in_user_group

#sample parameters
{
	"user_id" : The internal SkyPrep user_id (unique) //OR
	"user_email" : "The users email"
}

#sample response 
{
	"message" : "success"	
}



Remove a User from a User Group

POST https://api.skyprep.io/admin/api/remove_user_from_user_group
user_id
integer (required) The ID of the user
user_group_id
integer(required) The ID of the user group

POST https://api.skyprep.io/admin/api/remove_user_from_user_group

#sample parameters
{
	"user_id" : "212",
	"user_group_id" : "7633"
}

#sample response

{
	"message" : "success"	
}




Get List of User Groups for a User

Get a list of the groups a user belongs to.

GET https://api.skyprep.io/admin/api/get_user_group_enrollments_for_user
user_id (or user_email ):
integer / string The internal ID of the user (this cannot be changed) OR the users email.

GET https://api.skyprep.io/admin/api/get_user

#sample parameters 
{
	"user_id" : The internal SkyPrep user_id (unique) //OR
	"user_email" : "The users email"
}

#sample response 
[
	{
		"id" : "1234",
		"name" : "Marketing Group",
		...
	},
	{
		"id" : 4512,
		"name" : "Sales Group",
		...
	},
	...
]




Add a Course into a User Group

POST https://api.skyprep.io/admin/api/add_course_to_user_group
course_id
integer (required) The ID of the course
user_group_id
integer(required) The ID of the user group
end_date
datetime or string The last day this course is part of this group
				
POST https://api.skyprep.io/admin/api/add_course_to_user_group

#sample parameters
{
	"user_group_id" : "1821",
	"course_id" : "123123"
}

#sample response
{
	"message" : "success"
}
				
			

Remove a Course from a User Group

POST https://api.skyprep.io/admin/api/remove_course_from_user_group
course_id
integer (required) The ID of the course
user_group_id
integer(required) The ID of the user group
				
					POST https://api.skyprep.io/admin/api/remove_course_from_course_group

					#sample parameters
{
						"course_id" : The internal SkyPrep course id (unique) //OR
						"user_group_id" : "The internal SkyPrep user_group_id"
					}

					#sample response 
					{
						"message" : "success"	
					}
				
			

Learning Paths

The SkyPrep API lets you add, update and delete learning paths.

Get All Learning Paths

GET https://api.skyprep.io/admin/api/get_learning_paths

				
			

Get a Learning Path

Get a Learning Path.

GET https://api.skyprep.io/admin/api/get_learning_path

learning_path_id
integer (required) The ID of the learning path
				
					#sample parameters
{
						"learning_path_id" : "6401"
					}

					#sample response 
					{
						"name" : "My Learning Path",
						"description" : "Learning Path Description"
					}
				
			

Create a Learning Path

Learning Paths along with course and user enrollments can be created through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/create_learning_path
name
string (required) The name of the learning path
description
string The description of the learning path
course_ids
string Comma separated IDs of courses that should be added to this learning path
user_ids
string Comma separated IDs of users that should be members of this learning path
user_group_ids
string Comma separated IDs of groups that should be added to this learning path
				
					POST https://api.skyprep.io/admin/api/create_learning_path

					#sample parameters
{
						"name" : 'Management 101',
						"description" : "How to be successful in managing your team"
						"course_ids" : "693,431,6090",
						"user_ids" : "352,454,5553",
						"user_group_ids" : "111, 222, 333"
					}

					#sample response
					{
						"id" : "123",
						"name" : "Management 101"
						....	
					}
				
			

Update a Learning Path

Update a Learning Path

POST https://api.skyprep.io/admin/api/update_learning_path

learning_path_id
integer (required) The id of the learning path
name
string The name of the learning path
description
string The description of the learning path
				
					POST https://api.skyprep.io/admin/api/update_learning_path

					#sample parameters
{
						"learning_path_id" : "1234",
						"name" : "New Learning Path Name",
						"description" : "New Learning Path Description"
					}

					#sample response
					{
						"message" : "success"
					}
				
			

Delete a Learning Path

Delete a Learning Path

** Please note: This is an irreversible action. Please exercise caution when using this route. **

POST https://api.skyprep.io/admin/api/destroy_learning_path

learning_path_id
integer (required) The id of the learning path
				
					POST https://api.skyprep.io/admin/api/destroy_learning_path

					#sample parameters
{
						"learning_path_id" : "6612"
					}

					#sample response 
					{
						"message" : "success"
					}
				
			

Add a Course into a Learning Path

POST https://api.skyprep.io/admin/api/add_course_to_learning_path
course_id
integer (required) The ID of the course
learning_path_id
integer(required) The ID of the learning path
end_date
datetime or string The last day this course is part of this learning path
				
					POST https://api.skyprep.io/admin/api/add_course_to_learning_path

					#sample parameters
{
						"learning_path_id" : "1821",
						"course_id" : "123123"
					}

					#sample response
					{
						"message" : "success"
					}
				
			

Remove a Course from a Learning Path

POST https://api.skyprep.io/admin/api/remove_course_from_learning_path
course_id
integer (required) The ID of the course
learning_path_id
integer(required) The ID of the learning path
				
					POST https://api.skyprep.io/admin/api/remove_course_from_learning_path

					#sample parameters
{
						"course_id" : The internal SkyPrep course id (unique)
						"learning_path_id" : "The internal SkyPrep learning_path_id"
					}

					#sample response 
					{
						"message" : "success"	
					}
				
			

Add a Group into a Learning Path

POST https://api.skyprep.io/admin/api/add_group_to_learning_path
user_group_id
integer (required) The ID of the Group
learning_path_id
integer(required) The ID of the learning path
				
					POST https://api.skyprep.io/admin/api/add_group_to_learning_path

					#sample parameters
{
						"learning_path_id" : "1821",
						"user_group_id" : "123123"
					}

					#sample response
					{
						"message" : "success"
					}
				
			

Remove a Group from a Learning Path

POST https://api.skyprep.io/admin/api/remove_group_from_learning_path
user_group_id
integer (required) The ID of the Group
learning_path_id
integer (required) The ID of the learning path
				
					POST https://api.skyprep.io/admin/api/remove_group_from_course_group

					#sample parameters
{
						"user_group_id" : The internal SkyPrep group id (unique)
						"learning_path_id" : "The internal SkyPrep learning_path_id"
					}

					#sample response 
					{
						"message" : "success"	
					}
				
			

Instructor Led Trainings

The SkyPrep API lets you add, update and delete instructor led trainings.

Get All Instructor Led Trainings

GET https://api.skyprep.io/admin/api/get_instructor_led_trainings

				
			

Get a Instructor Led Training

Get a Instructor Led Training.

GET https://api.skyprep.io/admin/api/get_instructor_led_training

instructor_led_training_id
integer (required) The ID of the Instructor Led Training
include_courses
boolean Will return the courses that the Instructor Led Training is associated with
				
					#sample parameters
{
						"instructor_led_training_id" : "543"
					}

					#sample response 
					{
						"name" : "My Instructor Led Training",
						"description" : "Instructor Led Training Description"
					}
				
			

Get a Instructor Led Training Timeslot

Get a Instructor Led Training Timeslot.

GET https://api.skyprep.io/admin/api/get_instructor_led_training_timeslot

instructor_led_training_timeslot_id
integer (required) The ID of the Instructor Led Training Timeslot
				
					#sample parameters
{
						"instructor_led_training_timeslot_id" : "555"
					}

					#sample response 
					{
						"description" : "Instructor Led Training Timeslot Description",
						"location" : "Location of Timeslot",
						"instructor" : "Instructor Name"
					}
				
			

Get Instructor Led Training Timeslots

Get a collection of Instructor Led Training Timeslots.

GET https://api.skyprep.io/admin/api/get_instructor_led_training_timeslots

start_date
datetime The start date of the Instructor Led Training Timeslot
end_date
datetime The end date of the Instructor Led Training Timeslot
				
					#sample parameters
{
						"start_date" : "2020-01-01",
						"end_date" : "2020-02-01"
					}

					#sample response 
					{
						"description" : "Instructor Led Training Timeslot Description",
						"location" : "Location of Timeslot",
						"instructor" : "Instructor Name"
					}
				
			

Create a Instructor Led Training Timeslot

Instructor Led Training Timeslot can be created through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/create_instructor_led_training_timeslot
instructor_led_training_id
integer (required) The ID of the Instructor Led Training
description
string (required) The description for the Instructor Led Training Timeslot
display_timezone
string (required) The timezone that the session time is held in
commencement_time
string (required) The time the timeslot starts
end_time
string (required) The time the timeslot session ends
capacity
integer (required) The number of seats available in this timeslot
location
string The location of the timeslot
instructor
string The instructor that is leading the session
				
					POST https://api.skyprep.io/admin/api/create_instructor_led_training_timeslot

					#sample parameters
{
						"instructor_led_training_id" : '555',
						"display_timezone" : "UTC",
						"description" : "Some description",
						"capacity" : "555"
					}

					#response {
						"id" : "666",
						"capacity" : '555',
						"display_timezone" : "UTC",
						"description" : "Some description"
					}

				
			

Update a Instructor Led Training Timeslot

Instructor Led Training Timeslot can be updated through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/update_instructor_led_training_timeslot
instructor_led_training_timeslot_id
integer (required) The ID of the Instructor Led Training Timeslot
description
string (required) The description for the Instructor Led Training Timeslot
display_timezone
string (required) The timezone that the session time is held in
commencement_time
string (required) The time the timeslot starts
end_time
string (required) The time the timeslot session ends
capacity
integer (required) The number of seats available in this timeslot
location
string The location of the timeslot
instructor
string The instructor that is leading the session
				
					POST https://api.skyprep.io/admin/api/update_instructor_led_training_timeslot

					#sample parameters
{
						"instructor_led_training_timeslot_id" : '111',
						"display_timezone" : "UTC",
						"description" : "Some description",
						"capacity" : "555"
					}

					#response {
						"id" : "111",
						"capacity" : '555',
						"display_timezone" : "UTC",
						"description" : "Some description"
					}

				
			

Delete Instructor Led Training Timeslot

Delete Instructor Led Training Timeslot

** Please note: This is an irreversible action. Please exercise caution when using this route. **

POST https://api.skyprep.io/admin/api/delete_instructor_led_training_timeslot

instructor_led_training_timeslot_id
string (required) ID of instructor led training timeslot
				
					POST https://api.skyprep.io/admin/api/delete_instructor_led_training_timeslot

					#sample parameters
{
						"instructor_led_training_timeslot_id" : "6612"
					}

					#sample response 
					{
						"message" : "success"
					}
				
			

Get Instructor Led Training Timeslot Registrations

Get Instructor Led Training Timeslot Registrations.

GET https://api.skyprep.io/admin/api/get_instructor_led_training_timeslot_registrations

instructor_led_training_timeslot_id
integer (required) The ID of the Instructor Led Training Timeslot
				
					#sample parameters
{
						"instructor_led_training_timeslot_id" : "555"
					}

					#sample response 
					{
						"description" : "Instructor Led Training Timeslot Description",
						"location" : "Location of Timeslot",
						"instructor" : "Instructor Name"
					}
				
			

Create a Instructor Led Training Timeslot Registration

Instructor Led Training Timeslot Registrations can be created through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/create_instructor_led_training_timeslot_registrations
instructor_led_training_timeslot_id
integer (required) The ID of the Instructor Led Training Timeslot
user_id
integer (required) The ID of the user
course_progress_id
integer The ID of the course progress for the user you would like to add
course_id
integer The ID of the course this Instructor Led Training is part of
status
string Status that you would like to set the user to. By default, the status is set to pending. Other statuses are either "attended" or "absent"
				
					POST https://api.skyprep.io/admin/api/create_instructor_led_training_timeslot_registrations

					#sample parameters
{
						"instructor_led_training_timeslot_id" : '555',
						"user_id" : "111"
						"course_progress_id" : "444",
						"course_id" : "333",
						"status" : "attended"
					}

					#sample response
					{
						"id" : "666",
						"status" : "attended",
						"user_id" : "111"
						....	
					}
				
			

Delete Instructor Led Training Timeslot Registrations

Delete Instructor Led Training Timeslot Registrations

** Please note: This is an irreversible action. Please exercise caution when using this route. **

POST https://api.skyprep.io/admin/api/destroy_instructor_led_training_timeslot_registrations

instructor_led_training_timeslot_registration_ids
string (required) Comma separated IDs of instructor led training timeslot registrations
				
					POST https://api.skyprep.io/admin/api/destroy_instructor_led_training_timeslot_registrations

					#sample parameters
{
						"instructor_led_training_timeslot_registration_ids" : "6612, 4124, 6578"
					}

					#sample response 
					{
						"message" : "success"
					}
				
			

Update a Instructor Led Training Timeslot Registration

Update a Instructor Led Training Timeslot Registration

POST https://api.skyprep.io/admin/api/update_instructor_led_training_timeslot_registration

instructor_led_training_timeslot_registration_id
integer (required) ID of instructor led training timeslot registration
status
string (required) Status that you would like to set the user to. By default, the status is set to pending. Other statuses are either "attended" or "absent"
				
					POST https://api.skyprep.io/admin/api/update_instructor_led_training_timeslot_registration

					#sample parameters
{
						"instructor_led_training_timeslot_registration_id" : "6612",
						"status" : "attended"
					}

					#sample response 
					{
						"instructor_led_training_timeslot_registration_id" : "6612",
						"status" : "attended"
						...
					}
				
			

Course Progresses

The SkyPrep API lets you update and delete a user's course progress in a course.

Get All Course Progresses for a Single Course

GET https://api.skyprep.io/admin/api/get_course_progresses
course_id
integer (required) The ID of the course
course_ids
integer The IDs of the courses (comma separated)
user_id
integer The ID of the user
user_ids
integer The IDs of the users (comma separated)
active_courses_only
boolean Shows only the course progresses where the course is active
enrolled
boolean Shows only the course progresses where the user is currently enrolled
user_login_status
string active, inactive or disabled (comma separated)
status
string passed, failed, not-started or in-progress (comma separated)
days_until_deadline_greater_than
integer Shows only the course progresses where the number of days until the deadline is great than this number
days_until_deadline_less_than
integer Shows only the course progresses where the number of days until the deadline date is less than this number
completion_date_greater_than
integer Shows only the course progresses where the completion date is after this date
completion_date_less_than
integer Shows only the course progresses where the completion date is before this date
per_page
integer (default: not set) The number of course progresses to return per page. Note: Pagination will not work if used with: days_until_deadline_greater_than, days_until_deadline_less_than, completion_date_greater_than, or completion_date_less_than.
page
integer (default: not set) The page when paginating. Use this along with per_page if there are many records or API requests are timing out.
				
					GET https://api.skyprep.io/admin/api/get_course_progresses

					#sample parameters
{
						"course_id" : "8812"
					}

					#sample response 
					[
						{
							"id": 21869068,
							"status": "passed",
							"days_until_deadline": null,
							"created_at": "2020-03-21T12:02:11.000Z",
							"updated_at": "2021-04-08T22:36:07.000Z",
							"skip_prerequisites": false,
							"course_id": 50606,
							"course_name": "General Test Course",
							"user_id": 590142,
							"user_email": "[email protected]",
							"commencement_date": null,
							"completion_date": "2020-11-06T00:40:18.000Z",
							"last_course_item_id": null,
							"percent_viewed": 0,
							"expiration_date": null,
							"expired": false,
							"access_date": null,
							"deadline_date": null,
							"override_dates": false,
							"real_end_date": null,
							"real_start_date": null,
							"certificate_view_link": "https://sampleapi.skyprepapp.com/certificates/show?course_progress_id=21869068&f=pdf",
							"computed_deadline_date": null,
							"formatted_commencement_date": "",
							"formatted_completion_date": "06-Nov 2020",
							"formatted_expiration_date": "",
							"formatted_access_date": "",
							"formatted_deadline_date": "",
							"formatted_real_end_date": "",
							"formatted_real_start_date": "",
							"formatted_computed_deadline_date": ""
						}
					]	
	
			

Get a Course Progress

Get a Course Progress

GET https://api.skyprep.io/admin/api/get_course_progress
user_id
integer (required) The ID of the user
course_id
integer (required The ID of the course
OR course_progress_id
integer (required The ID of the course progress
				
					GET https://api.skyprep.io/admin/api/get_course_progress

					#sample parameters
{
						"course_progress_id" : "96854"
					}

					#sample response
						{
							"id": 21869068,
							"status": "passed",
							"days_until_deadline": null,
							"created_at": "2020-03-21T12:02:11.000Z",
							"updated_at": "2021-04-08T22:36:07.000Z",
							"skip_prerequisites": false,
							"course_id": 50606,
							"course_name": "General Test Course",
							"user_id": 590142,
							"user_email": "[email protected]",
							"commencement_date": null,
							"completion_date": "2020-11-06T00:40:18.000Z",
							"last_course_item_id": null,
							"percent_viewed": 0,
							"expiration_date": null,
							"expired": false,
							"access_date": null,
							"deadline_date": null,
							"override_dates": false,
							"real_end_date": null,
							"real_start_date": null,
							"certificate_view_link": "https://sampleapi.skyprepapp.com/certificates/show?course_progress_id=21869068&f=pdf",
							"computed_deadline_date": null,
							"formatted_commencement_date": "",
							"formatted_completion_date": "06-Nov 2020",
							"formatted_expiration_date": "",
							"formatted_access_date": "",
							"formatted_deadline_date": "",
							"formatted_real_end_date": "",
							"formatted_real_start_date": "",
							"formatted_computed_deadline_date": ""
						}
				
			

Update a Course Progress

Updates a Course Progress

POST https://api.skyprep.io/admin/api/update_course_progress
course_progress_id
integer (required) The ID of the course progress
completion_date
datetime The completion date
set_status
string One of passed, failed, in-progress, not-applicable, not-started
      
      POST https://api.skyprep.io/admin/api/update_course_progress

      #sample parameters
{
      	"course_progress_id" : "96854",
      	"set_status" : "failed"
      }

      #sample response
{
      	"message" : "success"
      }


      
      

Delete a Course Progress

Delete a Course Progress Permanentely from the System

POST https://api.skyprep.io/admin/api/destroy_course_progress
course_progress_id:
integer (required) The internal SkyPrep ID of the coures_progress

POST https://api.skyprep.io/admin/api/destroy_course_progress

#sample parameters
{
	"course_progress_id" : "96854"
}

#sample response 
{
	"message" : "success"
}



Get Progress of a Course Item for a Single User

Get the progress of a course item for a user.
This call requires some combination of exam_id, user_id, course_id, course_progress_id and course_item_id for the API to return the status of a users progress through a specific course_item.
For example, if you specify the course_item_id and user_id, the system will figure out the course belonging to the course_item, get the course_progress of the user in that course, and then get the course_item_progress of that course_progress.
Another example. If you specify the exam_id and course_progress_id, the system will find the course_progress, figure out the user and the course, and find the first course item in that course that matches that has that exam as its exam_id, and return the users course_item progress for that course_item.

GET https://api.skyprep.io/admin/api/get_course_item_progress
user_id
integer The ID of the user
course_id
integer The ID of the course
course_item_id
integer The ID of the course item
exam_id
integer The ID of the exam
course_progress_id
integer The ID of the course progress

GET https://api.skyprep.io/admin/api/get_course_item_progress

#sample parameters
{
  "course_id" : "1234",
  "user_id" : "5223",
  "course_item_id" : "5231",
}

#sample response
{
  "message" : "success"
}


Set Course Item Progress

Set the Progress for a course item for a user in a course

POST https://api.skyprep.io/admin/api/set_course_item_progress
course_id
integer (required) The ID of the course
user_id
integer (required) The ID of the user
OR
------
course_progress_id
integer The ID of the course progress
course_item_id
The ID of the course item 1
set_status
The status to set to (passed, failed, in-progress, not-started
score
The score to set to
time
The time to set to
completion_date
The date that item was completed
      
      POST https://api.skyprep.io/admin/api/set_course_item_progress

      #sample parameters
{
      	"user_id" : "124112",
      	"set_status" : "failed"
      }

      #sample response
{
      	"message" : "success"
      }


      
      

Reports

The SkyPrep API lets you generate reports (in CSV and XLSX).

Get a Report

Reports can be generated by passing in a report_type parameter as well as additional parameters required for the report (e.g. user_id, course_id, exam_id etc).

POST https://api.skyprep.io/admin/api/get_report
format:
One of
csv (default)
xlsx
report_type:
string (required) One of
all_users
all_courses
single_user
single_course
single_user_single_course
single_user_single_group
single_group_all_users
single_group_all_courses
single_exam

GET https://api.skyprep.io/admin/api/get_report

#sample parameters
{
	"report_type" : "single_course_single_user",
	"user_id" : "41",
	"course_id" : "88"
}


Generate a Report Asynchronously

Reports can be generated by passing in a report_type parameter as well as additional parameters required for the report (e.g. user_id, course_id, exam_id etc).

A status_url is returned that you can visit to get the status and data of the report (when it is ready).

POST https://api.skyprep.io/admin/api/generate_async_report
format:
One of
csv (default)
xlsx
report_type:
string (required) One of
all_users
all_courses
single_user
single_course
single_user_single_course
single_user_single_group
single_group_all_users
single_group_all_courses
single_exam

GET https://api.skyprep.io/admin/api/generate_async_report

#sample parameters 
{
	"report_type" : "all_users",
	"format" : "csv"
}

#sample response 
{
	"status_url" : "https://api.skyprepapp.com/admin/api/get_async_report?report_id=1234"
}


Get Saved Advanced Reports

Gets a collection of reports generated via the Advanced Reporting section of the LMS.

POST https://api.skyprep.io/admin/api/get_saved_advanced_reports
start_date
datetime The date to start from (defaults to 72 hours ago)
end_date
datetime The date to end to (defaults to right now)

GET https://api.skyprep.io/admin/api/get_saved_advanced_reports

#sample response
[
    {
        "created_at": "2020-01-01T07:03:59.000-05:00",
        "created_at_int": 1577880239,
        "updated_at": "2020-01-01T07:03:59.000-05:00",
        "updated_at_int": 1620776201,
        "id": 14166,
        "saved_advanced_report_id": 14116,
        "model_type": "saved_advanced_report",
        "xlsx_url": "https://yourdomain.skyprepapp.com/admin/advanced_reports/download/?file_format=xlsx&saved_advanced_report_id=14166",
        "csv_url": "https://yourdomain.skyprepapp.com/admin/advanced_reports/download/?file_format=csv&saved_advanced_report_id=14166",
        "report_params_digest": "f49958cacf188d6531b17b42783e3192a37d348dea7490dd326d1139e901a3e6",
        "saved_report_type": "saved_report_with_data",
        "name": "All Course Progresses Report",
        ...
    },
    ...

]


Get a Saved Advanced Report

Gets a collection of reports generated via the Advanced Reporting section of the LMS.

POST https://api.skyprep.io/admin/api/get_saved_advanced_report
saved_advanced_report_id
integer The ID of the saved advanced_report
format
string The format to get the report (json, csv or xlsx, defaults to: json)

GET https://api.skyprep.io/admin/api/get_saved_advanced_report

#sample parameters

{
	"saved_advanced_report_id" : "14166",
	"format" : "csv"
}

#sample response

 # The report (in CSV format)


Gamification

The SkyPrep API lets you get user balances and create gamification transactions to assign points to a user.

Get a Users Gamification Balance

Get Users Gamification Balance.

GET https://api.skyprep.io/admin/api/get_user_gamification_balance

user_id (or email)
integer / string (required) The internal ID of the user OR the users email
				
					#sample parameters 
					{
						"email" : "[email protected]"
					}

					#sample response 
					{
						"gamification_balance" : 700
					}
				
			

Create a Gamification Transaction for a User

Gamification Transaction for a User can be created through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/create_gamification_transaction
user_id
integer (required) The ID of the user
amount
integer (required) The amount to add or deduct from their gamification balance
description
string A description for this transaction
				
					POST https://api.skyprep.io/admin/api/create_gamification_transaction

					#sample parameters
{
						"user_id" : 12345,
						"amount" : -200,
						"description" : "Deduct points for spending on another platform"
					}

					#sample response

					{
						"id": 5678,
						"user_id": 12345,
						"amount": 200,
						"description": "Deduct points for spending on another platform",
						"balance": 900,
						"unique_transaction_id": "ebbb00e005dcbd439894d86b7fcf8eeb94c1f66e11c66843fb4bda1bd154159f",
					}
				
			

Performance Tracking

The SkyPrep API lets you get user skill balances and competencies achieved, and create skill transactions to assign points to a user.

Get All Skills

Get a summary of all the skills

GET https://api.skyprep.io/admin/api/get_skills

GET https://api.skyprep.io/admin/api/get_skills

#sample response 
[
  {
    "display_name": "Excel Proficiency",
    "name": "excel proficiency",
    "id": 1234,
    "description": "Being proficient in Microsoft Excel",
    "competency_count": 5
  },
  {
    "display_name": "Professional Communication",
    "name": "professional communication",
    "id": 5213,
    "description": "Ability to communicate with coworkers and customers",
    "competency_count": 1
  },
  ...
]

Get Skill

Get details of a skill

GET https://api.skyprep.io/admin/api/get_skill
skill_id
integer / string (required) The ID of the skill
start_date
A date The date for skills acquired by users after this date (optional)
end_date
A date The date for skills acquired by users before this date (optional)

GET https://api.skyprep.io/admin/api/get_skill


#sample parameters
{	
	"skill_id" : 1555,
}


#sample response 
{
    "display_name": "Excel Proficiency",
    "name": "excel proficiency",
    "id": 15555,
    "description": "",
    "competency_count": 0,
    "details": {
        "course_count": 5,
        "assessment_count": 2,
        "checklist_count": 12,
        "users_acquired_count": 2,
        "competency_count": 0,
        "leaderboard": [
            {
                "user_id": 22,
                "user_display_name": "James Butler",
                "balance": 258
            }
            {
                "user_id": 11,
                "user_display_name": "Scottie Lowry",
                "balance": 190
            }


        ],
        "learning_path_count": 0
    }
}


Get User Skills & Competencies

Get all the skill balances for a particular user. This will also include competencies they have achieved.

GET https://api.skyprep.io/admin/api/get_user_skill_balances_and_competencies

user_id (or email)
integer / string (required) The internal ID of the user OR the users email
				

					POST https://api.skyprep.io/admin/api/get_user_skill_balances_and_competencies


					#sample parameters 
					{
						"email" : "[email protected]"
					}

					#sample response
					{
						"user_email" : "[email protected]",
						"user_id" : 54321,
						"skill_balances" :  [
							{
							 "skill_id": 1555,
							 "skill_name": "Professional Communication",
							 "balance" : 1500
							},
							{
							 "skill_id": 1132,
							 "skill_name": "Excel Proficiency",
							 "balance" : 3000
							}
						],
						"competencies_achived" : []
					}
				
			

Create a Skill Transaction for a User

Skill Transactions for a User can be created through the API by passing in these parameters

POST https://api.skyprep.io/admin/api/create_skill_transaction
skill_id
integer (required) The ID of the skill
user_id
integer (required) The ID of the user
amount
integer (required) The amount to add or deduct from their skill balance
				
					POST https://api.skyprep.io/admin/api/create_skill_transaction

					#sample parameters
					{	
						"skill_id" : 1555,
						"user_id" : 12345,
						"amount" : 200,
					}

					#sample response

					[
						{
						 "skill_id": 1555,
						 "skill_name": "Professional Communication",
						 "balance" : 1700
						},
						...
					]
				
			

Get All Competencies

Get a summary of all the competencies

POST https://api.skyprep.io/admin/api/get_competencies

POST https://api.skyprep.io/admin/api/get_competencies

#sample response 
[
    {
        "display_name": "Microsoft Office Basics",
        "name": "excel advanced",
        "id": 32,
        "description": "Basic Proficiency of Microsoft Office tools",
        "skills": [
            {
                "display_name": "Excel",
                "name": "excel",
                "id": 1101,
                "description": "Excel Proficiency",
                "competency_count": 1,
                "points": 500
            },

            {
                "display_name": "Word",
                "name": "word",
                "id": 124,
                "description": "Word Proficiency",
                "competency_count": 1,
                "points": 500
            },

            {
                "display_name": "PowerPoint",
                "name": "powerpoint",
                "id": 312,
                "description": "PowerPoint Proficiency",
                "competency_count": 1,
                "points": 500
            }

        ]
    },

    ...

]

Get Competency

Get details of a competency

GET https://api.skyprep.io/admin/api/get_competency
competency_id
integer / string (required) The ID of the competency
start_date
A date The date for competencies achieved by users after this date (optional)
end_date
A date The date for competencies achieved by users before this date (optional)

GET https://api.skyprep.io/admin/api/get_competency

#sample parameters
{	
	"competency_id" : 32
}

#sample response 
{
	"display_name": "Figma Advanced",
	"name": "figma advanced",
	"id": 32,
	"description": "",
	"skills": [
		{
			"display_name": "Figma",
			"name": "figma",
			"id": 56,
			"description": "Figma Skill for Designers",
			"competency_count": 1,
			"points": 500
		}
	],
	"details": {
		"award_count": 0,
		"skill_count": 1,
		"activity_awards": [
			{
				"user_id" : 713,
				"user_display_name" : "John Jokic",
				"created_at" : "February 1, 2022"
			}

		] #list of people who achived the competency, including when
	}
}

Manager

The SkyPrep API lets you assign manager permissions associated to a group.

Get Manager Permissions From User Group

Get Manager Permissions From User Group.

GET https://api.skyprep.io/admin/api/get_manager_permissions_from_user_group

user_id
integer (required) The ID of the User
user_group_id
integer (required) The ID of the User Group
				
					#sample parameters
{
						"user_id" : "90210",
						"user_group_id" : "888"
					}

					#sample response 
					{
						"id" : "2006",
						"user" : {
							"id" : "2"
							"username" : "[email protected]",
							"first_name" : "Rita",
							"last_name" : "Bennett"
						},
						"can_add_users" : "true",
						"can_receive_notifications" : "true",
						"can_edit_course_progress" : "true",
						"can_remove_users" : "false",
						"can_add_exisiting_users" : "false",
						"user_group" : {
							"id" : "333",
							"name" : "Miami Metro Police Department"
						},
						"can_manage_all_group_users_courses" : "false",
						"can_add_courses_to_user_group" : "true",
						"can_remove_courses_from_user_group" : "true",
						"can_edit_user_password" : "false"
					}
				
			

Remove Manager From User Group

Remove Manager From User Group.

GET https://api.skyprep.io/admin/api/remove_manager_from_user_group

user_id
integer (required) The ID of the User
user_group_id
integer (required) The ID of the User Group
				
					#sample parameters
{
						"user_id" : "90210",
						"user_group_id" : "888"
					}

					#sample response 
					{
						"message" : "success"
					}
				
			

Assign Manager To User Group

Assign Manager To User Group.

GET https://api.skyprep.io/admin/api/assign_manager_to_user_group

user_id
integer (required) The ID of the User
user_group_id
integer (required) The ID of the User Group
can_add_users
boolean Permission to add users to the user group
can_receive_notifications
boolean Permission to receive notifications regarding users from the user group
can_edit_course_progress
boolean Permission to edit course progresses of the users in the user group
can_remove_users
boolean Permission to remove users from the user group
can_add_exisiting_users
boolean Permission to add exisitng users from the user list to the user group
can_manage_all_group_users_courses
boolean Permission to manage all courses from the user in the user group
can_add_courses_to_user_group
boolean Permission to add courses to the user group
can_remove_courses_from_user_group
boolean Permission to remove courses from the user group
can_edit_user_password
boolean Permission to edit user passwords from the user group
				
					#sample parameters
{
						"user_id" : "90210",
						"user_group_id" : "888",
						"can_add_courses_to_user_group" : "0",
						"can_remove_courses_from_user_group" : "0",
					}

					#sample response 
					{
						"id" : "2006",
						"user" : {
							"id" : "2"
							"username" : "[email protected]",
							"first_name" : "Rita",
							"last_name" : "Bennett"
						},
						"can_add_users" : "true",
						"can_receive_notifications" : "true",
						"can_edit_course_progress" : "true",
						"can_remove_users" : "false",
						"can_add_exisiting_users" : "false",
						"user_group" : {
							"id" : "333",
							"name" : "Miami Metro Police Department"
						},
						"can_manage_all_group_users_courses" : "false",
						"can_add_courses_to_user_group" : "false",
						"can_remove_courses_from_user_group" : "false",
						"can_edit_user_password" : "false"
					}
				
			

Update Manager Permissions In User Group

Update Manager Permissions In User Group.

GET https://api.skyprep.io/admin/api/update_manager_permissions_in_user_group

user_id
integer (required) The ID of the User
user_group_id
integer (required) The ID of the User Group
can_add_users
boolean Permission to add users to the user group
can_receive_notifications
boolean Permission to receive notifications regarding users from the user group
can_edit_course_progress
boolean Permission to edit course progresses of the users in the user group
can_remove_users
boolean Permission to remove users from the user group
can_add_exisiting_users
boolean Permission to add exisitng users from the user list to the user group
can_manage_all_group_users_courses
boolean Permission to manage all courses from the user in the user group
can_add_courses_to_user_group
boolean Permission to add courses to the user group
can_remove_courses_from_user_group
boolean Permission to remove courses from the user group
can_edit_user_password
boolean Permission to edit user passwords from the user group
				
					#sample parameters
{
						"user_id" : "90210",
						"user_group_id" : "888"
						"can_add_courses_to_user_group" : "0",
						"can_remove_courses_from_user_group" : "0",
					}

					#sample response 
					{
						"id" : "2006",
						"user" : {
							"id" : "2"
							"username" : "[email protected]",
							"first_name" : "Rita",
							"last_name" : "Bennett"
						},
						"can_add_users" : "true",
						"can_receive_notifications" : "true",
						"can_edit_course_progress" : "true",
						"can_remove_users" : "false",
						"can_add_exisiting_users" : "false",
						"user_group" : {
							"id" : "333",
							"name" : "Miami Metro Police Department"
						},
						"can_manage_all_group_users_courses" : "false",
						"can_add_courses_to_user_group" : "false",
						"can_remove_courses_from_user_group" : "false",
						"can_edit_user_password" : "false"
					}
				
			

Your SkyPrep Account

The SkyPrep API lets you update your SkyPrep account.

Account

Your SkyPrep account information.

GET https://api.skyprep.io/admin/api/get_program

GET https://api.skyprep.io/admin/api/get_program

#sample response
{
	"acct_key" : "myapp.skyprepapp.com",
	"name" : "Your SkyPrep Training Program",
	//More JSON data

	
}



Get System Data

Get data/statistics about your platform

GET https://api.skyprep.io/admin/api/get_data
data_type:
string (required) One of user_count,
admin_count,
learner_count,
course_count,
user_group_count

GET https://api.skyprep.io/admin/api/get_data

#sample parameters
{
	"data_type" : "learner_count"
}

#sample response
{
	"data" : "587"
}



Content

The SkyPrep API lets you fetch your content.

Get Materials

Get All materials in your platform

GET https://api.skyprep.io/admin/api/get_materials

GET https://api.skyprep.io/admin/api/get_materials

#sample response 
[
 {
 	//Material 1
 },
 {
 	//Material 2
 }
]



Payments

The SkyPrep API lets you fetch payment details for courses you sell via SkyPrep. These include payments that were made for courses you sold via Stripe or PayPal.

Get Payments

Get payment details. Records are ordered by created_at in descending order.

GET https://api.skyprep.io/admin/api/get_payments

per_page
integer (default: 100) The number of payments to return per page
page
integer (default: 1) The page when paginating
status
string (optional) The status of the payment. Either complete, unconfirmed
payment_type
string (optional) The type of payment. Either paypal or stripe
payer_email
string (optional) The email of the payer
created_after_days_ago
integer (optional) Limit the results to payment events that occured after this many days ago. For example, if you set this to 3, it will filter the results to payments created within the last 3 days.
        
          #sample parameters 
          {
            "status" : "complete",
            "created_after_days_ago" : 3,
            "payment_type" : "paypal"
          }

          #sample response 
          [
            {
              "id": 1234,
              "model_type": "payment",
              "status": "complete",
              "transaction_number": "XXXXXXXX",
              "amount": "XX.XX",
              "first_name": "XXXX",
              "last_name": "XXXX",
              "payer_email": "[email protected]",
              "latest_ipn_data": "IPN_STRING_RAW",
              "payment_type": "paypal"
              },
            {
              "id": 5678,
              "model_type": "payment",
              "status": "complete",
              "transaction_number": "XXXXXXXX",
              "amount": "XX.XX",
              "first_name": "XXXX",
              "last_name": "XXXX",
              "payer_email": "[email protected]",
              "latest_ipn_data": "IPN_STRING_RAW",
              "payment_type": "paypal"
            },
            ...
          ]