Complete troubleshooting guide for common issues with the LISA REST API.
Symptoms:
Solutions:
# Check if you're including the Authorization header
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/health"
# Generate a new token if you don't have one
curl -X POST "https://api.biocv.info/api/v1/tokens" \
-H "Content-Type: application/json" \
-d '{"integratorUID": "your-integrator-uid", "expiresIn": 3600, "refreshToken": true}'
Debug Steps:
Bearer <token>/tokens/validateSymptoms:
Solutions:
# Validate your token
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/tokens/validate"
# Generate a new token
curl -X POST "https://api.biocv.info/api/v1/tokens" \
-H "Content-Type: application/json" \
-d '{"integratorUID": "your-integrator-uid", "expiresIn": 3600}'
Debug Steps:
Symptoms:
Solutions:
// Check token expiration
function isTokenExpired(token) {
try {
const payload = JSON.parse(atob(token.split('.')[1]));
return Date.now() >= payload.exp * 1000;
} catch (error) {
return true; // Invalid token format
}
}
// Refresh token
async function refreshToken() {
const response = await fetch('/api/v1/tokens/refresh', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ refreshToken: refreshToken })
});
const data = await response.json();
if (data.success) {
accessToken = data.data.accessToken;
refreshToken = data.data.refreshToken;
}
}
Symptoms:
Solutions:
# Test integrator UID
curl -X POST "https://api.biocv.info/api/v1/tokens" \
-H "Content-Type: application/json" \
-d '{"integratorUID": "your-integrator-uid", "expiresIn": 3600}'
# Contact LISA team if integrator is invalid
Debug Steps:
Symptoms:
Solutions:
# Verify user exists
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123"
# Check if user ID is correct
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/search?email=user@example.com"
Debug Steps:
Symptoms:
Solutions:
# List all resources first
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/animals"
# Search for specific resource
curl -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/users/user123/animals/search?mac=AA:BB:CC:DD:EE:FF"
Debug Steps:
Symptoms:
Solutions:
// Validate data before sending
function validateAnimalData(data) {
const errors = [];
if (!data.ID) errors.push('ID is required');
if (!data.MAC) errors.push('MAC is required');
if (!['male', 'female'].includes(data.Sex)) {
errors.push('Sex must be male or female');
}
return errors;
}
// Check validation errors in response
if (response.status === 400 && data.details) {
data.details.forEach(detail => {
console.error(`Field ${detail.field}: ${detail.message}`);
});
}
Debug Steps:
Symptoms:
Solutions:
# Use valid parameter ranges
curl "https://api.biocv.info/api/v1/users/user123/animals?page=1&limit=50"
# Check parameter requirements
curl "https://api.biocv.info/api/v1/users/user123/animals/search?sex=female&active=true"
Debug Steps:
Symptoms:
Solutions:
// Implement exponential backoff
async function makeRequestWithRetry(url, options = {}, retries = 3) {
for (let attempt = 1; attempt <= retries; attempt++) {
try {
const response = await fetch(url, options);
if (response.status === 429) {
if (attempt < retries) {
const delay = Math.pow(2, attempt) * 1000; // 1s, 2s, 4s
await new Promise(resolve => setTimeout(resolve, delay));
continue;
}
}
return response;
} catch (error) {
if (attempt === retries) throw error;
await new Promise(resolve => setTimeout(resolve, 1000));
}
}
}
// Monitor rate limit headers
function checkRateLimit(response) {
const remaining = response.headers.get('X-RateLimit-Remaining');
const reset = response.headers.get('X-RateLimit-Reset');
console.log(`Rate limit: ${remaining} remaining, resets at ${new Date(reset * 1000)}`);
}
Debug Steps:
Symptoms:
Solutions:
// Set appropriate timeouts
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 30000); // 30 seconds
fetch(url, {
signal: controller.signal,
// ... other options
}).finally(() => clearTimeout(timeoutId));
// Implement retry logic
async function makeRequestWithRetry(url, options = {}, maxRetries = 3) {
for (let attempt = 1; attempt <= maxRetries; attempt++) {
try {
const response = await fetch(url, options);
return response;
} catch (error) {
if (attempt === maxRetries) throw error;
await new Promise(resolve => setTimeout(resolve, 1000 * attempt));
}
}
}
Debug Steps:
Symptoms:
Solutions:
# Test DNS resolution
nslookup api.biocv.info
# Test connectivity
ping api.biocv.info
# Check with different DNS servers
nslookup api.biocv.info 8.8.8.8
Debug Steps:
# Verbose output for debugging
curl -v -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/health"
# Check response headers
curl -I -H "Authorization: Bearer your-jwt-token" \
"https://api.biocv.info/api/v1/health"
# Test with different methods
curl -X POST -H "Authorization: Bearer your-jwt-token" \
-H "Content-Type: application/json" \
-d '{"integratorUID": "test"}' \
"https://api.biocv.info/api/v1/tokens"
{
"info": {
"name": "LISA API",
"description": "Complete LISA API collection"
},
"variable": [
{
"key": "baseUrl",
"value": "https://api.biocv.info/api/v1"
},
{
"key": "accessToken",
"value": "{{accessToken}}"
}
],
"item": [
{
"name": "Health Check",
"request": {
"method": "GET",
"url": "{{baseUrl}}/health"
}
},
{
"name": "Generate Token",
"request": {
"method": "POST",
"url": "{{baseUrl}}/tokens",
"body": {
"mode": "raw",
"raw": "{\n \"integratorUID\": \"your-integrator-uid\",\n \"expiresIn\": 3600,\n \"refreshToken\": true\n}"
}
}
}
]
}
class LoggingAPIClient {
constructor(apiClient, logger) {
this.apiClient = apiClient;
this.logger = logger;
}
async makeRequest(endpoint, options = {}) {
const startTime = Date.now();
const requestId = Math.random().toString(36).substr(2, 9);
this.logger.info('API request started', {
requestId,
endpoint,
method: options.method || 'GET',
timestamp: new Date().toISOString()
});
try {
const result = await this.apiClient.makeRequest(endpoint, options);
this.logger.info('API request completed', {
requestId,
endpoint,
duration: Date.now() - startTime,
status: 'success'
});
return result;
} catch (error) {
this.logger.error('API request failed', {
requestId,
endpoint,
duration: Date.now() - startTime,
error: error.message,
status: 'error'
});
throw error;
}
}
}
class PerformanceMonitor {
constructor() {
this.metrics = {
requests: 0,
errors: 0,
totalDuration: 0,
averageResponseTime: 0
};
}
recordRequest(duration, success) {
this.metrics.requests++;
this.metrics.totalDuration += duration;
this.metrics.averageResponseTime = this.metrics.totalDuration / this.metrics.requests;
if (!success) {
this.metrics.errors++;
}
}
getMetrics() {
return {
...this.metrics,
errorRate: this.metrics.requests > 0 ? this.metrics.errors / this.metrics.requests : 0
};
}
}
"Authorization header is required" - Missing Authorization header"Invalid authorization header format" - Malformed Authorization header"Token has expired" - JWT token has expired"Invalid token" - Token is malformed or invalid"Access denied: Invalid integratorUID" - Invalid integrator UID"integratorUID is required" - Missing required field"Invalid limit. Must be a number between 1 and 100" - Invalid parameter value"Invalid date format. Use ISO 8601 format" - Invalid date format"Invalid classification type. Must be heat, birth, or lameness" - Invalid enum value"User not found" - User doesn't exist"Animal not found" - Animal doesn't exist"Treatment not found" - Treatment doesn't exist"LitterGuard device not found" - Device doesn't exist"Too many requests from this IP, please try again later" - Rate limit exceeded"Too many token requests from this IP, please try again later" - Token rate limit exceededWhen contacting support, include:
This troubleshooting guide should help you resolve most common issues with the LISA REST API. If you continue to experience problems, please contact the LISA Development Team with the information outlined above.
Diese Seite wird aus dem offiziellen LiSA-API-Wiki erzeugt. Sollte etwas falsch sein oder fehlen, kontaktieren Sie uns — wir korrigieren es an der Quelle.
Wiki-Stand 158c1a5 · 28.7.2026Wir verwenden Cookies und ähnliche Technologien, um diese Website zu betreiben und mit Ihrer Einwilligung für Analysen und (falls zutreffend) Werbung. Sie können alle akzeptieren, alle ablehnen oder Ihre Auswahl anpassen. Einzelheiten finden Sie in unserer Datenschutzerklärung und Cookie-Richtlinie.
Kategorien: Notwendig (Immer aktiv), Funktional, Analytik, MarketingHallo! Brauchen Sie Hilfe? Chatten Sie mit mir!