Update tasks
Update tasks
This page provides information related to the supported endpoints for the MTM Connect IN API's import tasks. The material below provides specifications on the type of data that must be submitted as well as its format.
MTM Connect IN API performs three update tasks namely:
- Update data in MTM
- Update class status to deactivate.
- Update blended learning program status to deactivate.
Update data
Data modifications can be made using the import endpoints, if the relevant xids are included in the XML file containing the updated data. The latest MTM Connect API version is: v1. MTM Connect In API endpoint that is used to update data is given below.
/api/v{version}/Import
- Import updated information into MTM after ensuring that it complies with the terms of the client's agreed contract.
Step 1: The first step is to confirm the client's authenticity. To determine if a client can import or update data into the system, the access token of the client is reviewed. A detailed explanation of the authentication processes may be found at MTM connect API -authentication. The validity of the imported data is examined after the client's authentication.
Step 2: The size, structure, and schema of the data file must be examined to make sure they meet the business criteria regardless of whether you decide to import or update the data.
Data file formats
MTM Connect IN can support data in JSON and XML formats, while the FTP integration can support data in XML only. If you have your data in the CSV format that agrees with the business requirements, it can be converted to XML through a job and then picked up during FTP integration.
Data file size
The data can have a maximum file size of 5 MB per request and new requests can be sent every 60 minutes. The total processing time of the data received will depend on the number of requests in the queue to be imported at the time. Once your request reaches the top of the queue, on average each request is imported in 5-15 minutes, depending on file size.
Schema of the elements & attributes for import data
Please make sure that the attributes of each element that must be imported comply with its schema before producing the new data that needs to be imported into the system. If you want to import data that contains a vendor element, make sure that the vendor element's "name" property has a character limit of 50 and that its "internal" attribute has a true or false value. The Import tasks contains the whole list and explanation of the schema of the elements and attributes for import data.
In MTM Connect IN the data can be imported multiple times a day, as frequently as once an hour. The best practice is to send deltas hourly.
Schema examples
- XML file - MTM Connect IN Endpoints.xml
- JSON file- MTM Connect IN Endpoints 07-03-2023.json (The json file can be found inside a zipped folder.)
- Excel file - MTM Connect IN Endpoints and Descriptions.xlsx - (complete this with your IT team to determine what values apply to you for MTM’s required schema)
Step 3: Before choosing to change an element's attribute, be sure to read the attribute description to find out whether updates are permitted.
Example 1 - Update instructor details
For illustration, let's update the information pertaining to an instructor. To begin, examine the schema and the attributes of the Import tasks In the instructor element, updates are allowed for fname, lname, xvendor and email. Updates aren't allowed for the xid of the instructor as the xid is the identifier. Using the xid of the instructor element, other attributes of the instructor can be updated. Supposing the data in the client system has the following instructor details initially:
<instructors>
<instructor xid="INS_01" fname="Instructor" lname="01" email="Instructor01@noemail.com" xvendor="23101">
<instructor xid="INS_01" fname="Instructor" lname="01" email="Instructor01@noemail.com" xvendor="23101">
</instructor>
Use the Import data endpoint to import a new XML file with the modified attribute data to change the instructor's attributes. Send a new XML file with the changed lname and email id to the instructor whose xid is INS_01 in order to alter the instructor's lname and email.
<instructors>
<instructor xid="INS_01" fname="Instructor" lname="02" email="Instructor02@noemail.com"/>
</instructors>
The lname and the email of the instructor whose xid is INS_01 will be updated in the client system.
Example 2 - Update location details
In order to change the information relevant to a location, study the schema and the properties of the Import tasks In the location element, updates are allowed for name, to and xvendor. Updates aren't allowed for the xid of the location as the xid is the identifier. Using the xid of the location element, other attributes of the location can be updated. Supposing the data in the client system has the following location details initially:
<locations>
<location xid="LOC_01" name="Chicago, IL" to="-6" >
</locations>
Use the Import data endpoint to import a new XML file with the modified attribute data to change the instructor's attributes. Send a new XML file with the changed name and 'to' details of the location whose xid is LOC_01 in order to alter the location's name and 'to'.
<locations>
<location xid="LOC_01" name="Montreal, CA" to="-4"/>
<location xid="LOC_03" name="Chennai, IN" to="-5" >
<Certification certname="MCP" id="ImportTest_Cert1"/>
<Certification certname="MCP" id="ImportTest_Cert2"/>
</location>
</locations>
The name and the 'to' of the location whose xid is LOC_01 will be updated in the client system.To try out these endpoints, check out the MTM Connect API Swagger.
8 Reasons for data transfer failure that should be avoided:
- Request uses an unsupported file type.
- Request is above the maximum file size.
- Invalid schema.
- Class/blended learning program end date where the end date is after or equal to the start date.
- Courses that are inactive or retired.
- Instructors that are inactive.
- Class where no instructor has been assigned (self-paced web-based courses are not affected).
- Certified courses that do not contain certified instructors (or) certified locations (or) certified surveys.
Update class status to deactivate
MTM Connect In clients can deactivate the class using the deactivate method in the Class endpoint.
/api/v{version}/Classes/Deactivate
Deactivate a class based on its external ID (XID). Classes can only be deactivated, only if no data has been gathered for them. A deactivated class may only be reactivated through the MTM platform, not the API. This endpoint cannot be used to deactivate conferences.
Step 1: The first step is to verify if the client is authentic. Client's access token is validated to check if the client can request the deactivation of class from the client’s system. A detailed explanation of the authentication processes may be found at MTM connect API -authentication. After authenticating the client , the validity of the classxid is checked next.
Step 2: To deactivate the class in the client system, it is essential to provide the classxid in the Class deactivate endpoint of the swagger.
Update blended learning program status to deactivate
MTM Connect IN clients can deactivate the blended learning program using the deactivate method in the blended learning program endpoint.
/api/v{version}/Conferences/Deactivate
Deactivate a blended learning program based on its external ID (XID). Only blended learning program without gathered data may be deleted. A deactivated blended learning program can only be reactivated through the MTM platform, not the API.
Step 1: The first step is to verify if the client is authentic. Client's access token is validated to check if the client can request the deactivation of the blended learning program from the client’s system. A detailed explanation of the authentication processes may be found at MTM connect API -authentication. After authenticating the client , the validity of the programxids is checked next.
Step 2: To deactivate the blended learning program in the client system, it is essential to provide the programxids in the blended learning program deactivate endpoint of the swagger.
InMTM Connect IN API
InMTM Connect IN API
InMTM Connect IN API