Pular para o conteúdo principal

API Overview

The Solução42 Console API is a RESTful API that allows you to manage companies, users, groups, and permissions programmatically.

Base URL

EnvironmentURL
Productionhttps://api.console.solucao42.com.br

All endpoints are prefixed with /v1/ for versioning.

Authentication

All API requests (except login and public endpoints) require authentication using a JWT token:

curl https://api.console.solucao42.com.br/v1/users \
-H "Authorization: Bearer YOUR_JWT_TOKEN"

See Authentication for details on obtaining tokens.

Request Format

Headers

HeaderRequiredDescription
AuthorizationYes*Bearer token for authentication
Content-TypeFor POST/PUTAlways application/json

*Not required for login and public endpoints.

Request Body

All request bodies must be valid JSON:

{
"name": "Example",
"email": "user@example.com"
}

Response Format

Successful Responses

Single resource:

{
"_id": "507f1f77bcf86cd799439011",
"name": "Example Resource",
"created_at": "2024-03-01T10:30:00.000Z"
}

List of resources:

{
"total": 100,
"quantity": 20,
"records": [
{ "_id": "...", "name": "Resource 1" },
{ "_id": "...", "name": "Resource 2" }
]
}
FieldDescription
totalTotal number of records matching your query
quantityNumber of records in this response
recordsArray of resource objects

Error Responses

Validation error (422):

{
"errors": [
{
"instancePath": "/email",
"message": "must be a valid email"
}
]
}

Business logic error (400):

{
"error": "User with this email already exists",
"error_code": "USER_EMAIL_DUPLICATE"
}

HTTP Status Codes

CodeDescription
200Success
201Created successfully
204Success with no content (e.g., delete)
400Bad request - check error message
401Unauthorized - invalid or missing token
403Forbidden - insufficient permissions
404Resource not found
422Validation error - check errors array
429Rate limit exceeded
500Internal server error

Pagination

List endpoints support pagination:

GET /v1/users?page=2&per_page=50
ParameterDefaultMaxDescription
page1-Page number (starts at 1)
per_page20100Items per page

Rate Limiting

To protect the API, rate limits are enforced:

Available Endpoints

The API also exposes a complete Conhecimento de Dominio surface for concepts, semantic layer, ontology, and AI review. See API de Conhecimento de Dominio for the endpoint map, validation rules, and current status.

Authentication

MethodEndpointDescription
GET/v1/auth/validate-companyCheck if company exists
POST/v1/auth/loginLogin with email/password
POST/v1/auth/googleLogin with Google OAuth
POST/v1/auth/passwordless/requestRequest login code
POST/v1/auth/passwordless/verifyVerify login code
POST/v1/auth/2fa/loginVerify 2FA token
GET/v1/auth/sso/:slug/startStart SSO flow
GET/v1/auth/meGet current user
POST/v1/auth/logoutLogout

View Authentication API →

Users

MethodEndpointDescription
GET/v1/usersList all users
GET/v1/users/:idGet user by ID
POST/v1/users/inviteInvite new user
POST/v1/users/accept-invitationAccept invitation
POST/v1/users/reset-password/requestRequest password reset
POST/v1/users/:id/activateActivate user
POST/v1/users/:id/deactivateDeactivate user
POST/v1/users/:id/groupsAdd groups to user
PUT/v1/users/:id/groupsReplace user groups
DELETE/v1/users/:id/groupsRemove groups from user

View Users API →

Groups

MethodEndpointDescription
GET/v1/groupsList all groups
GET/v1/groups/:idGet group by ID
POST/v1/groupsCreate group
PUT/v1/groups/:idUpdate group
DELETE/v1/groups/:idDelete group
POST/v1/groups/:id/permissionsAdd permissions
PUT/v1/groups/:id/permissionsReplace permissions
DELETE/v1/groups/:id/permissionsRemove permissions

View Groups API →

Permissions

MethodEndpointDescription
GET/v1/permissionsList all permissions
GET/v1/permissions/:idGet permission by ID
POST/v1/permissionsCreate permission
PUT/v1/permissions/:idUpdate permission
DELETE/v1/permissions/:idDelete permission

View Permissions API →

Sharing and Embed

MethodEndpointDescription
POST/v1/dashboards/:id/sharesCreate dashboard share (link or embed)
GET/v1/dashboard-sharesList company dashboard shares
POST/v1/share-auth/requestRequest email login code for external user
POST/v1/share-auth/verifyVerify code and receive share_access token
GET/v1/share-portal/:company_slug/dashboardsList dashboards for authenticated external user
POST/v1/share-portal/:company_slug/dashboards/:dashboard_slug/executeExecute shared dashboard in portal mode
GET/v1/public/shares/:token/resolveResolve public share token
POST/v1/public/shares/:token/executeExecute public share (when requires_auth=false)
GET/v1/public/shares/:token/filters/:filter_slug/optionsResolve select/multi_select filter options in public mode
POST/v1/embed/dashboards/:idGenerate dashboard embed token
GET/embed/d/:token/filters/:filter_slug/optionsResolve select/multi_select filter options in embed mode
POST/embed/d/:token/executeExecute dashboard via embed token

Common permission rules:

  • dashboard share and dashboard embed generation require dashboards:share
  • visualization embed generation requires visualizations:share
  • share contexts and analytics may require one or both actions depending on the resource types involved

View Sharing and Embed API →

Error Codes

Common error codes you may encounter:

Error CodeDescription
INVALID_CREDENTIALSWrong email, password, or company
UNAUTHORIZEDToken missing or expired
FORBIDDENInsufficient permissions
VALIDATION_ERRORRequest validation failed
NOT_FOUNDResource doesn't exist
USER_EMAIL_DUPLICATEEmail already in use
COMPANY_NOT_FOUNDCompany slug not found
CANNOT_DEACTIVATE_SELFCannot deactivate your own user account

SDKs and Libraries

While we don't have official SDKs yet, here are community resources:

  • Example JavaScript client in our Getting Started guide
  • OpenAPI specification available upon request

Need Help?