The non-interactive patron image import allows your IT Manager to set up a rolling import and update facility between your school's source of patron images and Infiniti. This is a "set and forget" import facility which, once set up, will run according to the schedule implemented by your IT Manager. This process 'pushes' a collection of images into Infiniti at scheduled intervals.


Before Getting Started


The non-interactive import patron images tool is implemented to automate the synchronisation of patron images. This process accepts images one-at-a-time or a zipped file of images.


It utilises a script created and scheduled by your school's suitably qualified IT Technician. As an alternative, you can use the interactive patron image import. Note: The script is not intended for use by library managers or library staff and does not run in a browser. 


Prior to setting up non-interactive import patron, please ensure you are familiar with the following:

  1. The use of your preferred scripting tool and language; 
  2. Basic knowledge of cross-platform non-interactive web agents (for instance, cURL or similar);
  3. You school's Infiniti URL, this will be similar to the following: {yourschool.concordinfiniti.com};
  4. The username and password of an account with system administration privileges in your school's Infiniti.


Image characteristics: 

  • Filename of each image: Each patron image must be named using the patron's Admin ID. For instance, 12345.jpg.
  • Recommended format: .jpg or .png. Note: Bitmap images should not be used. 
  • Recommended dimensions: 200 x 200 pixels. Infiniti will resize profile images larger than this.



The Non-interactive Script


Your qualified IT Technician can HTTP POST a patron’s image file or a zipped file of patron images.  

Infiniti will treat the first multi-part file of the HTTP POST as the Image File or Zipped File - the file name and form attribute name of the post are ignored.


The action is protected by HTTP Basic Auth over SSL/TLS. You will need to provide the username and password of a new or existing user with system administration privileges in Infiniti. 

Good practice would be to create a new user in Infiniti, e.g., autoimport, and grant this user system administration privileges. As SAML Single Sign-On requires a browser, the credentials for this user cannot be verified via SAML; one of the other credential sources will be required.

 

Your school's script can be implemented in any fashion chosen by your IT technicians.



Importing Images Individually


HTTP POST a patron’s image file to this URL with HTTP Basic Authentication:


https://[user]:[password]@[school.concordinfiniti.com]/api/import/userImage



When complete, the script will produce a JSON result array. For instance:


{
  "success":true,
  "summary":"Updated profile image for '<last_name>, <first_name>'              with  Admin System Id '123'"
}


success: Whether all user records imported without error.

summary: A summary of the import action; successful or otherwise. Summary should not be considered machine readable.



Importing a Zipped File of Images


HTTP POST a zipped file to this URL with HTTP Basic Authentication:


https://[user]:[password]@[school.concordinfiniti.com]/api/import/userImage/multiple/compressed


When complete, the script will produce a JSON result array. For instance:


{
  "success":true,
  "summary":"1 user images loaded successfully.2 user images failed to              load.",
  "details":[
    {
      "file_name":"123.png",
      "success":true,
      "notes":"Updated profile image for '<last_name>, <first_name>'                  with  Admin System Id '123'."
    },
    {
      "file_name":"456.jpg",
      "success":false,
      "notes":"Cannot find user for Admin System Id '456'."
    },
    {
      "file_name":"789.csv",
      "success":false,
      "notes":"File is not a supported image file."
    }
  ]
}


success: Whether all user records imported without error.

summary: A summary of the import action; successful or otherwise.


If a query parameter of "?details=true" is supplied, each file will be listed in a "details" object with:


    file_name: Original name of a file in the zip.

    success: Whether this file imported without error.

   notes: User for the image if successful; or an error message if unsuccessful. Notes should not be considered machine readable.


Tip: Best practice is to prepare a trial import file with a small number of images, import these and confirm results prior to processing a bulk set of images.