Users
Service used to register, change and remove users from Ahgora PontoWeb.
| Aviso |
|---|
| Batch sending allowed, maximum 1000 records per request, or 1mb (mega) |
Users | Users | | Field | Type | Required | Description | Rules | | email | String | Yes | User's e-mail | Campo chave | | nome | String | Yes | User's name |
| | perfil | String | Yes | Name of the profile to be assigned to the user |
| | perfilNovo | String | Yes* | Name of the new profile to be assigned to the user | *Optional, send only when you want to change the user profile, informing in this field the new profile to be assigned. | | localizacao | Array | No | Location linked to the user |
| | remover | String | Yes* | Field to remove the User | *Add the REMOVE parameter to remove the user The field can also be sent blank | | login_saml | String | Yes* | Username for SSO | *Mandatory for SSO users |
Requests examples:
Request Body - Inclusion:| Bloco de código |
|---|
| language | text |
|---|
| theme | Emacs |
|---|
| linenumbers | true |
|---|
| collapse | true |
|---|
| [
{
"email": "[email protected]",
"perfil": "Administrador",
"localizacao": [
"Human Resources","Fabrica1"
],
"login_saml": "[email protected]",
"nome": "John Doe"
}
] |
Request Body - Profile Change:| Bloco de código |
|---|
| language | text |
|---|
| theme | Emacs |
|---|
| linenumbers | true |
|---|
| collapse | true |
|---|
| [
{
"email": "[email protected]",
"perfil": "Administrador",
"localizacao": [
"Human Resources"
],
"login_saml": "[email protected]",
"nome": "John Doe",
"perfilNovo": "Apontador"
}
] |
Request Body - Exclusion:| Bloco de código |
|---|
| language | text |
|---|
| theme | Emacs |
|---|
| linenumbers | true |
|---|
| collapse | true |
|---|
| [
{
"email": "[email protected]",
"perfil": "Administrador",
"localizacao": [
"Human Resources"
],
"login_saml": "[email protected]",
"nome": "John Doe",
"remover": "REMOVER"
}
] |
Response examples:
Response when SUCCESS - Code 200: | Bloco de código |
|---|
| language | text |
|---|
| theme | Emacs |
|---|
| linenumbers | true |
|---|
| collapse | true |
|---|
| {
"company": "a000101",
"unique": "bd751350",
"subunique": "c01de0cc",
"message": "User´s Integration on progress"
} |
| Dica |
|---|
| For more details, use the Process service. To find out more, click here. |
Validation ERROR - Code 400:| Bloco de código |
|---|
| language | text |
|---|
| theme | Emacs |
|---|
| linenumbers | true |
|---|
| collapse | true |
|---|
| {
"error": {
"message": "Request format must be an Array",
"code": 400
}
} |
Authentitcation ERROR - Code 401:| Bloco de código |
|---|
| language | text |
|---|
| theme | Emacs |
|---|
| linenumbers | true |
|---|
| collapse | true |
|---|
| {
"company": "a000101",
"unique": "bd751350",
"subunique": "c01de0cc",
"message": "User´s Integration on progress"
} |
Permission ERROR - Code 403:| Bloco de código |
|---|
| language | text |
|---|
| theme | Emacs |
|---|
| linenumbers | true |
|---|
| collapse | true |
|---|
| {
"error": {
"message": "Forbidden",
"code": 403
}
} |
Note: Check the user's permissions to access the route/service. |