PersonOffice
Defines the assignment of people to offices, enabling access and resource management within those.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Authentication
Section titled “ Authentication ”OAuth2
Section titled “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
Section titled “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Section titled “Operations” POST /v2/person-office/index
Returns a paginated and filterable list of person offices. Use POST to allow complex filters via JSON payload.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching person offices
object
object
Example
{ "filter": { "person_first_name": "Mario", "person_last_name": "Rossi" }, "per-page": 50, "page": 2, "sort": "-person_tax_code"}
Responses
Section titled “ Responses ”List of person offices
object
Example
{ "person_office_id": "po-1", "office_id": "off-1", "person_id": "person-1", "project_id": "proj-1", "person_code": "MR001", "person_first_name": "Mario", "person_last_name": "Rossi", "person_birth_date": "1980-01-01", "office_name": "Main Office", "project_name": "Project X"}
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
GET /v2/person-office/view/{id}
Retrieve a person office by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the person office to retrieve
Responses
Section titled “ Responses ”Person office found
object
Example
{ "person_office_id": "po-1", "office_id": "off-1", "person_id": "person-1", "project_id": "proj-1", "person_code": "MR001", "person_first_name": "Mario", "person_last_name": "Rossi", "person_birth_date": "1980-01-01", "office_name": "Main Office", "project_name": "Project X"}
Person office not found
create
Section titled “create” POST /v2/person-office/create
Create a new person office by providing the required details.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Person office object to be created
object
Example
{ "office_id": "off-2", "person_id": "person-2", "project_id": "proj-2"}
Responses
Section titled “ Responses ”Person office created successfully
object
Example
{ "person_office_id": "po-2", "office_id": "off-2", "person_id": "person-2", "project_id": "proj-2"}
update
Section titled “update” PUT /v2/person-office/update/{id}
Update an existing person office by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the person office to update
Request Body required
Section titled “Request Body required ”Person office object with updated data
object
Example
{ "office_id": "off-1", "project_id": "proj-3"}
Responses
Section titled “ Responses ”Person office updated successfully
object
Example
{ "person_office_id": "po-1", "office_id": "off-1", "project_id": "proj-3"}
Person office not found
delete
Section titled “delete” DELETE /v2/person-office/delete/{id}
Delete a person office by its unique ID. If force=true, all related entities will also be deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the person office to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”Person office 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