Related User
- 2 minutes to read
- Print
- DarkLight
- PDF
Related User
- 2 minutes to read
- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
These methods allow you to manage the Related Users in your PAM Core, limited by the permission level of your A2A.
Requirements
To request the API for related users, you must have the following:
- "Users" option enabled under "Authorized Resources" in your registered A2A Application Authorization Security settings.
Get all Related users
GET method parameters:
Field | Type | Example | Req. | Obs. |
---|---|---|---|---|
id | Int | 123 | Yes | Related user ID. |
name | String | Ashley Perry | Yes | The name assigned to this data. Visible in the senhasegura application. |
username | String | aperry | Yes | User identification name on senhasegura. |
This method returns a list of all related users.
GET /iso/user/related
Expected response
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "2 related users found",
"erro": false,
"cod_erro": 0,
"message": "2 related users found",
"error": false,
"error_code": 0
},
"relatedUsers": [
{
"id": 1,
"name": "Ashley Perry",
"username": "aperry"
},
{
"id": 2,
"name": "John Green",
"username": "jgreen"
}
]
}
Get a Related user
This method takes the ID of a Related User and returns this user’s other parameters.
GET /iso/user/related/{identifier}
Expected response
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "User found",
"erro": false,
"cod_erro": 0,
"message": "User found",
"error": false,
"error_code": 0
},
"relatedUsers":
{
"id": 1,
"name": "Ashley",
"username": "aperry"
}
}
Expected response for a user not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: User does not exist",
"erro": true,
"cod_erro": 0,
"message": "1005: User does not exist",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: User does not exist",
"detail": ""
}
}
Deactivate a Related User
This method deactivates a Related User based on their ID.
DELETE /iso/user/related/{identifier}
Expected response
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Related user successfully deactivated",
"erro": false,
"message": "Related user successfully deactivated",
"error": false,
}
}
Expected response for Related User not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Related user not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Related user not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Related user not found",
"detail": ""
}
}
Create a Related User
Field | Type | Example | Req. | Obs. |
---|---|---|---|---|
name | String | Ashley Perry | Yes | Name assigned to this data. Visible in the senhasegura application. |
username | String | aperry | Yes | User identification name on senhasegura. |
Use this method to add a new Related User to the list.
POST /iso/user/related
Expected Body request
{
"name": "Ashley Perry",
"username": "aperry"
}
Expected response
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Related user successfully registered!",
"erro": false,
"message": "Related user successfully registered!",
"error": false,
},
"relatedUsers": {
"id": 3,
"name": "Ashley Perry",
"username": "aperry"
}
}
Expected response for missing required parameter
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1001: Parameter 'username' was not informed!",
"erro": true,
"cod_erro": 0,
"message": "1001: Parameter 'username' was not informed!",
"error": true,
"error_code": 0
},
"exception": {
"code": 1001,
"message": "1001: Parameter 'username' was not informed!",
"detail": ""
}
}
Update a Related User
This method changes the parameters of a Related User based on their ID.
PUT /iso/user/related
Expected request
{
"id" : 15,
"name": "Test name",
"username": "test"
}
Expected response
"response": {
"status": 200,
"mensagem": "Related user successfully updated!",
"erro": false,
"cod_erro": 0,
"message": "Related user successfully updated!",
"error": false,
"error_code": 0
},
"relatedUsers": {
"id": "15",
"name": "Test Update",
"username": "test"
}
Was this article helpful?