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
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.
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-3b1f782e6356
The name of the primary key field. It is used to uniquely identify a person.
tax_code
If true, the request is executed in emulation mode (no changes are made, but the changes and errors are reported).
1
Maximum number of changes allowed in the task. If exceeded, the task is aborted.
150
Defines 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-1234
Example
{ "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.
Path Parameters
Sezione intitolata “Path Parameters ”The task identifier
Responses
Sezione intitolata “ Responses ”The requested task data
object
Task identifier
task-1234
Identifier of the user who created the task
admin@myproject.com
The 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
9
The error esplication
Invalid office code OF1234
Error additional informations
...
It presents a summary of the applied changes after the task execution.
object
The total number of add operations
2
The total number of update operations
3
The total number of activate operations
5
The total number of deactivate operations
4
The total number of operations executed
14
Date time when task was created
2023-06-30 10:40:00
Date time when task was updated last
2023-06-30 10:40:00
Example
{ "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.