PeopleSync
Questi contenuti non sono ancora disponibili nella tua lingua.
Manage people synchronization tasks, allowing you to upload CSV files and synchronize people, offices, and jobs for a project.
You can create sync tasks and view their status and results.
- Version
- 1.0.0
- OpenAPI version
- 3.0.0
Authentication
Sezione intitolata “ Authentication ”OAuth2
Sezione intitolata “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
Flow type: refreshToken
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Sezione intitolata “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Sezione intitolata “Operations” POST /people-sync/create
Create a new people sync task by uploading a CSV file and specifying the project and sync options.
Authorizations
Sezione intitolata “Authorizations ”Request Body
Sezione intitolata “Request Body ”object
CSV file that contains data to synchronize.
The project identifier of people to synchronize.
b190e786-8b47-4575-9947-3b1f782e6356The name of the primary key field. It is used to uniquely identify a person.
tax_codeIf true, the request is executed in emulation mode (no changes are made, but the changes and errors are reported).
1Maximum number of changes allowed in the task. If exceeded, the task is aborted.
150Defines which datasets will be synchronized. “people” syncs a single person, “offices” syncs person-office associations, “jobs” syncs person-job associations. “offices” requires “people”, “jobs” requires “offices”.
[ "people", "offices", "jobs"]Responses
Sezione intitolata “ Responses ”Task was created and put in queue
object
The created task ID. Use it to retrieve the current task status via the /view endpoint.
task-1234Example
{ "task_id": "task-1234"}Bad request. Required parameter missing or invalid value.
Not allowed to synchronize data on the specified project due to permissions.
CSV file is too large.
Unknown internal server error.
GET /people-sync/view/{id}
Retrieve the status and result of a people sync task by its unique ID.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”The task identifier
Responses
Sezione intitolata “ Responses ”The requested task data
object
Task identifier
task-1234Identifier of the user who created the task
admin@myproject.comThe current task status
object
object
{ "PS2": [ { "id": "PS2", "action": "activate", "periods": [ { "end_date": "2021-07-01 00:00:00", "start_date": "2020-07-01 00:00:0" }, { "end_date": "", "start_date": "2023-06-08 00:00:00" } ] } ], "PS3": [ { "id": "PS3", "action": "add" } ], "PS4": [ { "id": "PS4", "action": "deactivate", "periods": [ { "end_date": "2023-06-08 00:00:00", "start_date": "2020-07-01 00:00:00" } ] } ], "PS5": [ { "id": "PS5", "action": "update", "changes": { "street": "New street address", "locality": "New locality" } } ], "PS6": [ { "id": "OF2", "action": "add" }, { "id": "OF1", "action": "deactivate", "periods": [ { "end_date": "2023-06-14 00:00:00", "start_date": "1970-01-01 00:00:00" } ] }, { "id": "OF2-JOB1", "action": "add" } ]}It lists eventually task execution errors
object
CSV file line that cointains the error
9The error esplication
Invalid office code OF1234Error additional informations
...It presents a summary of the applied changes after the task execution.
object
The total number of add operations
2The total number of update operations
3The total number of activate operations
5The total number of deactivate operations
4The total number of operations executed
14Date time when task was created
2023-06-30 10:40:00Date time when task was updated last
2023-06-30 10:40:00Example
{ "task_id": "task-1234", "user_id": "admin@myproject.com", "status": "DONE", "response": { "result": { "PS2": [ { "id": "PS2", "action": "activate", "periods": [ { "end_date": "2021-07-01 00:00:00", "start_date": "2020-07-01 00:00:00" }, { "end_date": "", "start_date": "2023-06-08 00:00:00" } ] } ], "PS3": [ { "id": "PS3", "action": "add" } ], "PS4": [ { "id": "PS4", "action": "deactivate", "periods": [ { "end_date": "2023-06-08 00:00:00", "start_date": "2020-07-01 00:00:00" } ] } ], "PS5": [ { "id": "PS5", "action": "update", "changes": { "street": "New street address", "locality": "New locality" } } ], "PS6": [ { "id": "OF2", "action": "add" }, { "id": "OF1", "action": "deactivate", "periods": [ { "end_date": "2023-06-14 00:00:00", "start_date": "1970-01-01 00:00:00" } ] }, { "id": "OF2-JOB1", "action": "add" } ] }, "errors": [ { "line": 9, "message": "Invalid office code OF1234", "info": "..." } ], "changes": { "add": 2, "update": 3, "activate": 5, "deactivate": 4, "total": 14 } }, "created_at": "2023-06-30 10:40:00", "updated_at": "2023-06-30 10:40:00"}Not allowed to fetch task data due to permissions.