Totara Learn Open Discussions

API GRAPH QL

 
H SJ
API GRAPH QL
di H SJ - Monday, 20 May 2024, 19:17
 

Good Afternoon,

We have one project where in we have a requirement to connect an external system using API.

Below is their query.

The integration engine will be transforming  this data (Payroll id, first name, last name, course completion date, course id) into a GraphQL

And based on the documentation on-line, it appears we will have to use the input query : ‘core_completion_get_course_completion_input’

But unfortunately there is no example GraphQL payload to achieve the posting of the completed course. Apparently there is no Input type that is used.

Can we get Totara to provide an example that we can use as a template. ?

 thank you

kind regards

HS

Simon Coggins
Re: API GRAPH QL
di Simon Coggins - Monday, 20 May 2024, 20:42
Gruppo Totara

I think you are saying you want to use an API request to mark someone as complete in a course inside Totara, is that correct?

Unfortunately that is not currently possible with our existing GraphQL services. The input query you mentioned 'core_completion_get_course_completion_input' is the data you provide when requesting completion data from the system, as outlined here:

https://graphql-schema.totara.com/docs/totara-18.0.html#group-Completion-tracking-Queries

e.g. if you pass the user and course you are interested in it can return the completion status of that user in that course.

But we don't yet have a Mutation to allow you to set course completion status.

I will create an internal feature suggestion and add it to our backlog of services to implement.

Simon

H SJ
Re: API GRAPH QL
di H SJ - Monday, 20 May 2024, 22:05
 

Hi @simon


Thank you for your response. we need to integrate an external system with totara using API. In that external system course completion for the users would be marked and sent to the LMS, using API. We used the same for linkedin integration..

Is it not possible with API. Please note we are on V17 soon will be on V18.


Thank you

kind regards

HS