API Test Page

Use this page to test various API endpoints in the application.

GET /health

Get the health status of the application and its dependencies.

GET /api/company/check/:uid

Check if a company exists in both MySQL and MongoDB databases.

Request Parameters
curl -X GET "http://localhost:50100/api/company/check/YOUR_COMPANY_UID"
fetch('http://localhost:50100/api/company/check/YOUR_COMPANY_UID') .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.get('http://localhost:50100/api/company/check/YOUR_COMPANY_UID') .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/check/YOUR_COMPANY_UID"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request);
const http = require('http'); http.get('http://localhost:50100/api/company/check/YOUR_COMPANY_UID', (resp) => { let data = ''; resp.on('data', (chunk) => { data += chunk; }); resp.on('end', () => { console.log(JSON.parse(data)); }); }).on('error', (err) => { console.log("Error: " + err.message); });
POST /api/company/sync

Synchronize a company from MySQL to MongoDB.

Request Body
curl -X POST "http://localhost:50100/api/company/sync" \ -H "Content-Type: application/json" \ -d '{"uid": "YOUR_COMPANY_UID", "forceUpdate": false}'
fetch('http://localhost:50100/api/company/sync', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ uid: 'YOUR_COMPANY_UID', forceUpdate: false }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.post('http://localhost:50100/api/company/sync', { uid: 'YOUR_COMPANY_UID', forceUpdate: false }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/sync"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddJsonBody(new { uid = "YOUR_COMPANY_UID", forceUpdate = false }); IRestResponse response = client.Execute(request);
const http = require('http'); const data = JSON.stringify({ uid: 'YOUR_COMPANY_UID', forceUpdate: false }); const options = { hostname: 'localhost', port: 50100, path: '/api/company/sync', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = http.request(options, (res) => { let responseData = ''; res.on('data', (chunk) => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); }); }); req.on('error', (e) => { console.error(`Error: ${e.message}`); }); req.write(data); req.end();
POST /api/company/bulk-sync/companies

Synchronize multiple companies from MySQL to MongoDB.

Request Body
curl -X POST "http://localhost:50100/api/company/bulk-sync/companies" \ -H "Content-Type: application/json" \ -d '{"companyIds": ["UID1", "UID2", "UID3"], "forceUpdate": false}'
fetch('http://localhost:50100/api/company/bulk-sync/companies', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ companyIds: ["UID1", "UID2", "UID3"], forceUpdate: false }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.post('http://localhost:50100/api/company/bulk-sync/companies', { companyIds: ["UID1", "UID2", "UID3"], forceUpdate: false }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/bulk-sync/companies"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddJsonBody(new { companyIds = new[] { "UID1", "UID2", "UID3" }, forceUpdate = false }); IRestResponse response = client.Execute(request);
const http = require('http'); const data = JSON.stringify({ companyIds: ["UID1", "UID2", "UID3"], forceUpdate: false }); const options = { hostname: 'localhost', port: 50100, path: '/api/company/bulk-sync/companies', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = http.request(options, (res) => { let responseData = ''; res.on('data', (chunk) => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); }); }); req.on('error', (e) => { console.error(`Error: ${e.message}`); }); req.write(data); req.end();

POST /api/company/verify-mongo-login

Verify user login credentials against MongoDB.

Request Body
curl -X POST "http://localhost:50100/api/company/verify-mongo-login" \ -H "Content-Type: application/json" \ -d '{"username": "YOUR_USERNAME", "password": "YOUR_PASSWORD"}'
fetch('http://localhost:50100/api/company/verify-mongo-login', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.post('http://localhost:50100/api/company/verify-mongo-login', { username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/verify-mongo-login"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddJsonBody(new { username = "YOUR_USERNAME", password = "YOUR_PASSWORD" }); IRestResponse response = client.Execute(request);
const http = require('http'); const data = JSON.stringify({ username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }); const options = { hostname: 'localhost', port: 50100, path: '/api/company/verify-mongo-login', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = http.request(options, (res) => { let responseData = ''; res.on('data', (chunk) => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); }); }); req.on('error', (e) => { console.error(`Error: ${e.message}`); }); req.write(data); req.end();
POST /api/company/verify-mysql-user

Verify user credentials against MySQL and check MongoDB consistency.

Request Body
curl -X POST "http://localhost:50100/api/company/verify-mysql-user" \ -H "Content-Type: application/json" \ -d '{"username": "YOUR_USERNAME", "password": "YOUR_PASSWORD"}'
fetch('http://localhost:50100/api/company/verify-mysql-user', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.post('http://localhost:50100/api/company/verify-mysql-user', { username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/verify-mysql-user"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddJsonBody(new { username = "YOUR_USERNAME", password = "YOUR_PASSWORD" }); IRestResponse response = client.Execute(request);
const http = require('http'); const data = JSON.stringify({ username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }); const options = { hostname: 'localhost', port: 50100, path: '/api/company/verify-mysql-user', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = http.request(options, (res) => { let responseData = ''; res.on('data', (chunk) => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); }); }); req.on('error', (e) => { console.error(`Error: ${e.message}`); }); req.write(data); req.end();
POST /api/company/sync-user

Synchronize a user from MySQL to MongoDB.

Request Body
curl -X POST "http://localhost:50100/api/company/sync-user" \ -H "Content-Type: application/json" \ -d '{"username": "YOUR_USERNAME", "password": "YOUR_PASSWORD"}'
fetch('http://localhost:50100/api/company/sync-user', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.post('http://localhost:50100/api/company/sync-user', { username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/sync-user"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddJsonBody(new { username = "YOUR_USERNAME", password = "YOUR_PASSWORD" }); IRestResponse response = client.Execute(request);
const http = require('http'); const data = JSON.stringify({ username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD' }); const options = { hostname: 'localhost', port: 50100, path: '/api/company/sync-user', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = http.request(options, (res) => { let responseData = ''; res.on('data', (chunk) => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); }); }); req.on('error', (e) => { console.error(`Error: ${e.message}`); }); req.write(data); req.end();
POST /api/company/sync-user-by-id

Synchronize a specific user by ID from MySQL to MongoDB.

Request Body
curl -X POST "http://localhost:50100/api/company/sync-user-by-id" \ -H "Content-Type: application/json" \ -d '{"uid": "USER_ID", "password": "YOUR_PASSWORD", "forceUpdate": false}'
fetch('http://localhost:50100/api/company/sync-user-by-id', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ uid: 'USER_ID', password: 'YOUR_PASSWORD', forceUpdate: false }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.post('http://localhost:50100/api/company/sync-user-by-id', { uid: 'USER_ID', password: 'YOUR_PASSWORD', forceUpdate: false }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/sync-user-by-id"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddJsonBody(new { uid = "USER_ID", password = "YOUR_PASSWORD", forceUpdate = false }); IRestResponse response = client.Execute(request);
const http = require('http'); const data = JSON.stringify({ uid: 'USER_ID', password: 'YOUR_PASSWORD', forceUpdate: false }); const options = { hostname: 'localhost', port: 50100, path: '/api/company/sync-user-by-id', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = http.request(options, (res) => { let responseData = ''; res.on('data', (chunk) => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); }); }); req.on('error', (e) => { console.error(`Error: ${e.message}`); }); req.write(data); req.end();
POST /api/company/bulk-sync-users

Synchronize multiple users from MySQL to MongoDB.

Request Body
curl -X POST "http://localhost:50100/api/company/bulk-sync-users" \ -H "Content-Type: application/json" \ -d '{"ids": ["ID1", "ID2", "ID3"], "password": "YOUR_PASSWORD", "forceUpdate": false}'
fetch('http://localhost:50100/api/company/bulk-sync-users', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ ids: ["ID1", "ID2", "ID3"], password: 'YOUR_PASSWORD', forceUpdate: false }), }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
axios.post('http://localhost:50100/api/company/bulk-sync-users', { ids: ["ID1", "ID2", "ID3"], password: 'YOUR_PASSWORD', forceUpdate: false }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); });
var client = new RestClient("http://localhost:50100/api/company/bulk-sync-users"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddJsonBody(new { ids = new[] { "ID1", "ID2", "ID3" }, password = "YOUR_PASSWORD", forceUpdate = false }); IRestResponse response = client.Execute(request);
const http = require('http'); const data = JSON.stringify({ ids: ["ID1", "ID2", "ID3"], password: 'YOUR_PASSWORD', forceUpdate: false }); const options = { hostname: 'localhost', port: 50100, path: '/api/company/bulk-sync-users', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = http.request(options, (res) => { let responseData = ''; res.on('data', (chunk) => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); }); }); req.on('error', (e) => { console.error(`Error: ${e.message}`); }); req.write(data); req.end();

POST /api/auth/login

Verify user credentials and authenticate a user.

Request Body
POST /api/auth/register

Register a new user in the system.

Request Body
POST /api/auth/hash-password

Generate an ASP.NET Identity compatible password hash.

Request Body
POST /api/auth/verify-password

Verify if a password matches a given hash.

Request Body

GET /api/logs/files

Get a list of available log files.

GET /api/logs/content/:filename

Get the content of a specific log file.

Request Parameters
Configuraciones - Sincronización
Check Individual Geocerca
Sync Individual Geocerca
Check Company Geocercas (Complete Analysis)
📊 Shows performance metrics, statistics and detailed inconsistencies table
Sync Company Geocercas (Mass Operation)
⚠️ This will synchronize ALL geocercas for the company