This documentation provides detailed information on all endpoints available from the REST do Brasilware. The API allows you to interact programically with the system to manage modules, reports, settings and other features.
Basic Information
All API endpoints use the following base URL:
https://yor-domain.com/api
All API requests and responses are formatted in JSON, unless otherwise indicated.
Endpoints
Module Management
get /api/modles
Returns the list of all installed modules.
Parameters
This request does not require parameters.
Answer
[
{
"ID": 1,
"Name": "JavaScript Analyzer",
"Description": "Analyzes JavaScript code seeking malicious behaviors",
"Content": " ...",
"CREATEDAT": "2025-03-10t14: 30: 00.000Z"
},
{
"ID": 2,
"Name": "Traffic Viewer",
"Description": "view and analyze network traffic catches",
"Content": " ...",
"CREATEDAT": "2025-03-12t09: 15: 00.000Z"
}
]
get /api/modles/: id
Returns details of a specific module.
URL parameters
id | Number | Single Identifier of the module |
Answer
{
"ID": 1,
"Name": "JavaScript Analyzer",
"Description": "Analyzes JavaScript code seeking malicious behaviors",
"Content": " ...",
"CREATEDAT": "2025-03-10t14: 30: 00.000Z"
}
post /api/modules/upload
Upload and install a new module from a file.
Form Parameters
name | string | Module Name |
Description | string | Module Description |
file | file | HTML file of the module |
Answer
{
"ID": 3,
"Name": "Phishing Scanner",
"Description": "analyzes URLs to detect phishing attempts,"
"Content": " ...",
"CREATEDAT": "2025-03-17t10: 45: 00.000Z"
}
post /API/Modules/URL
Install a new module from a URL.
Body Parameters (JSON)
name | string | Module Name |
Description | string | Module Description |
URL | string | module URL (you should point to an HTML file) |
Answer
{
"ID": 4,
"Name": "Packet Analyzer",
"Description": "Network package analysis tool",
"Content": " ...",
"CREATEDAT": "2025-03-17t11: 20: 00.000Z"
}
delete /api/modles/: id
Removes a module installed.
URL parameters
id | Number | Single Identifier of the module |
Answer
204 In Content (no response body)
PDF Report Management
get /api/pdfs
Returns the list of all stored PDF reports.
Parameters
This request does not require parameters.
Response
[
{
"id": 1,
"filename": "relatorio-malware-01.pdf",
"filepath": "/uploads/pdfs/relatorio-malware-01.pdf",
"filesize": 1258000,
"createdAt": "2025-03-15T16:30:00.000Z",
"isMerged": false,
"sourceIds": null
},
{
"id": 2,
"filename": "merged-1234567890.pdf",
"filepath": "/uploads/pdfs/merged-1234567890.pdf",
"filesize": 3560000,
"createdAt": "2025-03-16T10:15:00.000Z",
"isMerged": true,
"sourceIds": "1,3,4"
}
]
POST /api/pdfs/upload
Faz upload de um ou mais arquivos PDF.
Form parameters
Parameter | Type | Description |
---|---|---|
files | file[] | Arquivos PDF a serem enviados (multiplos arquivos são permitidos) |
Response
[
{
"id": 5,
"filename": "analise-botnet-2025.pdf",
"filepath": "/uploads/pdfs/analise-botnet-2025.pdf",
"filesize": 2450000,
"createdAt": "2025-03-17T14:25:00.000Z",
"isMerged": false,
"sourceIds": null
},
{
"id": 6,
"filename": "ransomware-estudo-de-caso.pdf",
"filepath": "/uploads/pdfs/ransomware-estudo-de-caso.pdf",
"filesize": 1850000,
"createdAt": "2025-03-17T14:25:00.000Z",
"isMerged": false,
"sourceIds": null
}
]
POST /api/pdfs/merge
Mescla múltiplos PDFs em um único arquivo.
Body parameters (JSON)
Parameter | Type | Description |
---|---|---|
pdfIds | number[] | Array de IDs dos PDFs a serem mesclados, na ordem desejada |
Response
{
"id": 7,
"filename": "merged-1735896042.pdf",
"filepath": "/uploads/pdfs/merged-1735896042.pdf",
"filesize": 4300000,
"createdAt": "2025-03-17T15:00:00.000Z",
"isMerged": true,
"sourceIds": "5,6"
}
GET /api/pdfs/download/:id
Baixa um arquivo PDF específico.
URL parameters
id | Number | Single PDF Identifier |
Answer
The PDF file as a binary stream (Content-Type: Application/PDF)
delete /api/pdfs/: id
Removes a PDF file.
URL parameters
id | Number | Single PDF Identifier |
Answer
204 In Content (no response body)
Regeneration with AI
post /API/pdfs/: id/regenerate
regenerates a PDF report using AI analysis.
URL parameters
id | Number | Single Identifier of the PDF to be regenerated |
Body Parameters (JSON)
Language | string | Language Code for the report (e.g., "pt-br", "en-u", "es-e-e") |
Answer
{
"ID": 8,
"FileName": "AI-REPORT-PT-BR-1735896500.pdf",
"Filepath": "/uploads/pdfs/ai-report-bt-br-1735896500.pdf",
"Filesize": 3750000,
"CREATEDAT": "2025-03-17t16: 15: 00.000Z",
"ISMERGED": FALSE,
"Sourceids": "7"
}
Settings
get /API/settings
gets the current system settings.
Parameters
This request does not require parameters.
Answer
{
"ID": 1,
"Theme": "Light",
"Language": "PT-BR",
"Apikey": "SK-*************************************
"NotificatioSenabled":true
}
put /api/settings
Update system settings.
Body Parameters (JSON)
theme | string | interface theme ("Light" or "Dark") |
Language | string | Interface Language Code (e.g., "PT-BR", "EN-US", "ES-ES") |
Apikey | string | API key for integration with AI (optional) services |
notificationsenable | boolean | Enable/disable notifications (optional) |
Answer
{
"ID": 1,
"Theme": "Dark",
"Language": "en -us",
"Apikey": "SK-*************************************
"NotificatioSenabled": True
}
Status Codes
Brazilware API uses the following http status codes:
200 ok | The request was successfully processed and the result was returned. |
201 Created | The feature was successfully created (used after successful post). |
204 No content | The request has been successfully processed, but there is no content to return. |
400 Bad Request | The request has invalid parameters or is poorly formatted. |
401 UNAUTHORIZED | Authentication is necessary or failed. |
403 Forbidden | The customer is not allowed to access the feature. |
404 Not Found | The requested feature was not found. |
500 Internal Server Error | An internal error occurred on the server. |
Erro treatment
When an error occurs, the API returns an JSON object with information about the error:
{
"Error": {
"Message": "Error Description",
"Code":"Error_code"
}
}
Limitations and Good Practices
- Implement Customer Side to reduce the number of requests.
- For large file uploads, consider dividing into smaller parts.
- The API may have Rate Limits to prevent server overload.