Advisor

This section shows how to manage users and incorporate Advisor queries into your platform

User management

1 - Creating users

NOTE: All calls to users management are made through the 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 - Updating users

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 - Listing users

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 - Querying users by ID

GET /api/v1/usuario/{id}

Parameters:

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 - Deleting users

DELETE /api/v1/usuario/{id}

Parameters:

Headers:

Request:

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

Response:

Advisor Connection

Add the following iframe to your HTML page and replace the ${token} variable with the user's uuid

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