Apple school API for PowerSchool

Hello People,

I want to change the email field for teacher on Apple school manager API plugin for PowerSchool to custom field that we used for gmail email. the plugin is enabled and activated but when the sync run on Apple school manager it give me error.

is there any good documentation tp modify the code, i am familiar with API in PowerSchool but the apple school manager how they recive and why the error part that i dont know.

here is the query code


<!-- Teachers -->

<query name="com.apple.school.teachers" coreTable="users" flattened="true">

<description>Queries for teacher data</description>

<columns>

<column>users.dcid</column>

<column>users.first_name</column>

<column column="users.teachernumber">users.id</column>

<column>users.last_name</column>

<column>users.middle_name</column>

<column>schoolstaff.schoolid</column>

<column>users.teachernumber</column>

<column>schoolstaff.status</column>

<column column="U_SCHOOLSTAFFUSERFIELDS.gafe_email">users.email_addr</column>

<column>users.teacherloginid</column>

</columns>

<sql>

<![CDATA[

With Teachers AS (

SELECT

u.dcid,

u.first_name,

'id_' || u.teachernumber as id,

u.last_name,

u.middle_name,

LISTAGG(ss.schoolid, ',') WITHIN GROUP (ORDER BY ss.schoolid) AS schoolid,

u.teachernumber,

ss.status,

uss.gafe_email email_addr,

u.teacherloginid

FROM users u

INNER JOIN schoolstaff ss

ON ss.users_dcid = u.dcid

JOIN U_SCHOOLSTAFFUSERFIELDS uss on uss.SCHOOLSTAFFDCID =ss.DCID

WHERE u.teachernumber IS NOT NULL AND ss.status = 1 AND u.ptaccess IS NOT NULL and uss.gafe_email is not null

GROUP BY

u.dcid, u.first_name, u.teachernumber, u.last_name, u.middle_name, ss.status, uss.gafe_email, u.teacherloginid

)

SELECT

dcid,

first_name,

id,

last_name,

middle_name,

schoolid,

teachernumber,

status,

email_addr,

teacherloginid

FROM Teachers

ORDER BY id

]]>

</sql>

</query>

and also i defined the fields access on the plugin file

<!-- U_SchoolStaff -->

<field table="U_SCHOOLSTAFFUSERFIELDS" field="SCHOOLSTAFFDCID" access="ViewOnly" />

<field table="U_SCHOOLSTAFFUSERFIELDS" field="gafe_email" access="ViewOnly" />


any suggestion ?

Posted on Oct 31, 2023 1:38 AM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apple school API for PowerSchool

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.