Person
Questi contenuti non sono ancora disponibili nella tua lingua.
Represents a person with their relevant details.
A person can be associated with offices, projects, and roles within the system.
Optionally, a linked user account (related_user
) can be assigned, enabling authentication with that identity.
- Version
- 2.0.0
- OpenAPI version
- 3.1.0
Authentication
Sezione intitolata “ Authentication ”AccessToken
Sezione intitolata “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
OAuth2
Sezione intitolata “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
Operations
Sezione intitolata “Operations” POST /v2/person/index
Returns a paginated and filterable list of persons. Use POST to allow complex filters via JSON payload.
Authorizations
Sezione intitolata “Authorizations ”Request Body
Sezione intitolata “Request Body ”Parameters for searching persons
object
object
Example
{ "filter": { "first_name": "Mario", "last_name": "Rossi", "related_user": "relatedUser_manager", "entity_id": "mario.rossi@4hse.com" }, "per-page": 50, "page": 2, "sort": "-last_name"}
Responses
Sezione intitolata “ Responses ”List of persons
object
Example
{ "person_id": "person-1", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Headers
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
GET /v2/person/view/{id}
Retrieve a person by its unique ID.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the person to retrieve. Required if code
and project_id
are not provided.
Query Parameters
Sezione intitolata “Query Parameters ”Code of the person to get. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
Responses
Sezione intitolata “ Responses ”Person found
object
Example
{ "person_id": "person-1", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Person not found
POST /v2/person/create
Create a new person by providing the required details.
Authorizations
Sezione intitolata “Authorizations ”Request Body required
Sezione intitolata “Request Body required ”Person object to be created
object
If true and a person with the same code already exists, the person will be updated instead of created. If the person was historicized, a new period will be started.
Example
{ "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Responses
Sezione intitolata “ Responses ”Person created successfully
object
Example
{ "person_id": "person-2", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
PUT /v2/person/update/{id}
Update an existing person by its unique ID.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the person to update. Required if code
and project_id
are not provided.
Query Parameters
Sezione intitolata “Query Parameters ”Code of the person to update. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
Request Body required
Sezione intitolata “Request Body required ”Person object with updated data
object
Example
{ "first_name": "Mario", "last_name": "Rossi", "code": "MR002"}
Responses
Sezione intitolata “ Responses ”Person updated successfully
object
Example
{ "person_id": "person-1", "first_name": "Mario", "last_name": "Rossi", "code": "MR002"}
Person not found
historicize
Sezione intitolata “historicize” POST /v2/person/historicize/{id}
Historicize an existing person.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the person to historicize. Required if code
and project_id
are not provided.
Query Parameters
Sezione intitolata “Query Parameters ”Code of the person to historicize. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
Request Body
Sezione intitolata “Request Body ”Date used to historicize the person
object
The date of the historicization. If not provided, the current date will be used.
Responses
Sezione intitolata “ Responses ”Person historicized successfully
object
Person not found
DELETE /v2/person/delete/{id}
Delete a person by its unique ID. If force=true, all related entities will also be deleted.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the person to delete. Required if code
and project_id
are not provided.
Query Parameters
Sezione intitolata “Query Parameters ”Code of the person to delete. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
If true, the person will be historicized instead of deleted.
Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ Responses ”Person deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned
Webhooks
Sezione intitolata “Webhooks”PERSON::CREATE
Sezione intitolata “PERSON::CREATE”This webhook is triggered when a new person is created in the system. It provides the details of the newly created person.
Request Body
Sezione intitolata “Request Body ”Information about the newly created person
object
Example
{ "person_id": "person-2", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Responses
Sezione intitolata “ Responses ”Acknowledgment of the webhook event
PERSON::UPDATE
Sezione intitolata “PERSON::UPDATE”This webhook is triggered when a person is updated in the system. It provides the unique ID of the person and an object containing the old and new values for each updated field.
Request Body
Sezione intitolata “Request Body ”Information about the updated person, with old and new values for the changed properties.
object
The unique ID of the updated person.
An object where each key is the name of an updated field, and its value contains the old and new values.
object
Provides the old and new value for a property. The type of the values depends on the specific property.
object
Example
{ "entity_id": "d9a77e06-9b47-4829-b28a-c7561deac771", "updated_fields": { "last_name": { "new": "Rossini", "old": "Rossi" }, "birth_date": { "new": "", "old": null } }}
Responses
Sezione intitolata “ Responses ”Acknowledgment of the webhook event
PERSON::DELETE
Sezione intitolata “PERSON::DELETE”This webhook is triggered when a person is deleted from the system. It provides the deleted person.
Request Body
Sezione intitolata “Request Body ”Information about the deleted person
object
Example
{ "person_id": "person-2", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Responses
Sezione intitolata “ Responses ”Acknowledgment of the webhook event