Supervisor Import
Goal is to import/synchronize bigger sets of supervisor-to-users relations. Content-Type
header defines the requested import format:
Supported content types:
application/json
application/xml
text/csv
Configuration Possibilities
Different importing-modes can be applied which define what will happen to entries that are available in the database, but are not available via the given import file anymore (deprecation).
- None
In mode none - nothing will happen to the existing entries in our database if it's missing in the current file - Delete
Before the import we will remove all existing supervisor-user relations and recreate this from the provided file. This is the default setting
The other way round, if there are entries in the provided file that do not exist in our database, the entries are simply ignored, the import is not stopped and runs normally.
Supported content-types / hierarchy
JSON, XML and CSV are supportet filetypes. They all contain a simple list of supervisor<->user relation - the matching happens based on USERNAME.
A supervisor can have multiple users whereas a user only has one supervisor.
application/json
Example
[
{
"supervisor": "chefa",
"user": "usera"
},
{
"supervisor": "chefb",
"user": ""
}
]
application/xml
Example
<?xml version="1.0" encoding="utf-8"?>
<supervisors>
<supervisor>
<supervisor>chefa</supervisor>
<user>usera</user>
</supervisor>
<supervisor>
<supervisor>chefb</supervisor>
<user/>
</supervisor>
</supervisors>
text/csv
Example
supervisor,user
chefa,usera
chefb,
Fields
While the field supervisor
is mandatory, the field user
can be omitted (see examples above).
Field | Mandatory | Info |
---|---|---|
supervisor |
yes | Marks user as supervisor and gives permissions |
user |
no | Attaches user as member of supervisor |
Process time
The process time can be determined individually (usually once a day at night), but must be coordinated with other processes by SLH.