© 2018 Capita Business Services Ltd. All rights reserved.

Capita Education Software Solutions is a trading name of Capita Business Services Ltd. Our Registered office is 30 Berners Street, London, W1T 3LR and our registered number is 02299747. Further information about Capita plc can be found in our legal statement.

SIMS 8 - V3 - Attendance - Attendance Record

Warning - Work in Progress

Attendance Record

This domain contains details of attendances via the security domain Attendance

<Stem>/Attendance/V3/AttendanceRecords

Data Volumes

In a 6 year group school, UK law would expect 380 session marks per pupil per year attended or 2280 for pupils at the end of their 6 years.  A 4 form entry (100 pupils per year) x (0.5 + 1.5 + 2.5 + 3.5 + 4.5 +5.5 = 18 years of marks for

current pupils) x 380 (marks per year) would have in excess of 680,000 marks plus those from leavers. If we assume that a cap is put on 1000 rows per page then the call would be unlikely to succeed.

Please ensure that all calls to this information doamin are sensibly scoped and is fit for purpose.  For example use change tracking if you need a complete pictiure or make use of real time API calls for an individual when nee

Please note that the 'BATCH' verb is key to updating attendance records effectively.  The expectation would be that a batch contained a 'POST' command for each pupil in the class.

Filter on GET

It is a requirement that filters be placed on all GET calls which in most cases would be a date range of 90 days or less.

Changes from V2 of the API

V2 APIs return the set of actual marks recorded for a pupil.  Marks are not taken at the weekend, during holidays and would not exist for future sessions unless a holiday is pre-booked. This meant that Technical Integrators were required that to make a significant number of calls before the lack of a mark for the AM session on the 3rd of June can be interpreted as one of:

  • Missing Mark
  • Training Day
  • Weekend
  • Holiday
  • Exceptional Circumstances
  • Required to attend

The V3 APIs will return the augmented record and hence would resolve all marks for the time period requested in the response.  This will make the extract much more efficient for TIs and the behaviour is similar to SIMS 7.

The formats of the API data has also changed, see below.

Simple GET

Sample Call:

<Stem>/Attendance/V3/AttendanceRecords(805393e0-6860-43b0-ba16-001da0200bf3)

New V3 Format

{
    "@odata.context": "https://...",
    "ExternalID": "0779a200-08ff-4703-8a8d-02faaaa6c56d",
    "Present": true,
    "Absent": false,
    "RecordedOn": "2018-03-08T11:45:26Z",
    "ChangeProcessName": "UI_Title_EditMarks - 2GH -  Grosvenor",
    "AttendableEventStart": "2018-03-07T09:00:00Z",
    "RecordedBy": {
        "ExternalID": "0eb60bce-1b21-e811-80d4-000d3a2d651b",
        "Type": "AuthorisedUser"
    },
    "Attendee": {
        "ExternalID": "b7ca11f1-6e35-4bd9-80c8-936107e1c2e9",
        "Type": "Learner.Identifier"
    },
    "Event": {
        "ExternalID": "3009486a-05dc-4301-b64f-27450179d17f",
        "Type": "Attendance.AttendanceSession"
    },
    "AttendanceCode": {
        "ExternalID": "66ef2690-f564-4104-ab3e-fdfed22fe0a2",
        "Type": "Attendance.Lookup"
    },
    "Qualifier": {
        "MinutesLate": null,
        "Comment": null
    }
}

If the SIMS creates the default mark then 'Recorded by' will be null.

The definition more formally is:

  "AttendanceService.Models.OData.AttendanceRecord": {
      "properties": {
        "ExternalID": {
          "description": "ExternalID",
          "type": "string"
        },
        "Present": {
          "description": "Present",
          "type": "boolean"
        },
        "Absent": {
          "description": "Absent",
          "type": "boolean"
        },
        "SchoolAttendanceCode": {
          "description": "SchoolAttendanceCode",
          "type": "string"
        },
        "AttendanceHistorys": {
          "description": "AttendanceHistorys",
          "type": "array",
          "items": { "$ref": "#/definitions/AttendanceService.Models.OData.AttendanceHistory" }
        },
        "Learner": {
          "description": "Learner",
          "type": "string"
        },
        "AttendableEvent": {
          "description": "AttendableEvent",
          "type": "string"
        },
        "MinutesLate": {
          "format": "int32",
          "description": "MinutesLate",
          "type": "integer"
        },
        "Comment": {
          "description": "Comment",
          "type": "string"
        },
        "RecordedBy": {
          "description": "RecordedBy",
          "type": "string"
        },
        "RecordedOn": {
          "format": "date-time",
          "description": "RecordedOn",
          "type": "string"
        },
        "ChangeProcessName": {
          "description": "ChangeProcessName",
          "type": "string"
        },
        "AttendableEventStart": {
          "format": "date-time",
          "description": "AttendableEventStart",
          "type": "string"
        }
      }
}

 

V3 - Simple Post

Post body is bellow.  The call is 

  { 
 'ExternalID':'00000000-0000-0000-0000-000000000000',
'Present':true,
'Absent':false,
'RecordedOn':'2013-03-22T15:33:00Z',
'ChangeProcessName':null,
'AttendableEventStart':'2013-11-07T09:00:00Z',
'RecordedBy':{'ExternalID':'b773505b-83fe-453d-b77b-4757d5c080e7',
'Type':'AuthorisedUser'},
'Attendee':{'ExternalID':'5e201059-7524-4a67-bc06-85cf4a77254c','Type':'Learner.Identifier'},
'Event':{'ExternalID':'6edacf2f-3eba-4df1-a5b2-3a2c8e69cff1','Type':'Attendance.AttendanceSession'},
'AttendanceCode':{'ExternalID':'e01053d8-8a22-4451-8d28-c643882be5a8','Type':'Attendance.Lookup'},
'Qualifier':{'MinutesLate':null,'Comment': 'Posted by David'}
}

and returns

{
  "@odata.context":"https://pm-svc-api-supershim-staging.azurewebsites.net/ThirdParty/Attendance/V3/$metadata#AttendanceRecords/$entity",
  "ExternalID":"dc3563bf-a4d0-4217-92bd-00000245354c",
  "Present":true,
  "Absent":false,
  "RecordedOn":"2013-03-22T15:33:00Z",
  "ChangeProcessName":null,
  "AttendableEventStart":"2013-11-07T09:00:00Z",
  "fabricated":null,
  "RecordedBy":
  {
     "ExternalID":"b773505b-83fe-453d-b77b-4757d5c080e7",
     "Type":"AuthorisedUser"
  },
  "Attendee":
  {
    "ExternalID":"5e201059-7524-4a67-bc06-85cf4a77254c",
    "Type":"Learner.Identifier"
  },
 "Event":
  {
    "ExternalID":"6edacf2f-3eba-4df1-a5b2-3a2c8e69cff1",
    "Type":"Attendance.AttendanceSession"
  },
  "AttendanceCode":
  {
    "ExternalID":"e01053d8-8a22-4451-8d28-c643882be5a8",
    "Type":"Attendance.Lookup"
  },
  "Qualifier":
  {
    "MinutesLate":null,
    "Comment":"Posted by David"
  }
}

NB: single and double quotes appear to be interchangable.

The external id for the mark passed in as the zero guid is set and returned.

Change Process Name could be set to the partner application name.

 

V2 - Batch Example

--batch_33ad011e-8a56-47c2-93b4-67688f971009
Content-Type: multipart/mixed; boundary=changeset_a85b037f-ac89-4caa-b433-b5019fa9be94

--changeset_a85b037f-ac89-4caa-b433-b5019fa9be94
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: 1

POST /AttendanceServiceFarm1/OData/V1/AttendanceRecords HTTP/1.1
Content-Type: application/json;odata.metadata=minimal
Prefer: return=representation
Accept: application/json;odata.metadata=minimal
Accept-Charset:UTF-8

{
"@odata.type":"#AttendanceService.Models.OData.AttendanceRecord",
"Present":true,
"Absent":false,
"AttendableEvent":"c2f9d974-9e4f-4d46-b581-99fe42e14351",
"SchoolAttendanceCode":"5da46d71-59e5-4ee9-bde0-fe9516222593",
"Comment":"Added By David for testing batch 1 of 2",
"Learner":"8514f8e7-6225-47e4-bbef-18d99c638cdb",
"MinutesLate":null
}
--changeset_a85b037f-ac89-4caa-b433-b5019fa9be94
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: 2

POST /AttendanceServiceFarm1/OData/V1/AttendanceRecords HTTP/1.1
Content-Type: application/json;odata.metadata=minimal
Prefer: return=representation
Accept: application/json;odata.metadata=minimal
Accept-Charset:UTF-8

{
"@odata.type":"#AttendanceService.Models.OData.AttendanceRecord",
"Present":true,
"Absent":false,
"AttendableEvent":"c2f9d974-9e4f-4d46-b581-99fe42e14351",
"SchoolAttendanceCode":"5da46d71-59e5-4ee9-bde0-fe9516222593",
"Comment":"Added By David for testing batch 2 of 2",
"Learner":"869c2abf-6b64-4291-b4b4-dcab5933f009",
"MinutesLate":null
}

--changeset_a85b037f-ac89-4caa-b433-b5019fa9be94--
--batch_33ad011e-8a56-47c2-93b4-67688f971009--

 

V2 - Old format - For information only

{
    "@odata.context": "https:...",
    "ExternalID": "0779a200-08ff-4703-8a8d-02faaaa6c56d",
    "Present": true,
    "Absent": false,
    "SchoolAttendanceCode": "66ef2690-f564-4104-ab3e-fdfed22fe0a2",
    "Learner": "b7ca11f1-6e35-4bd9-80c8-936107e1c2e9",
    "AttendableEvent": "3009486a-05dc-4301-b64f-27450179d17f",
    "MinutesLate": null,
    "Comment": null,
    "RecordedBy": "0eb60bce-1b21-e811-80d4-000d3a2d651b",
    "RecordedOn": "2018-03-08T11:45:26Z",
    "ChangeProcessName": "Apply Mark Over Date Range Process",
    "AttendableEventStart": "2018-03-07T09:00:00Z",
    "AttendanceHistorys": []
}

Clearly the formats are not identical and hence will require code change by technical integrators.