Additional configuration options and use cases

After you understand the basics of setting up and running a call in iAPI, you can take advantage of some of the additional features and functionalities available in iAPI.

Create iAPI templates

Templates automatically populate the fields in iAPI with saved information. Templates are helpful if you use the same API calls often.

To create a template:

  • Set up iAPI with all of the information that you want to save, such as the Base URL, the CSV file, and your API call.
  • In the API Configurations section, click New. The New Configuration window opens.
  • Enter a name for the template and click Create. The template is saved and you can select it in the API Configurations field to automatically populate the fields in iAPI.
API Configurations

API Configurations

💭

Example: Update the visibility class

Suppose you have a CSV file with columns named ID and Visibility Class. You use this spreadsheet to note the visibility class of your production stills.

If you often use an API call to change the visibility class of assets in your Orange Logic platform, you might enter the following in the Template of API call field:

/API/DataTable/V2.2/Documents.Image.Production-Still:CreateOrUpdate?CoreField.Identifier=[ID]&CoreField.Purpose+:=[Visibility Class]

Then, create a template. The next time you need to run the call, you can select your template in the API Configurations section to automatically populate the template field with the call.

Require users to accept terms and conditions or privacy notices

You can use an API call to require that users accept your terms and conditions or acknowledge your privacy notices the next time they log in. This option is helpful when you update your policies and need users to respond.

To run a call for this purpose:

  • Export a CSV file containing all users. For example, an Orange Logic administrator can go to Administration > Reports > Reports, run one of the Contacts reports, and export the results to a CSV.
  • Run one or both of the following calls on the file you exported:
    • This call clears the Consent Privacy Notice checkbox in each user account identified by the Email address column in the CSV file.

      API/Datatable/v2.1/Contact.Client:Update?Contact.CoreField.Email1=[Email address]&Contact.CoreField.ConsentPA:=0

    • This call clears the Terms & Conditions checkbox in each user account identified by the Email address column in the CSV file.

      API/Datatable/v2.1/Contact.Client:Update?Contact.CoreField.Email1=[Email address]&Contact.CoreField.ConsentTC:=0

Activate automated emails

You can use iAPI to take actions that trigger events. For example, you can create accounts with API calls. When the event is configured to send email notifications, the default behavior of iAPI is to not send those emails. This behavior prevents excessive notifications. For example, you might not want notifications to go out when you create a large number of accounts for users who you don’t expect to log in immediately.

To override the default behavior and send event notification emails, use &AllowNotifications=1 in your call. For example, the following call would create accounts from a CSV file with the headers Email, First name, and Last name, and these users would receive notification emails.

/API/DataTable/v2.1/Contact.Client:CreateOrUpdate?Contact.CoreField.Email1=[Email]&Contact.CoreField.First_Name:=[First name]&Contact.CoreField.Last_Name:=[Last name]&Contact.CoreField.OrganisationName:=Mangovations&Contact.CoreField.Status:=Validated&Contact.CoreField.MustResetPassword:=1&AllowNotifications=1