{ "meta": { "name": "Get Device Usage", "type": "http", "event": [ { "listen": "test", "script": { "exec": [ "// Test device usage response", "if (response.status === 200) {", " tests['Device usage loaded'] = true;", " const body = JSON.parse(response.body);", " tests['Has devices array'] = Array.isArray(body.devices);", " if (body.devices.length > 0) {", " tests['Device has device_name'] = body.devices[0].device_name !== undefined;", " tests['Device has device_type'] = body.devices[0].device_type !== undefined;", " tests['Device has sync_count'] = body.devices[0].sync_count !== undefined;", " }", "} else {", " tests['Device usage failed'] = false;", "}" ] } } ] }, "req": { "url": "{{baseUrl}}/api/analytics/device-usage", "method": "GET", "headers": { "Authorization": "Bearer {{authToken}}" } } }