Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

Sumário

...


Índice
excludeSumário

Objetivo

...

Esse documento tem o objetivo de exemplificar o uso da API utilizando todos os métodos implementados.

Para mais informações sobre consumo de Licença, Veja Aqui.


1 - Métodos

...


Serão apresentados 4 métodos, os quais foram implementados na API de Usuários, são eles:

  • GET
  • POST
  • PUT
  • DELETE

1.1 - GET

...

1.1.1 - Get All (Recuperar todos os usuários)

...

Informações
iconfalse
title1.1.1 GetAll
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/rm/glbframework/v1/users

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099 8051

Url Utilizada: http://localhost:80998051/api/rm/glbframework/v1/users

falseExemplo de Resultado
Informações
iconfalse
titleExemplo Postman

Image Removed

de Resultado
Expandir
Informações
icon
title
collapse
Ver resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
true
true
{
    "hasNext": true,
    "items": [
        {
            "id": "00001",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00001",
            "name": {
                "formatted": "ITAMAR MENDES DA SILVEIRA"
            },
            "userName": "00001",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00001-02-98",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00001-02-98",
            "name": {
                "formatted": "ALONSO LIGORIO PINTO"
            },
            "userName": "00001-02-98",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "0000125",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "0000125",
            "name": {
                "formatted": "RUDIVAL JOSE DOS SANTOS"
            },
            "userName": "0000125",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00002",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00002",
            "name": {
                "formatted": "JOAO DA SILVA JORDAM"
            },
            "userName": "00002",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00003",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00003",
            "name": {
                "formatted": "MARIA CONCEICAO DE ASSIS"
            },
            "userName": "00003",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00004",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00004",
            "name": {
                "formatted": "ADALBERTO DE JESUS LIMA"
            },
            "userName": "00004",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00005",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00005",
            "name": {
                "formatted": "ALESSANDRA LOPES DE ABREU"
            },
            "userName": "00005",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00006",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00006",
            "name": {
                "formatted": "FERNANDO HENRIQUE VALLE KURTEN"
            },
            "userName": "00006",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00007",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00007",
            "name": {
                "formatted": "JOAQUIM FARIAS DAMASCENO"
            },
            "userName": "00007",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00008",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00008",
            "name": {
                "formatted": "ZELIA APARECIDA DA SILVA"
            },
            "userName": "00008",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00009",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00009",
            "name": {
                "formatted": "BEATRIZ MENGA"
            },
            "userName": "00009",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00010",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00010",
            "name": {
                "formatted": "ANTONIO GATES BILL"
            },
            "userName": "00010",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00011",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00011",
            "name": {
                "formatted": "MARCELO MATTAR DINIZ"
            },
            "userName": "00011",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00012",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00012",
            "name": {
                "formatted": "ANA LUIZA  DE SOUZA PRATES"
            },
            "userName": "00012",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00013",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00013",
            "name": {
                "formatted": "ALEXANDRE COTTA LEAO"
            },
            "userName": "00013",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00014",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00014",
            "name": {
                "formatted": "PEDRO DE ALCANTARA"
            },
            "userName": "00014",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00015",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00015",
            "name": {
                "formatted": "LEOPOLDO DOS SANTOS DE OLIVEIRA NETO"
            },
            "userName": "00015",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00038-02-105",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00038-02-105",
            "name": {
                "formatted": "WILMAN MAIA CABRAL"
            },
            "userName": "00038-02-105",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00039",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00039",
            "name": {
                "formatted": "ANTONIO CARLOS DE BRAGANÇA"
            },
            "userName": "00039",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00047",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00047",
            "name": {
                "formatted": "RODRIGO FIALHO BARRICHELLO"
            },
            "userName": "00047",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        }
    ]
}


1.1.2 - Order (Resultado Ordenado)

Informações
titleParâmetros

Order: parâmetro responsável pela ordenação do resultado, podendo ser ascendente ou descendente. O resultado com a ordem descendente deve ser precedida do caractere "-" (menos).

Exemplo 1: ?order=campo1 (Ascendente)

Exemplo 2: ?order=-campo1 (Descendente)

Múltiplos campos de ordenação: ?order=[-]campo1, [-]campo2, [-]campo3 ...


Padrão scim:

SortBy: define o campo que será ordenado.

SortOrder: parâmetro responsável pela ordenação do resultado, podendo ser ascendente ou descendente.

Exemplo 1: ?sortBy=campo1&sortOrder=ascending (Ascendente)

Exemplo 2: ?sortBy=campo1&sortOrder=descending (Descendente)

Informações
iconfalse
title1.1.2 Order (Asc)
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/rm/glb/v1/usersframework?order=[-]{campo}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099 8051

Campo: active

Tipo de Ordenação: Ascendente

Url Utilizada: http://localhost:80998051/api/rm/glbframework/v1/users?order=active

falseExemplo de Resultado
Informações
iconfalse
titleExemplo Postman

Image Removed

de Resultado
Expandir
Informações
icon
title
true
Ver resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
collapse
true
{
    "hasNext": true,
    "items": [
        {
            "id": "00001",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00001",
            "name": {
                "formatted": "ITAMAR MENDES DA SILVEIRA"
            },
            "userName": "00001",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00001-02-98",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00001-02-98",
            "name": {
                "formatted": "ALONSO LIGORIO PINTO"
            },
            "userName": "00001-02-98",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "0000125",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "0000125",
            "name": {
                "formatted": "RUDIVAL JOSE DOS SANTOS"
            },
            "userName": "0000125",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00002",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00002",
            "name": {
                "formatted": "JOAO DA SILVA JORDAM"
            },
            "userName": "00002",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00003",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00003",
            "name": {
                "formatted": "MARIA CONCEICAO DE ASSIS"
            },
            "userName": "00003",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00004",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00004",
            "name": {
                "formatted": "ADALBERTO DE JESUS LIMA"
            },
            "userName": "00004",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00005",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00005",
            "name": {
                "formatted": "ALESSANDRA LOPES DE ABREU"
            },
            "userName": "00005",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00006",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00006",
            "name": {
                "formatted": "FERNANDO HENRIQUE VALLE KURTEN"
            },
            "userName": "00006",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00007",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00007",
            "name": {
                "formatted": "JOAQUIM FARIAS DAMASCENO"
            },
            "userName": "00007",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00008",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00008",
            "name": {
                "formatted": "ZELIA APARECIDA DA SILVA"
            },
            "userName": "00008",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00009",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00009",
            "name": {
                "formatted": "BEATRIZ MENGA"
            },
            "userName": "00009",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00010",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00010",
            "name": {
                "formatted": "ANTONIO GATES BILL"
            },
            "userName": "00010",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00011",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00011",
            "name": {
                "formatted": "MARCELO MATTAR DINIZ"
            },
            "userName": "00011",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00012",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00012",
            "name": {
                "formatted": "ANA LUIZA  DE SOUZA PRATES"
            },
            "userName": "00012",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00013",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00013",
            "name": {
                "formatted": "ALEXANDRE COTTA LEAO"
            },
            "userName": "00013",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00014",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00014",
            "name": {
                "formatted": "PEDRO DE ALCANTARA"
            },
            "userName": "00014",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00015",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00015",
            "name": {
                "formatted": "LEOPOLDO DOS SANTOS DE OLIVEIRA NETO"
            },
            "userName": "00015",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00038-02-105",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00038-02-105",
            "name": {
                "formatted": "WILMAN MAIA CABRAL"
            },
            "userName": "00038-02-105",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00039",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00039",
            "name": {
                "formatted": "ANTONIO CARLOS DE BRAGANÇA"
            },
            "userName": "00039",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        },
        {
            "id": "00047",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00047",
            "name": {
                "formatted": "RODRIGO FIALHO BARRICHELLO"
            },
            "userName": "00047",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        }
    ]
}
Informações
iconfalse
title1.1.2 Order (Desc)
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/rm/glbframework/v1/users?order=[-]{campo}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099 8051

Campo: active

Tipo de Ordenação: Descendente

Url Utilizada: http://localhost:80998051/api/rm/glbframework/v1/users?order=-active

falseExemplo de Resultado
Informações
iconfalse
titleExemplo Postman

Image Removed

de Resultado
Expandir
Informações
icon
title
true
Ver resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
collapse
true
{
    "hasNext": true,
    "items": [
        {
            "id": "agapito",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "agapito",
            "name": {
                "formatted": "Anderson Teixeira Agapito"
            },
            "userName": "agapito",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "alan",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "alan",
            "name": {
                "formatted": "Alan de Jesus"
            },
            "userName": "alan",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Andreia Valquiria",
            "meta": {
                "resourceType": "User",
                "created": "2011-10-10T13:52:19",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Andreia Valquiria",
            "name": {
                "formatted": "Andreia Valquiria Pereira"
            },
            "userName": "Andreia Valquiria",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Aracelle",
            "meta": {
                "resourceType": "User",
                "created": "2011-03-31T15:44:57",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Aracelle",
            "name": {
                "formatted": "Aracelle Soares Ramos"
            },
            "userName": "Aracelle",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "astoni",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "astoni",
            "name": {
                "formatted": "Adriano Astoni"
            },
            "userName": "astoni",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Bartira",
            "meta": {
                "resourceType": "User",
                "created": "2011-10-10T13:53:14",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Bartira",
            "name": {
                "formatted": "Bartira Sofia Da Silva Carvalho"
            },
            "userName": "Bartira",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "carlosphilippe",
            "meta": {
                "resourceType": "User",
                "created": "2018-10-05T09:41:20",
                "lastModified": "2018-10-05T09:41:20"
            },
            "externalId": "280c4852-9222-4983-be6f-f7a275d63111",
            "name": {
                "formatted": ""
            },
            "userName": "carlosphilippe",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "cecilia",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "cecilia",
            "name": {
                "formatted": "Cecília Franco"
            },
            "userName": "cecilia",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "charles",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "charles",
            "name": {
                "formatted": "Charles Pierre"
            },
            "userName": "charles",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "cintia",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "cintia",
            "name": {
                "formatted": "Cintia Cristina de Moura"
            },
            "userName": "cintia",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "claudia",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "claudia",
            "name": {
                "formatted": "Claudia Leontina Martins"
            },
            "userName": "claudia",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Coutinho",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Coutinho",
            "name": {
                "formatted": "Rodrigo Coutinho"
            },
            "userName": "Coutinho",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "cristiano",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "cristiano",
            "name": {
                "formatted": "Cristiano Cesar Figueiredo Soares"
            },
            "userName": "cristiano",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Cristiliane",
            "meta": {
                "resourceType": "User",
                "created": "2011-10-10T13:56:01",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Cristiliane",
            "name": {
                "formatted": "Cristiliane Moreira Mariano Feitoza"
            },
            "userName": "Cristiliane",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Amanda",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Amanda",
            "name": {
                "formatted": "Amanda Miranda de Oliveira"
            },
            "userName": "Amanda",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Breno",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Breno",
            "name": {
                "formatted": "Breno José Agostinho Batista"
            },
            "userName": "Breno",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Cristina.Almeida",
            "meta": {
                "resourceType": "User",
                "created": "2011-03-31T12:39:42",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Cristina.Almeida",
            "name": {
                "formatted": "Cristina de Almeida"
            },
            "userName": "Cristina.Almeida",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Daniela",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Daniela",
            "name": {
                "formatted": "Daniela Silvia Pereira"
            },
            "userName": "Daniela",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Davi",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Davi",
            "name": {
                "formatted": "Davi Leles"
            },
            "userName": "Davi",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        },
        {
            "id": "Denise",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "Denise",
            "name": {
                "formatted": "Denise Gentiluomo Diniz"
            },
            "userName": "Denise",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        }
    ]
}

1.1.3 - Filter (Resultado filtrado)

...

Informações
iconfalse
title1.1.3 Filter
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/rm/glbframework/v1/users?{campo}={valor}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099 8051

Campo: userName

Valor: carlosphilippe

Url Utilizada: http://localhost:80998051/api/rmframework/glb/v1v1/users?userName=carlosphilippe

Image Removed


Informações
iconfalse
titleExemplo de Resultado
collapse
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
true
true
{
    "hasNext": false,
    "items": [
        {
            "id": "carlosphilippe",
            "meta": {
                "resourceType": "User",
                "created": "2018-10-05T09:41:20",
                "lastModified": "2018-10-05T09:41:20"
            },
            "externalId": "280c4852-9222-4983-be6f-f7a275d63111",
            "name": {
                "formatted": ""
            },
            "userName": "carlosphilippe",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": true
        }
    ]
}

1.1.4 -

...

Paginação

...

Informações
titleParâmetros

Page: Página que será apresentada.

PageSize: Quantidade máxima de registros por página que serão apresentados.

Exemplo: ?page=valor1&pageSize=1

Valores padrão: Caso não sejam preenchidos os parâmetros evidenciados acima serão preenchidos com valores padrão.

Page: 1

PageSize: 20


Padrão scim:

StartIndex: valor inicial do índice do registro que será retornado.

Count: quantidade máxima de registros que serão apresentados.

Exemplo 1: ?startIndex=7&count=8

Informações
iconfalse
title1.1.4 Paginacao
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/rm/glbframework/v1/users?page={valor1}&pageSize={valor2}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099 8051

Valor1: 1

Valor2: 1

Url Utilizada: http://localhost:80998051/api/rm/glbframework/v1/users?page=1&pageSize=1

falseExemplo de Resultado
Informações
iconfalse
titleExemplo Postman

Image Removed

de Resultado
Expandir
Informações
icon
title
Ver resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
collapsetrue
{
    "hasNext": true,
    "items": [
        {
            "id": "00001",
            "meta": {
                "resourceType": "User",
                "created": "2014-07-07T15:32:15",
                "lastModified": "2018-10-05T09:34:53"
            },
            "externalId": "00001",
            "name": {
                "formatted": "ITAMAR MENDES DA SILVEIRA"
            },
            "userName": "00001",
            "emails": [
                {
                    "value": "[email protected]",
                    "primary": true
                }
            ],
            "active": false
        }
    ]
}

1.1.5 - Fields (Retorno de campos específicos no resultado)

...

Informações
titleParâmetros

Fields: parâmetro responsável pela especialização de campos em um resultado, ou seja, o usuário define quais campos serão apresentados no resultado.

Exemplo: ?fields=campo1

Múltiplos campos de ordenação: ?fields=campo1, campo2, campo3 ...


Padrão scim:

Attributes: define quais campos serão apresentados no resultado.

Exemplo 1: ?attributes=campo1

Múltiplos campos de ordenação: ?fields=campo1, campo2, campo3 ...



Obs.: Ainda não é possível utilizar campos complexos no filtro de Fields. Por exemplo: ?fields=name.givenName não irá funcionar.

Entretando, é possível utilizar ?fields=name, onde as 3 propriedades serão retornadas (givenName, familyName e formattedName)

Informações
iconfalse
title1.1.5 Fields
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/rm/glbframework/v1/users?fields={campo}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099 8051

Campo: userName

Url Utilizada: http://localhost:80998051/api/rm/glbframework/v1/users?fields=userName

falseExemplo de Resultado
Informações
iconfalse
titleExemplo Postman

Image Removed

de Resultado
Expandir
Informações
icon
title
collapse
Ver resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
true
true
{
    "hasNext": true,
    "items": [
        {
            "userName": "00001"
        },
        {
            "userName": "00001-02-98"
        },
        {
            "userName": "0000125"
        },
        {
            "userName": "00002"
        },
        {
            "userName": "00003"
        },
        {
            "userName": "00004"
        },
        {
            "userName": "00005"
        },
        {
            "userName": "00006"
        },
        {
            "userName": "00007"
        },
        {
            "userName": "00008"
        },
        {
            "userName": "00009"
        },
        {
            "userName": "00010"
        },
        {
            "userName": "00011"
        },
        {
            "userName": "00012"
        },
        {
            "userName": "00013"
        },
        {
            "userName": "00014"
        },
        {
            "userName": "00015"
        },
        {
            "userName": "00038-02-105"
        },
        {
            "userName": "00039"
        },
        {
            "userName": "00047"
        }
    ]
}

1.1.6 - GetOne (Recuperar usuário pelo Identificador)

...

Máscara de Url: http://{domínio}:{porta}/api/rm

/glb/v1/users/id?sortBy=campo1&sortOrder=descending - O retorno dessa chamada exibirá todas as propriedades expandidas.

Informações
icontitlefalse
title1.1.6 Fields
Parâmetros

Expand: Parâmetro opcional, usado para determinar a(s) propriedade(s) expandables que devem ser retornadas expandidas.

Exemplo: ?expand=roles - Nesse exemplo, os perfis associados ao usuário serão retornados na resposta da requisição.

Valores padrão: Caso não sejam preenchidos todas as propriedades expandables serão retornadas sem serem expandidas.


Padrão scim:

O padrão scim não adota o expandable. Por isso, ao adotar esse padrão, para retornar um registro com todas as propriedades expandables expandidas, é necessário utilizar uma propriedade do padrão scim (sortBy/sortOrder ou startIndex/count).

Exemplos: /api

Expandir
Informações
iconfalse
titleConfiguração
Informações
iconfalse
title1.1.6 GetOne



Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/framework/v1/users/{id}

{id}icon
Informações
Informações
icon
icon
false
titleExemplo de Configuração
Informações

Domínio: localhost

Porta:

 8099

 8051

Id: 00001

Url Utilizada: http://localhost:

8099

8051/api/

rm/glb

framework/v1/users/00001

Informações
iconfalse
titleExemplo Postman

Image Removed

false
titleExemplo de Resultado
collapse
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
true
true
{
    "_expandables": [
        "
groups
roles"
    ],
    "id": "00001",
    "meta": {
        "resourceType": "User",
        "created": "2014-07-07T15:32:15",
        "lastModified": "2018-10-
05T09
04T17:
34
02:
53
10"
    },
    "externalId": "
00001
82cca8a8-9198-4508-95c3-a0a40dc34fa2",
    "name": {
        "formatted": "ITAMAR
MENDES DA SILVEIRA
",
        "givenName": "ITAMAR"
    },
    "userName": "00001",
    "emails": [
        {
            "value": "
masterkeyweb@totvs
stella.vilaca@totvs.com.br",
            "primary": true
        }
    ],
    "active": 
false
true
}

1.2 - POST

...

expand
Informações
iconfalse
title1.2.1 Post
1.6 GetOne expandable



Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/

rm

framework/

glb/

v1/users/{id}?expand={campo}

Exemplo de Entrada
Informações
iconfalse
titleExemplo de Configuração
Informações
iconfalse
title

Domínio: localhost

Porta:

 8099

 8051

Id: 00001

Url Utilizada: http://localhost:

8099

8051/api/

rm/glb

framework/v1/users

Informações
iconfalse
titleExemplo de Entrada Postman

Image Removed

/00001?expand=roles

collapse{
        "
id
value": "
testeapiusuario", "meta": {
DBA_A"
        
"resourceType": "User"
},
        
"created": "2018-09-21T16:49:57.336Z",
{
   
"lastModified":
 
"2018-09-21T16:49:57.336Z"
    
},
    "
externalId
company": "
0001e
12",
    
"name":
 
{
       "
givenName
value": "
TesteAPI
DBA_G"
,

   
"familyName":
 
"Usuário"
    }
,

    ]
}
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
true
true
{
    "_expandables": [
        "roles"
    ],
    "id": "
testeapiusuario
00001",
    "meta": {
        "resourceType": "User",
        "created": "
2018
2014-
09
07-
21T16
07T15:
49
32:
57.336Z
15",
        "lastModified": "2018-
09
10-
21T16
04T17:
49
02:
57.336Z
10"
    },
    "externalId": "
0001e
82cca8a8-9198-4508-95c3-a0a40dc34fa2",
    "name": {
        "
givenName
formatted": "
TesteAPI
ITAMAR",
        "
familyName
givenName": "
Usuário
ITAMAR"
    },
    "userName": "
testeapiusuario
00001",
    "
phoneNumbers
emails": [
        {
            "value": "
31974964158"
[email protected]",
       
}
   
],
  "
emails
primary": 
[
true
        
{
}
    ],
    "
value
active": true,
   
"[email protected]",
 "roles": [
        {
            "
type
company": "
string
1",
            "
primary
value": "DBA 
true
Custo"
        },
  
],
  
"active":
 
true,
  
"groups":
 
[
{
     
{
       "
value
company": "
01
1",
            "
display
value": "
geral
_eq_1EquipeNet_A"
        },
        
],
{
            "
title
company": "
Mr
1",
   
"manager
         "value": 
[
"_me_1FeriasNet_A"
        
{
},
      
"managerId": "01",
  {
      
"displayName
      "company": "
Geral
1",
    
} ] }
Informações
iconfalse
titleExemplo de Resultado Positivo Postman

Image Removed

Informações
iconfalse
titleExemplo de Resultado Positivo
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
collapsetrue

1.2 - POST

...

1.2.1 - Post (Inserir um usuário)

...

Informações
iconfalse
title1.2.1 Post
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/framework/v1/users

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099

Url Utilizada: http://localhost:8051/api/framework/v1/users

Informações
iconfalse
titleExemplo de Entrada
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
  "id": "testeapiusuario",
  "meta": 
"userName": "testeapiusuario", "phoneNumbers": [
{
    
"value
"resourceType": "
31974964158
User",
    
} ],
"created": "2018-09-21T16:49:57.336Z",
    "lastModified": "2018-09-21T16:49:57.336Z"
  },
  "externalId": "0001e",
  "name": {
    "
emails
givenName": 
[
"TesteAPI",
    "familyName": "Usuário"
  },
  
{
"userName": "testeapiusuario",
  "phoneNumbers": [
    {
      "value": "
[email protected]"
31974964158"
    }
  ],
  "emails": [
    {
      "
type
value": "
string
[email protected]",
      "type": "string",
      "primary": true
    
}
  ],
  
"active": true,
  "groups": [
    
{
      
"value": "01",
      
"display": "geral"
    
}
  
],
  "title": "Mr",
  "manager": [
    
{
      
"managerId": "01",
      
"displayName":
"displayName": "Geral"
    
}
  ]
}
falseExemplo de Resultado Negativo
Informações
iconfalse
titleExemplo de Resultado Negativo Postman

Image Removed

Informações
Positivo
Expandir
icon
title
collapse
Ver resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumbers
true
true
{
    "
Code
id": "
RMSDbKeyException
testeapiusuario",
    "
Message
meta": {
  
"Chave
 
duplicada\r\n\r\nPossíveis
 
causas:\r\n
  
-
 
inclusão
 
de registro cujo valor da chave primária já existe\r\n - inclusão de registro cujo valor do índice único já existe"
"resourceType": "User",
        "created": "2018-09-21T16:49:57.336Z",
        "lastModified": "2018-09-21T16:49:57.336Z"
    },
    "
DetailMessage
externalId": "0001e",
    "name": {
 
em
 
RM.Lib.Data.DbServices.UpdateTable(DataTable
 
table,
 
UpdateMode
 
mode,
 
Boolean
  "givenName": "TesteAPI",
        "familyName": "Usuário"
    },
    "userName": "testeapiusuario",
    "phoneNumbers": [
        {
            "value": "31974964158"
        }
    ],
    "emails": [
        {
            "value": "[email protected]",
            "type": "string",
            "primary": true
        }
    ],
    "active": true,
    "groups": [
        {
            "value": "01",
            "display": "geral"
        }
    ],
    "title": "Mr",
    "manager": [
        {
            "managerId": "01",
            "displayName": "Geral"
        }
    ]
}
Informações
iconfalse
titleExemplo de Resultado Negativo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "Code": "RMSDbKeyException",
    "Message": "Chave duplicada\r\n\r\nPossíveis causas:\r\n  - inclusão de registro cujo valor da chave primária já existe\r\n  - inclusão de registro cujo valor do índice único já existe",
    "DetailMessage": "
logOperation, String userName, Int32 batchSize) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Data\\RMSData.cs:linha 897\r\n em RM.Lib.Data.DbServices.UpdateTable(DataTable table, UpdateMode mode, String userName, Int32 batchSize) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Data\\RMSData.cs:linha 865\r\n em RM.Lib.Data.DbServices.QueryUpdate(DataSet dataSet, String tableName, String codUsuario) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Data\\RMSData.cs:linha 3429\r\n em RM.Lib.Data.DbServices.QueryUpdate(DataSet dataSet, String tableName) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Data\\RMSData.cs:linha 3423\r\n em RM.Glb.Seguranca.GlbUsuarioData.DoSaveRecord(DataSet dataSet, Int32& rowsAffected, Object ownerData) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Seguranca.Data\\GlbUsuarioData.cs:linha 473\r\n em RM.Lib.Server.RMSDataServer.InternalSaveRecord(RMSContext context, DataSet& dataSet, Object ownerData, Boolean skipSecurity, Boolean skipSecurityCollumns) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 1477\r\n em RM.Lib.Server.RMSDataServer.SaveRecord(RMSContext context, DataSet& dataSet, Object ownerData) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 651\r\n em RM.Glb.Api.UserControllerServer.Save(String id, User record) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Api\\UserController.Server.cs:linha 336\r\n em RM.Glb.Api.UserControllerServer.OnPost(User record) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Api\\UserController.Server.cs:linha 269\r\n em RM.Lib.Server.RMSCrudServer`1.Post(T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\Api\\RMSCrudServer.cs:linha 80\r\n em RM.Lib.Api.RMSCrudController`1.OnPost(T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api\\Controllers\\RMSCrudController.cs:linha 135\r\n em RM.Lib.Api.RMSCrudController`1.Post(T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api\\Controllers\\RMSCrudController.cs:linha 125\r\n em lambda_method(Closure , Object , Object[] )\r\n em System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n em System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n em System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n em System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n em System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n
   em RM.Lib.
Api
Data.
Server.ApiAuthenticationFilter.ResultWithChallenge.<ExecuteAsync>d__2.MoveNext(
DbServices.UpdateTable(DataTable table, UpdateMode mode, Boolean logOperation, String userName, Int32 batchSize) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.
Api.Server
Data\\
Filters\\Api.AuthenticationFilter
RMSData.cs:linha 
193
897\r\n
---
 
Fim
 
do
 
rastreamento de pilha do local anterior onde a exceção foi gerada ---
em RM.Lib.Data.DbServices.UpdateTable(DataTable table, UpdateMode mode, String userName, Int32 batchSize) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Data\\RMSData.cs:linha 865\r\n   em 
System
RM.
Runtime
Lib.
ExceptionServices
Data.
ExceptionDispatchInfo
DbServices.
Throw()\r\n em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
QueryUpdate(DataSet dataSet, String tableName, String codUsuario) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Data\\RMSData.cs:linha 3429\r\n   em 
System
RM.
Web
Lib.
Http
Data.
Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
DbServices.QueryUpdate(DataSet dataSet, String tableName) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Data\\RMSData.cs:linha 3423\r\n   em 
System
RM.
Runtime
Glb.
CompilerServices
Seguranca.
TaskAwaiter
GlbUsuarioData.
HandleNonSuccessAndDebuggerNotification(Task task)\r\n em System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()", "HelpUrl": null, "Details": [ { "Code": "Exception", "Message": "Violation of PRIMARY KEY constraint 'PKGUSUARIO'. Cannot insert duplicate key in object 'dbo.GUSUARIO'. The duplicate key value is (testeapiusuario).\r\nThe statement has been terminated.", "DetailMessage": null, "HelpUrl": null, "Details": [ { "Code": "Exception", "Message": "INSERT INTO [GUSUARIO] ([CODUSUARIO], [NOME], [STATUS], [DATAINICIO], [IGNORARAUTENTICACAOLDAP], [DATAEXPIRACAO], [CONFIRMABTNOK], [SENHA], [CONTROLE], [ULTIMACOLIGADA], [CODACESSO], [DTAEXPSENHA], [DIASEXPSENHA], [OBRIGAALTERARSENHA], [NUMLOGININVALIDO], [DATALOGININVALIDO], [EMAIL], [ACESSONET], [INTERNO1], [DATAULTIMOACESSO], [CODUSUARIOREDE], [DOMINIOREDE], [DATAULTIMOACESSOVALIDO], [USUARIOTWITTER], [SENHATWITTER], [USUARIOFACEBOOK], [SENHAFACEBOOK], [USUARIOLINKEDIN], [SENHALINKEDIN], [USERIDFLUIGIDENTITY], [NOMESOCIAL], [USERID], [RECCREATEDBY], [RECCREATEDON], [RECMODIFIEDBY], [RECMODIFIEDON]) VALUES ('testeapiusuario', null, 1, '08/10/2018 00:00:00', 'F', null, 1, 'jcmaAAAA', -17702, , 'Acesso01', null, , 'T', , null, '[email protected]', 'F', null, null, null, null, null, null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, null, '9b69c210-8d20-45b6-afae-534ce10fd4b7', 'mestre', CONVERT ( DATETIME, CONVERT ( VARCHAR, GETDATE(), 120) ), 'mestre', CONVERT ( DATETIME, CONVERT ( VARCHAR, GETDATE(), 120) ))",
DoSaveRecord(DataSet dataSet, Int32& rowsAffected, Object ownerData) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Seguranca.Data\\GlbUsuarioData.cs:linha 473\r\n   em RM.Lib.Server.RMSDataServer.InternalSaveRecord(RMSContext context, DataSet& dataSet, Object ownerData, Boolean skipSecurity, Boolean skipSecurityCollumns) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 1477\r\n   em RM.Lib.Server.RMSDataServer.SaveRecord(RMSContext context, DataSet& dataSet, Object ownerData) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 651\r\n   em RM.Glb.Api.UserControllerServer.Save(String id, User record) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Api\\UserController.Server.cs:linha 336\r\n   em RM.Glb.Api.UserControllerServer.OnPost(User record) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Api\\UserController.Server.cs:linha 269\r\n   em RM.Lib.Server.RMSCrudServer`1.Post(T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\Api\\RMSCrudServer.cs:linha 80\r\n   em RM.Lib.Api.RMSCrudController`1.OnPost(T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api\\Controllers\\RMSCrudController.cs:linha 135\r\n   em RM.Lib.Api.RMSCrudController`1.Post(T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api\\Controllers\\RMSCrudController.cs:linha 125\r\n   em lambda_method(Closure , Object , Object[] )\r\n   em System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   em System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   em RM.Lib.Api.Server.ApiAuthenticationFilter.ResultWithChallenge.<ExecuteAsync>d__2.MoveNext() na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api.Server\\Filters\\Api.AuthenticationFilter.cs:linha 193\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()",
    "HelpUrl": null,
    "Details": [
        {
            "
DetailMessage
Code": 
null
"Exception",
            "Message": "Violation of PRIMARY KEY constraint 'PKGUSUARIO'. Cannot insert duplicate key 
"HelpUrl": null,
in object 'dbo.GUSUARIO'. The duplicate key value is (testeapiusuario).\r\nThe statement has been terminated.",
            "
Details
DetailMessage": null,
            "HelpUrl": null,
      
}
      "Details": [
     
]
           
},
{
        
{
            "Code": "Exception",
                    "Message": "INSERT INTO [GUSUARIO] ([CODUSUARIO], [NOME], [STATUS], [DATAINICIO], [IGNORARAUTENTICACAOLDAP], [DATAEXPIRACAO], [CONFIRMABTNOK], [SENHA], [CONTROLE], [ULTIMACOLIGADA], [CODACESSO], [DTAEXPSENHA], [DIASEXPSENHA], [OBRIGAALTERARSENHA], [NUMLOGININVALIDO], [DATALOGININVALIDO], [EMAIL], [ACESSONET], [INTERNO1], [DATAULTIMOACESSO], [CODUSUARIOREDE], [DOMINIOREDE], [DATAULTIMOACESSOVALIDO], [USUARIOTWITTER], [SENHATWITTER], [USUARIOFACEBOOK], [SENHAFACEBOOK], [USUARIOLINKEDIN], [SENHALINKEDIN], [USERIDFLUIGIDENTITY], [NOMESOCIAL], [USERID], [RECCREATEDBY], [RECCREATEDON], [RECMODIFIEDBY], [RECMODIFIEDON]) VALUES ('testeapiusuario', null, 1, '08/10/2018 00:00:00', 'F', null, 1, 'jcmaAAAA', -17702, , 'Acesso01', null, , 'T', , null, '[email protected]', 'F', null, null, null, null, null, null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, null, '9b69c210-8d20-45b6-afae-534ce10fd4b7', 'mestre', CONVERT ( DATETIME, CONVERT ( VARCHAR, GETDATE(), 120) ), 'mestre', CONVERT ( DATETIME, CONVERT ( VARCHAR, GETDATE(), 120) ))",
            
"DetailMessage":
        "DetailMessage": null,
                    "HelpUrl": null,
                    "Details": null
                }
            ]
}

1.3 - PUT

...

        },
        {
            "Code": "Exception",
            "Message": "INSERT INTO [GUSUARIO] ([CODUSUARIO], [NOME], [STATUS], [DATAINICIO], [IGNORARAUTENTICACAOLDAP], [DATAEXPIRACAO], [CONFIRMABTNOK], [SENHA], [CONTROLE], [ULTIMACOLIGADA], [CODACESSO], [DTAEXPSENHA], [DIASEXPSENHA], [OBRIGAALTERARSENHA], [NUMLOGININVALIDO], [DATALOGININVALIDO], [EMAIL], [ACESSONET], [INTERNO1], [DATAULTIMOACESSO], [CODUSUARIOREDE], [DOMINIOREDE], [DATAULTIMOACESSOVALIDO], [USUARIOTWITTER], [SENHATWITTER], [USUARIOFACEBOOK], [SENHAFACEBOOK], [USUARIOLINKEDIN], [SENHALINKEDIN], [USERIDFLUIGIDENTITY], [NOMESOCIAL], [USERID], [RECCREATEDBY], [RECCREATEDON], [RECMODIFIEDBY], [RECMODIFIEDON]) VALUES ('testeapiusuario', null, 1, '08/10/2018 00:00:00', 'F', null, 1, 'jcmaAAAA', -17702, , 'Acesso01', null, , 'T', , null, '[email protected]', 'F', null, null, null, null, null, null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, '\\FEz\\1B\\7F1\\18\\B7\\27', null, null, '9b69c210-8d20-45b6-afae-534ce10fd4b7', 'mestre', CONVERT ( DATETIME, CONVERT ( VARCHAR, GETDATE(), 120) ), 'mestre', CONVERT ( DATETIME, CONVERT ( VARCHAR, GETDATE(), 120) ))",
            "DetailMessage": null,
            "HelpUrl": null,
            "Details": null
        }
    ]
}

1.3 - PUT

...

1.3.1 - Put (Atualizar um usuário)

...

Informações
iconfalse
title1.3.1 Post
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/framework/v1/users/{id}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8099

Id: 00001

Url Utilizada: http://localhost:8051/api/framework/v1/users/testeapiusuario

Informações
iconfalse
titleExemplo de Entrada
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
  "id": "testeapiusuario",
  "meta": {
    "resourceType": "User",
    "created": "2018-09-21T16:49:57.336Z",
    "lastModified": "2018-09-21T16:49:57.336Z"
  },
  "externalId": "0001e",
  "name": {
    "givenName": "TesteAPI",
    "familyName": "Usuário"
  },
  "userName": "testeapiusuario",
  "phoneNumbers": [
    {
      "value": "31974964158"
    }
  ],
  "emails": [
    {
      "value": "[email protected]",
      "type": "string",
      "primary": true
    }
  ],
  "active": true,
  "groups": [
    {
      "value": "01",
      "display": "geral"
    }
  ],
  "title": "Mr",
  "manager": [
    {
      "managerId": "01",
      "displayName": "Geral"
    }
  ]
}
Informações
iconfalse
titleExemplo de Resultado Positivo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "id": "testeapiusuario",
    "meta": {
        "resourceType": "User",
        "created": "2018-09-21T16:49:57.336Z",
        "lastModified": "2018-09-21T16:49:57.336Z"
    },
    "externalId": "0001e",
    "name": {
        "givenName": "TesteAPI",
        "familyName": "Usuário"
    },
    "userName": "testeapiusuario",
    "phoneNumbers": [
        {
            "value": "31974964158"
        }
    ],
    "emails": [
        {
            "value": "[email protected]",
            "type": "string",
            "primary": true
        }
    ],
    "active": true,
    "groups": [
        {
            "value": "01",
            "display": "geral"
        }
    ],
    "title": "Mr",
    "manager": [
        {
            "managerId": "01",
            "displayName": "Geral"
        }
    ]
}
Informações
iconfalse
titleExemplo de Resultado Negativo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "Code": "RMSApplicationException",
    "Message": "Já existe um usuário com esse e-mail",
    "DetailMessage": "   em RM.Lib.RMSException.Throw(String message) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib\\Utils\\RMSException.cs:linha 131\r\n   em RM.Glb.Seguranca.GlbUsuarioData.ValidateRow(DataRow row) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Seguranca.Data\\GlbUsuarioData.cs:linha 759\r\n   em RM.Lib.Server.RMSDataServer.ValidateTableRows(DataTable masterTable) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 2509\r\n   em RM.Lib.Server.RMSDataServer.DoValidateRows(DataSet dataSet) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 2449\r\n   em RM.Lib.Server.RMSDataServer.InternalSaveRecord(RMSContext context, DataSet& dataSet, Object ownerData, Boolean skipSecurity, Boolean skipSecurityCollumns) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 1413\r\n   em RM.Lib.Server.RMSDataServer.SaveRecord(RMSContext context, DataSet& dataSet, Object ownerData) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\RMSDataServer.cs:linha 651\r\n   em RM.Glb.Api.UserControllerServer.Save(String id, User record) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Api\\UserController.Server.cs:linha 336\r\n   em RM.Glb.Api.UserControllerServer.OnPut(String id, User record) na C:\\RM\\Atual\\Release\\Glb-Globais\\RM.Glb.Api\\UserController.Server.cs:linha 274\r\n   em RM.Lib.Server.RMSCrudServer`1.Put(String id, T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Server\\Api\\RMSCrudServer.cs:linha 99\r\n   em RM.Lib.Api.RMSCrudController`1.OnPut(String id, T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api\\Controllers\\RMSCrudController.cs:linha 163\r\n   em RM.Lib.Api.RMSCrudController`1.Put(String id, T record) na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api\\Controllers\\RMSCrudController.cs:linha 152\r\n   em lambda_method(Closure , Object , Object[] )\r\n   em System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   em System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   em RM.Lib.Api.Server.ApiAuthenticationFilter.ResultWithChallenge.<ExecuteAsync>d__2.MoveNext() na C:\\RM\\Atual\\Release\\Lib\\RM.Lib.Api.Server\\Filters\\Api.AuthenticationFilter.cs:linha 193\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---\r\n   em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   em System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   em System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()",
    "HelpUrl": null,
    "Details": null
}

1.4 - DELETE

...

1.4.1 - Delete (Deletar um usuário)

...

Informações
iconfalse
title1.4.1 Delete
Expandir
titleClique aqui para expandir...
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/framework/v1/users/{id}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8051

Id: Teste_01

Url Utilizada: http://localhost:8051/api/framework/v1/users/Teste_01

Informações
iconfalse
titleExemplo de Resultado Positivo Postman

Obs.: Em caso de sucesso, será retornado o respondeCode = 204 e a resposta em branco.

Informações
iconfalse
titleExemplo de Resultado Negativo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "Code": "FE006",
    "Message": "Violação de chave estrangeira\r\n\r\nPossíveis causas:\r\n  - exclusão de registro que possui outros registros associados\r\n  - inclusão de registro detalhe sem um registro mestre associado",
    "DetailMessage": "The DELETE statement conflicted with the REFERENCE constraint \"FKGMESSAGECHAT_GUSUARIOTO\". The conflict occurred in database \"Base_12123\", table \"dbo.GMESSAGECHAT\", column 'CODUSUARIOTO'.\r\nThe statement has been terminated.\r\n\r\n--GlbUsuarioData\r\nDELETE GUSUARIO WHERE CODUSUARIO = '00001'",
    "HelpUrl": "",
    "Details": null
}

1.5 - PATCH

...

1.5.1 - Patch (Atualizar alguns campos de um usuário)

...

Informações
iconfalse
title1.5.1 Patch
Expandir
Informações
iconfalse
titleConfiguração

Máscara de Url: http://{domínio}:{porta}/api/framework/v1/users/{id}

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8051

Id: Teste_01

Url Utilizada: http://localhost:8051/api/framework/v1/users/Teste_01

Informações
iconfalse
titleExemplo de Entrada
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
	"name":
	{
            "givenName": {{givenName_formatted}}
    },
    "emails": [
        {
            "value": {{email_formatted}},
            "primary": true
        }
    ],
    "active": {{active}}
}
Informações
iconfalse
titleExemplo de Resultado Positivo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "id": "Teste_01",
    "meta": {
        "resourceType": "User",
        "created": "2018-12-05T15:03:07.28",
        "lastModified": "2018-12-05T15:03:08.5546578"
    },
    "externalId": "IDTeste_01External",
    "name": {
        "formatted": "NOME SOCIAL DO TESTE_01",
        "givenName": "Igor",
        "familyName": "Automatizado"
    },
    "userName": "Teste_01",
    "emails": [
        {
            "value": "[email protected]",
            "primary": true
        }
    ],
    "active": true
}


Referências (Links)

...

Roles (Manipulação de Perfis) A partir da versão 12.1.2306

...

Informações
titleAssociação de Perfis (Roles)
Para adicionar e remover perfis á um usuário é necessário realizar as operações de Post/Delete nas rotas de perfis conforme abaixo

Expandir
titleVíncular perfil ao usuário (Post)
Informações
iconfalse

Método HTTP: Post

Máscara de Url:  http://{domínio}:{porta}/api/framework/v1/users/{user}/roles


Informações
iconfalse
titleExemplo de Configuração

Url Utilizada: http://localhost:8051/api/framework/v1/users/apiteste/roles

VariávelDescriçãoValor
domínioendereço do serviço de webservicelocalhost
portaporta do serviço8051
usercódigo do usuárioapiteste
Expandir
titleExemplo Sucesso
Informações
iconfalse
titleRequest Body
Bloco de código
languagejs
titleJson
linenumberstrue
{
	"roles": [
		{
			"company": "0",
			"value": "DBA_G"
		}
	]
}
Informações
iconfalse
titleResponse

HttpStatus: 200

Bloco de código
languagejs
titleJson
linenumberstrue
{
    "id": "apiteste",
    "roles": [
        {
            "company": "1",
            "value": "DBA_G"
        },
        {
            "company": "6",
            "value": "DBA_G"
        },
        {
            "company": "7",
            "value": "DBA_G"
        }
    ]
}
Aviso
titleAtenção

Ao enviar o codigo da coligada (Company) como 0 o sistema irá adicionar o perfil para todas as coligadas que o usuário possuir permissão.

Como no exemplo da resposta, o perfil DBA_G foi associado para as coligadas 1,6 e 7.

Expandir
titleExemplo Erro
Expandir
titleUsuário já possui algum perfil associado
Informações
iconfalse
titleRequest Body
Bloco de código
languagejs
titleJson
linenumberstrue
{
	"roles": [
		{
			"company": "0",
			"value": "DBA_G"
		}
	]
}

HttpStatus: 400

Informações
iconfalse
titleResponse

{
    "Code""FE019",
    "Message""Usuário APITESTE já está associado ao perfil 'CodColigada:'1'|Sistema:'G'|CodPerfil:'DBA'|IdPerfil:DBA_G'!",
    "DetailMessage""",
    "HelpUrl""",
    "Details"null
}

Expandir
titleUsuário sem permissão
Informações
iconfalse
titleRequest Body
Bloco de código
languagejs
titleJson
linenumberstrue
{
	"roles": [
		{
			"company": "0",
			"value": "DBA_S"
		}
	]
}

HttpStatus: 401

Informações
iconfalse
titleResponse

{
    "Code""FE005",
    "Message""O Usuário informado não tem permissão para associar perfis na coligada 1 sistema S!",
    "DetailMessage""",
    "HelpUrl""",
    "Details"null
}


Expandir
titleRemover perfil do usuário (Delete)
Informações
iconfalse

Método HTTP: Delete

Máscara de Url:  http://{domínio}:{porta}/api/framework/v1/users/{user}/roles/company/{company}/role/{role}

Informações
iconfalse
titleExemplo de Configuração

Url Utilizada: http://localhost:8051/api/framework/v1/users/apiteste/roles/company/0/role/DBA_S

VariávelDescriçãoValor
domínioendereço do serviço de webservicelocalhost
portaporta do serviço8051
usercódigo do usuárioapiteste
companycódigo da coligada que será utilizada0
roleIdentificador(IDPERFIL) do perfil que será atribuído

DBA_S

Informações
iconfalse
titleResponse (Sucesso ou Erro)

HttpStatus: 204

Response Body: Vazio 

Aviso
titleAtenção

Por padrão, nas mensagens de DELETE, a resposta deve ser enviada com HTTP Code 204 (No content) e sem corpo no retorno, mesmo se não obtiver sucesso.