Person-group link integration using the API
Documentation on how to integrate the link between person and grouper, using the Ronda senior X API.
General prerequisites
- Be authenticated in Ronda senior X;
- Have a person registered in Ronda senior X;
- Have a group registered in Ronda senior X;
- Pass the token in the Header.
Consult person-group link
- Call the serviceGET /person/{personId}/group to consult the groups of which the person is a member;
- In the postman, the person's ID must be passed as a parameter in the URL: https://sam-api.senior.com.br/api/v1/person/{personId}/group
Register an association between a person and a group
- Call the serviceGET /group/search for autocomplete search of groups;
- In the postman, the term must be passed as a parameter: https://sam-api.senior.com.br/api/v1/group/search?term=group
To save the link between the person and the group:
- Call the servicePOST /group/{id}/person/{personId};
- In the postman, the group ID and the person's ID must be passed as parameters: https://sam-api.senior.com.br/api/v1/group/{groupId}/person/{personId}
If the service returns successfully (HTTP 200), there will be no JSON returned.
Delete link between person and group
- Call the serviceDELETE /group/{id}/person/{personId};
- In the postman, the group ID and the person's ID must be passed as parameters: https://sam-api.senior.com.br/api/v1/group/{groupId}/person/{personId}.
If the service returns successfully (HTTP 200), there will be no JSON returned.
Service information
Implementation Notes
Returns all groups of the the person
Response Class (Status 200)
All of the person's groups
[
{
"id": 0,
"nameWithPath": "string",
"isValidRange": true,
}
]
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| personId | Person Id | path | string |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 404 | Person not found | |
| 500 | Server error | { "code": 0, "message": "string" } |
Implementation Notes
Auto-complete group search
Response Class (Status 200)
An array of basic group information, limited to 10 results
[
{
"id": 0,
"nameWithPath": "string",
"isValidRange": true,
}
]
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| term | A term in the group's name | query | string |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 500 | Server error | { "code": 0, "message": "string" } |
Implementation Notes
Adds a person to the group
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| id | ID of the group | path | long |
| personId | ID of the person | path | long |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 200 | Person added successfully | |
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 404 | Person not found | |
| 500 | Server error | { "code": 0, "message": "string" } |
Implementation Notes
Deletes a person from a group
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| id | ID of the group | path | long |
| personId | ID of the person | path | long |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 200 | Person deleted successfully | |
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 404 | Person not found | |
| 500 | Server error | { "code": 0, "message": "string" } |





