Advisor

Nesta seção serão apresentadas como gerir usuários e incorporar consultas do Advisor em sua plataforma

Gestão de usuários

1 - Criação de usuários

OBS: Todas as chamadas para gerenciamento de usuários são realizadas na API https://corewebapi.asisprojetos.com.br

POST /api/v1/usuario

Headers:

Request:

        curl -X POST "https://corewebapi.asisprojetos.com.br/api/v1/usuario" \
          -H 'Content-Type: application/json' \
          -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
          -H 'account-key: b601b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52dcd' \
          -d '{ "nome": "string", "email": "string", "cargo": "string" }'
    

Response:

        {
            "id": "integer",
            "nome": "string",
            "email": "string",
            "cargo": "string",
            "uuid": "string"
        }
    

2 - Alterações de usuários

PUT /api/v1/usuario

Headers:

Request:

        curl -X PUT "https://corewebapi.asisprojetos.com.br/api/v1/usuario" \
          -H 'Content-Type: application/json' \
          -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
          -H 'account-key: b601b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52dcd' \
          -d '{ "id": "integer", "nome": "string", "email": "string", "cargo": "string" }'
    

Response:

        {
            "id": "integer",
            "nome": "string",
            "email": "string",
            "cargo": "string"
        }
    

3 - Listagem de usuários

GET /api/v1/usuario

Headers:

Request:

        curl -X GET "https://corewebapi.asisprojetos.com.br/api/v1/usuario" \
          -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
          -H 'account-key: b601b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52dcd'
    

Response:

    {
        "content": [
            {
                "id": "integer",
                "nome": "string",
                "email": "string",
                "cargo": "string"
            },
            {
                "id": "integer",
                "nome": "string",
                "email": "string",
                "cargo": "string"
            }
        ],
        "pageable": {
            "sort": {
                "sorted": "boolean",
                "unsorted": "boolean",
                "empty": "boolean"
            },
            "pageSize": "integer",
            "pageNumber": "integer",
            "offset": "integer",
            "paged": "boolean",
            "unpaged": "boolean"
        },
        "totalPages": "integer",
        "totalElements": "integer",
        "last": "boolean",
        "first": "boolean",
        "sort": {
            "sorted": "boolean",
            "unsorted": "boolean",
            "empty": "boolean"
        },
        "number": "integer",
        "numberOfElements": "integer",
        "size": "integer",
        "empty": "boolean"
    }      
    

4 - Busca de usuário por ID

GET /api/v1/usuario/{id}

Parâmetros:

Headers:

Request:

        curl -X GET "https://corewebapi.asisprojetos.com.br/api/v1/usuario/1" \
          -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
          -H 'account-key: b601b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52dcd'
    

Response:

        {
            "id": "integer",
            "nome": "string",
            "email": "string",
            "cargo": "string"
        }
    

5 - Exlusão de usuários

DELETE /api/v1/usuario/{id}

Parâmetros:

Headers:

Request:

        curl -X DELETE "https://corewebapi.asisprojetos.com.br/api/v1/usuario/1" \
          -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
          -H 'account-key: b601b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52dcd'
    

Response:

Conexão com Advisor

Inclua o seguinte iframe na sua página HTML, substituindo a variável ${token} pelo uuid do usuário

        <iframe src="https://kolossus.asisprojetos.com.br/advisor/embedded?token=${token}"></iframe>