Import data from REST API
Records from other company systems can also be imported into various GIRITON agendas via the REST API. If your company system offers the ability to read records from it using the REST API, you can add a scheduled task in GIRITON that will periodically download and import these records into GIRITON via the REST API.
You can add a new scheduled task in the GIRITON web application via User Menu -> Configuration -> Planned Tasks -> Add -> Import from REST API.
Then, in the dialog box, enter the agenda into which you will import records in GIRITON (for example, HR, Projects, ...).
In the Address box, enter the URL of the REST API from which the records are to be retrieved.
In the JSON path box, enter the name of the field in the JSON response in which each record resides. The box will either be empty, or it usually includes something like record, entries or result, depending on the specific REST API.
In the Header table, you can specify the HTTP headers to be passed in the REST API request. This often includes the token that will be used for authentication for that REST API.
Click on Next.
During import, the importer recognizes which records already exist in GIRITON and only updates any changed fields. Records that do not yet exist in GIRITON will be newly created. You can set by which field the importer recognizes a new or existing record in the option Pair the records using.
In the Imported data preview table, you can see what data is available on the REST API and the names of the columns in which the values are stored.
In the Mapping imported data to fields in GIRITON table, you set the pairing, which data from the REST API should be inserted into which fields of the given agenda in GIRITON. So select the appropriate settings.
Finally, click on Next.
In the last step, the importer shows what will be done. That is, how many records will be added and how many will be updated if you import. In this step, carefully check the proposed changes and, if necessary, revise the importer settings by clicking Back.
If everything looks okay, click on Add. This will add this scheduled task, not run it. In addition, the scheduled task is deactivated by default, meaning that it does not automatically run.
Select the newly created scheduled task, and then click Run manually. The dialog box will appear again with information on how many records will be added or modified. Click Import data to import the data into the selected agenda.
If you are satisfied with the result, you can activate the Active check box for this Scheduled task and save your changes. This will cause the Scheduled Task to run automatically every few minutes.