- Add admin dashboard with sync controls and data browser - Implement RMM, Auvik, and Addigy organization mappings - Add chunked ticket sync with progress tracking - Implement entity sync service with rate limiting - Add analytics engine and performance optimizer - Create data browser for all PSA entities - Add navigation components and UI improvements - Implement background processing and sync services - Add comprehensive documentation and migration scripts - Update configuration items with multi-system support - Enhance contact management and purchase history - Add issue type assignment and LLM analyzer - Improve error handling and logging utilities
40 lines
1 KiB
JavaScript
40 lines
1 KiB
JavaScript
// Quick test to fetch time entry 438553 from Autotask API
|
|
const https = require('https');
|
|
|
|
const apiUrl = process.env.AUTOTASK_API_URL || 'https://webservices1.autotask.net/atservicesrest/v1.0';
|
|
const username = process.env.AUTOTASK_USERNAME;
|
|
const password = process.env.AUTOTASK_PASSWORD;
|
|
const integrationCode = process.env.AUTOTASK_INTEGRATION_CODE;
|
|
|
|
const auth = Buffer.from(`${username}:${password}`).toString('base64');
|
|
|
|
const options = {
|
|
hostname: 'webservices1.autotask.net',
|
|
path: '/atservicesrest/v1.0/TimeEntries/438553',
|
|
method: 'GET',
|
|
headers: {
|
|
'Authorization': `Basic ${auth}`,
|
|
'ApiIntegrationCode': integrationCode,
|
|
'Content-Type': 'application/json'
|
|
}
|
|
};
|
|
|
|
const req = https.request(options, (res) => {
|
|
let data = '';
|
|
|
|
res.on('data', (chunk) => {
|
|
data += chunk;
|
|
});
|
|
|
|
res.on('end', () => {
|
|
console.log('Status Code:', res.statusCode);
|
|
console.log('Response:');
|
|
console.log(JSON.stringify(JSON.parse(data), null, 2));
|
|
});
|
|
});
|
|
|
|
req.on('error', (error) => {
|
|
console.error('Error:', error);
|
|
});
|
|
|
|
req.end();
|