TrainingServiceRest Resource

Training

Available Since
1.6.0

POST /2.0/lms/training/create

This method has been deprecated. Use POST /lms/api/v0/trainings/ instead.

Create a Training

Available Since
1.6.0
Request Body
media type data type description
application/json TrainingApiVO (JSON)
REQUIRED

Request JSON (example):


 {
 	"code" : "TR01", // Code of Training (optional)
 	"name" : "Training name", // Name (required)
 	"status" : "AVAILABLE", // Status (required)
 	"author" : "Author", // Author (required)
 	"workload" : 1, // Workload (required)
 	"objective" : "Objective", // Objective (optional)
 	"catalogSkills": [  // CatalogSkills (optional)
 		    {
 			  "id":  192, // Skill ID (required)
 			  "minPoint": 0, // maxPoint (required)
 			  "maxPoint": 100 // minPoint (required)
 		    }
 		  ],
 	"preExamId" : 191, // Pre-test, assessment version id (optional)
 	"approvePreExam" : false, // Flag to approve on PreExam (optional)
 	"scoreApprovePreExam" : 75.00, // Score to Approve on PreExame (optional)
 	"reprovePreExam" : false, // Flag to reprove on PreExam (optional)
 	"scoreReprovePreExam" : 40.00,  // Score to Reprove on PreExame (optional)
 	"requiredPreExam" : false, // Flag to required PreExam (optional)
 	"contents": [  // Defines the training contents (optional)
 		    {
 			  "contentId":  192, // Content ID (required)
 			  "mandatory": false, // Whether is mandatory to the training (optional, default is false)
 			  "order": 1, // Order that will be presented on the training execution (optional)
 			  "scormProperties": { // Key-value properties for scorm type contents (optional)
 				 "scorm.show.tree": "false", // Show the scorm tree (optional)
 				 "scorm.show.navigation": "false", // Show the navigation buttons (optional)
 				 "scorm.show.lesson_status": "false", // Show the lesson status (optional)
 				 "scorm.show.score.raw": "false", // Show the raw score (optional)
 				 "scorm.show.total_time": "false", // Show the maximum available time to watch the scorm content (optional)
 				 "scorm.show.max_time_allowed": "false", // Show the maximum available time to watch the scorm content (optional)
 				 "scorm.use.approval_criteria": "false", // Use the content as the training approved criteria (optional)
 				 "scorm.value.mastery_score": "70", //Minimum score for the user to be approved (optional)
 				 "scorm.action.time_limit_exceeded": "exit,no message", // Action when limit exceeded (optional)
 				 "scorm.allow.lesson_mode": "normal,browse,review", // Available lesson modes separated by comma. Acceptable values: normal, browse, review (optional)
 				 "scorm.value.max_time_allowed": "100" // Show max time allowed (optional)
 				 "scorm.value.min_time_allowed": "5", // Show min time allowed (optional)
 }
 		    }
 		  ],
 	"cost" : 0, // Defines the Cost of Training (required)
 	"posExamId" : 122, // Post-test, assessment version id (optional)
 	"scoreApprove" : 75.00, // Required Score to Approve (optional)
 	"reactionId" : 120, // Reaction evaluation, assessment version id (optional)
 	"allowContinue" : true, // Defines continuity in training even without pre exam correction (optional)
 	"certificateId" : 1, // Certificate (optional)
 	"programmaticContent" : "Defines Programmatic Content", // Programmatic Content (optional)
 	"targetPublic" : "Defines Target Public", // Target Public (optional)
 	"requirementsIds" : [ 111, 222, 333], // Defines the Tracks and Trainings ids that will be requirement to this Training (optional)
 	"requirementsDisciplineIds" : [444, 555, 666], // Defines the Disciplines ids that will be requirement to this Training (optional)
 	"parentId": 10, // Parent item that the folder will be created (required)
 	"inheritPermissions" : "INHERIT", // Type Inherit Permission "INHERIT" Or "NOT_INHERIT" (required)
 	"securityPermission": [  // Defines the security configurations for the training (required)
 		    {
 			  "partyId": 193, // Party ID (required)
 			  "roles": [ "READ" ] // Permission level key. Acceptable values: NONE, READ, EXECUTE, WRITE, MODIFY, REMOVE, COMPLETE (required)
 		  }
 	  ],
 	"securityRestriction": [  // Defines the security configurations for the training (required)
 		    {
 			  "partyId": 193, // Party ID (required)
 			  "roles": [ "MODIFY" ] // Restriction level key. Acceptable values: NONE, READ, EXECUTE, WRITE, MODIFY, REMOVE, COMPLETE (required)
 		  }
 	  ],
 	"imageProperties": {  // Defines images properties for the crop operation
 		 "imageName": "training_image.png", // File must already be on the learn user upload directory. Acceptable image types: JPG,JPGE,PNG,GIF
 		 "coordinateX": "0", // Set the pixel x coordinate
 		 "coordinateY": "0", // Set the pixel y coordinate
 		 "width": "500", // Set the width of the image in pixels
 		 "height": "500" // Set the height of the image in pixels
 	 },
 	"theme" : "Miscellaneous" // Training theme (optional)
 }
 
Response Body
media type data type description
application/json object (JSON)

 This method just return HTTP 200 status, Object TrainingVO
{ content: { "id" : 1, "code" : "TR01", "name" : "Training name", "status" : "AVAILABLE", "author" : "Author", "workload" : "Workload", "objective" : "Objective", "catalogSkills": [ { "id": 192, "minPoint": 0, "maxPoint": 100 } ], "preExamId" : 191, "approvePreExam" : false "scoreApprovePreExam" : 75.00 "reprovePreExam" : false "scoreReprovePreExam" : 40.00 "requiredPreExam" : false "contents": [ { "contentId": 192, "mandatory": false, "order": 1, "scormProperties": {} } ], "cost" : 0, "posExamId" : 122, "scoreApprove" : 75.00, "reactionId" : 120, "allowContinue" : true, "certificateId" : 1, "programmaticContent" : "Defines Programmatic Content", "targetPublic" : "Defines Target Public", "requirementsIds" : [ 111, 222, 333], "requirementsDisciplineIds" : [ 444, 555, 666], "parentId": 10, "securityPermission": [ { "partyId": 193, "roles": [ "READ" ] } ], "securityRestriction": [ { "partyId": 193, "roles": [ "MODIFY" ] } ], "inheritPermissions" : "INHERIT", "imageProperties": { "imageName": "training_image.png", "coordinateX": "0", "coordinateY": "0", "width": "500", "height": "500" }, "theme": "Miscellaneous" }, message: { message: "OK", detail: "OK", type: "INFO" } }
Available Since
1.6.0

POST /2.0/lms/training/edit

This method has been deprecated. Use PUT /lms/api/v0/trainings/ instead.

Edit a Training

Available Since
1.6.0
Request Body
media type data type description
application/json TrainingApiVO (JSON)
REQUIRED

Request JSON (example):


 {
 	"id" : 101, // Id of Training
 	"code" : "TR01", // Code of Training (optional)
 	"name" : "Training name", // Name (required)
 	"status" : "AVAILABLE", // Status (required)
 	"author" : "Author", // Author (required)
 	"workload" : "Workload", // Workload (required)
 	"objective" : "Objective", // Objective (optional)
 	"catalogSkills": [  // CatalogSkills (optional)
 		    {
 			  "id":  192, // Skill ID (required)
 			  "minPoint": 0, // maxPoint (required)
 			  "maxPoint": 100 // minPoint (required)
 		    }
 		  ],
 	"preExamId" : 191, // Pre-test, assessment version id (optional)
 	"approvePreExam" : false, // Flag to approve on PreExam (optional)
 	"scoreApprovePreExam" : 75.00, // Score to Approve on PreExame (optional)
 	"reprovePreExam" : false, // Flag to reprove on PreExam (optional)
 	"scoreReprovePreExam" : 40.00,  // Score to Reprove on PreExame (optional)
 	"requiredPreExam" : false, // Flag to required PreExam (optional)
 	"contents": [  // Defines the training contents (optional)
 		    {
 			  "contentId":  192, // Content ID (required)
 			  "mandatory": false, // Whether is mandatory to the training (optional, default is false)
 			  "order": 1, // Order that will be presented on the training execution (optional)
 			  "scormProperties": { // Key-value properties for scorm type contents (optional)
 				 "scorm.show.tree": "false", // Show the scorm tree (optional)
 				 "scorm.show.navigation": "false", // Show the navigation buttons (optional)
 				 "scorm.show.lesson_status": "false", // Show the lesson status (optional)
 				 "scorm.show.score.raw": "false", // Show the raw score (optional)
 				 "scorm.show.total_time": "false", // Show the maximum available time to watch the scorm content (optional)
 				 "scorm.show.max_time_allowed": "false", // Show the maximum available time to watch the scorm content (optional)
 				 "scorm.use.approval_criteria": "false", // Use the content as the training approved criteria (optional)
 				 "scorm.value.mastery_score": "70", //Minimum score for the user to be approved (optional)
 				 "scorm.action.time_limit_exceeded": "exit,no message", // Action when limit exceeded (optional)
 				 "scorm.allow.lesson_mode": "normal,browse,review", // Available lesson modes separated by comma. Acceptable values: normal, browse, review (optional)
 				 "scorm.value.max_time_allowed": "100" // Show max time allowed (optional)
 				 "scorm.value.min_time_allowed": "5", // Show min time allowed (optional)
 }
 		    }
 		  ],
 	"cost" : 0, // Defines the Cost of Training (required)
 	"posExamId" : 122, // Post-test, assessment version id (optional)
 	"scoreApprove" : 75.00, // Required Score to Approve (optional)
 	"reactionId" : 120, // Reaction evaluation, assessment version id (optional)
 	"allowContinue" : true, // Defines continuity in training even without pre exam correction (optional)
 	"certificateId" : 1, // Certificate (optional)
 	"programmaticContent" : "Defines Programmatic Content", // Programmatic Content (optional)
 	"targetPublic" : "Defines Target Public", // Target Public (optional)
 	"requirementsIds" : [ 111, 222, 333], // Defines the Tracks and Trainings ids that will be requirement to this Training (optional)
 	"requirementsDisciplineIds" : [444, 555, 666], // Defines the Disciplines ids that will be requirement to this Training (optional)
 	"parentId": 10, // Parent item that the folder will be created (required)
 	"inheritPermissions" : "INHERIT", // Type Inherit Permission "INHERIT" Or "NOT_INHERIT" (required)
 	"securityPermission": [  // Defines the security configurations for the training (required)
 		    {
 			  "partyId": 193, // Party ID (required)
 			  "roles": [ "READ" ] // Permission level key. Acceptable values: NONE, READ, EXECUTE, WRITE, MODIFY, REMOVE, COMPLETE (required)
 		  }
 	  ],
 	"securityRestriction": [  // Defines the security configurations for the training (required)
 		    {
 			  "partyId": 193, // Party ID (required)
 			  "roles": [ "MODIFY" ] // Restriction level key. Acceptable values: NONE, READ, EXECUTE, WRITE, MODIFY, REMOVE, COMPLETE (required)
 		  }
 	  ],
 	"imageProperties": {  // Defines images properties for the crop operation
 		 "imageName": "training_image.png", // File must already be on the learn user upload directory. Acceptable image types: JPG,JPGE,PNG,GIF
 		 "coordinateX": "0", // Set the pixel x coordinate
 		 "coordinateY": "0", // Set the pixel y coordinate
 		 "width": "500", // Set the width of the image in pixels
 		 "height": "500" // Set the height of the image in pixels
 	 },
 	"theme" : "Miscellaneous" // Training theme (optional)
 }
 
Response Body
media type data type description
application/json object (JSON)

 This method return HTTP 200 status, Object TrainingVO
{ content: { "id" : 101, "code" : "TR01", "name" : "Training name", "status" : "AVAILABLE", "author" : "Author", "workload" : "Workload", "objective" : "Objective", "catalogSkills": [ { "id": 192, "minPoint": 0, "maxPoint": 100 } ], "preExamId" : 191, "approvePreExam" : false "scoreApprovePreExam" : 75.00 "reprovePreExam" : false "scoreReprovePreExam" : 40.00 "requiredPreExam" : false "contents": [ { "contentId": 192, "mandatory": false, "order": 1, "scormProperties": {} } ], "cost" : 0, "posExamId" : 122, "scoreApprove" : 75.00, "reactionId" : 120, "allowContinue" : true, "certificateId" : 1, "programmaticContent" : "Defines Programmatic Content", "targetPublic" : "Defines Target Public", "requirementsIds" : [ 111, 222, 333], "requirementsDisciplineIds" : [ 444, 555, 666], "parentId": 10, "securityPermission": [ { "partyId": 193, "roles": [ "READ" ] } ], "securityRestriction": [ { "partyId": 193, "roles": [ "MODIFY" ] } ], "inheritPermissions" : "INHERIT", "imageProperties": { "imageName": "training_image.png", "coordinateX": "0", "coordinateY": "0", "width": "500", "height": "500" }, "theme": "Miscellaneous" }, message: { message: "OK", detail: "OK", type: "INFO" } }
Available Since
1.6.0

POST /2.0/lms/training/delete/{trainingId}

This method has been deprecated. Use DELETE /lms/api/v0/trainings/{trainingId} instead.

Delete a Training

Available Since
1.6.0
Request Parameters
name type description constraints
trainingId path ID Training to be removed (required) long
Response Body
media type data type
application/json object (JSON)
Available Since
1.6.0

POST /2.0/lms/training/move/{trainingId}/{destinationId}

This method has been deprecated. Use POST /lms/api/v0/trainings/move/{trainingId}/{destinationId} instead.

Move a training to another folder

Available Since
1.6.0
Request Parameters
name type description constraints
destinationId path destination folder ID (required) long
trainingId path ID training to be moved (required) long
Response Body
media type data type
application/json object (JSON)