API.subtitle
API.overview.description
API.overview.features.connection.description
API.overview.features.monitoring.description
API.overview.features.control.description
API.overview.features.notifications.description
API.overview.baseUrlhttps://api.onenata.com/v1
API.authentication.description
Authorization: Bearer YOUR_API_KEYAPI.authentication.getApiKeyAPI.authentication.getApiKeyDescription
API.devices.addDevice.description
POST /devices/validate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"serialNumber": "ON-SF-001",
"deviceType": "feedingMachine",
"deviceModel": "piFI",
"manufacturer": "onenata"
}GET /devices
Authorization: Bearer YOUR_API_KEYAPI.devices.categories.description
API.devices.categories.feeder.description
API.devices.categories.gps.description
API.devices.categories.waterer.description
API.devices.categories.camera.description
API.devices.categories.litterbox.description
API.devices.categories.toy.description
Register a smart feeding machine device to your account.
POST /devices/validate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"serialNumber": "ON-SF-001",
"deviceType": "feedingMachine",
"deviceModel": "piFI",
"manufacturer": "onenata"
}Response:
{
"code": 200,
"msg": "Feeding machine validated successfully",
"data": {
"deviceId": "feeding_machine_001",
"status": "active",
"foodLevel": 75,
"batteryLevel": 90,
"lastFeedTime": "2024-01-15T08:00:00Z",
"scheduledFeeds": 3
}
}Trigger immediate feeding with customizable portion size.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "feed",
"parameters": {
"amount": 50,
"schedule": "immediate",
"portion": "normal",
"soundAlert": true,
"recordFeeding": true
}
}Response:
{
"code": 200,
"msg": "Feeding completed successfully",
"data": {
"feedingId": "feed_001",
"timestamp": "2024-01-15T10:30:00Z",
"amountDispensed": 50,
"remainingFood": 1200,
"nextScheduledFeed": "2024-01-15T18:00:00Z"
}
}Configure automatic feeding schedule with multiple daily meals.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "setSchedule",
"parameters": {
"schedule": [
{
"time": "08:00",
"amount": 60,
"enabled": true
},
{
"time": "12:00",
"amount": 40,
"enabled": true
},
{
"time": "18:00",
"amount": 60,
"enabled": true
}
],
"timezone": "UTC",
"autoAdjust": true
}
}Response:
{
"code": 200,
"msg": "Feeding schedule updated",
"data": {
"scheduleId": "schedule_001",
"totalDailyFeeds": 3,
"totalDailyAmount": 160,
"nextFeedTime": "2024-01-16T08:00:00Z",
"status": "active"
}
}Monitor remaining food quantity and get refill recommendations.
GET /devices/{deviceId}/food-level
Authorization: Bearer YOUR_API_KEY
// Optional query parameters:
// ?includeHistory=true&days=7Response:
{
"code": 200,
"msg": "Food level retrieved",
"data": {
"currentLevel": 1200,
"maxCapacity": 2000,
"percentage": 60,
"estimatedDaysRemaining": 7,
"dailyConsumption": 160,
"lowLevelAlert": false,
"refillRecommended": false,
"lastRefill": "2024-01-10T10:00:00Z"
}
}Validate and register a GPS tracker device to your account.
POST /devices/validate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"serialNumber": "ON-GPS-001",
"deviceType": "gpsTracker",
"deviceModel": "GPS-Pro",
"manufacturer": "onenata"
}Response:
{
"code": 200,
"msg": "Device validated successfully",
"data": {
"deviceId": "gps_tracker_001",
"status": "active",
"batteryLevel": 85,
"lastSeen": "2024-01-15T10:30:00Z"
}
}Retrieve the current GPS coordinates and location data.
GET /devices/{deviceId}/location
Authorization: Bearer YOUR_API_KEY
// Optional query parameters:
// ?accuracy=high&includeAddress=trueResponse:
{
"code": 200,
"msg": "Location retrieved successfully",
"data": {
"latitude": 40.7128,
"longitude": -74.0060,
"accuracy": 5.2,
"altitude": 10.5,
"speed": 0,
"heading": 0,
"timestamp": "2024-01-15T10:30:00Z",
"address": "New York, NY, USA",
"batteryLevel": 85
}
}Create a virtual boundary and receive alerts when the pet enters or exits.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "setFence",
"parameters": {
"latitude": 40.7128,
"longitude": -74.0060,
"radius": 500,
"name": "Home Safe Zone",
"alertOnExit": true,
"alertOnEntry": false,
"enabled": true
}
}Response:
{
"code": 200,
"msg": "Geo-fence created successfully",
"data": {
"fenceId": "fence_001",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z"
}
}Retrieve historical location data for tracking and analysis.
GET /devices/{deviceId}/location/history
Authorization: Bearer YOUR_API_KEY
// Query parameters:
// ?startDate=2024-01-14T00:00:00Z
// &endDate=2024-01-15T23:59:59Z
// &limit=100
// &interval=300Response:
{
"code": 200,
"msg": "Location history retrieved",
"data": {
"locations": [
{
"latitude": 40.7128,
"longitude": -74.0060,
"timestamp": "2024-01-15T10:30:00Z",
"accuracy": 5.2
}
],
"totalCount": 150,
"hasMore": true
}
}Register a smart water fountain device to your account.
POST /devices/validate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"serialNumber": "ON-WF-001",
"deviceType": "waterFountain",
"deviceModel": "AquaPure",
"manufacturer": "onenata"
}Response:
{
"code": 200,
"msg": "Water fountain validated successfully",
"data": {
"deviceId": "water_fountain_001",
"status": "active",
"waterLevel": 75,
"filterStatus": "good",
"lastMaintenance": "2024-01-10T08:00:00Z"
}
}Monitor water quality parameters including pH, TDS, and temperature.
GET /devices/{deviceId}/water-quality
Authorization: Bearer YOUR_API_KEY
// Optional query parameters:
// ?includeHistory=true&hours=24Response:
{
"code": 200,
"msg": "Water quality data retrieved",
"data": {
"ph": 7.2,
"tds": 150,
"temperature": 22.5,
"chlorine": 0.1,
"quality": "excellent",
"lastTested": "2024-01-15T10:30:00Z",
"filterLifeRemaining": 85,
"recommendations": []
}
}Start or stop the water pump with customizable flow settings.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "startPump",
"parameters": {
"duration": 30,
"flowRate": "normal",
"mode": "continuous",
"autoStop": true,
"minWaterLevel": 20
}
}Response:
{
"code": 200,
"msg": "Pump started successfully",
"data": {
"commandId": "cmd_001",
"status": "running",
"estimatedStopTime": "2024-01-15T11:00:00Z",
"currentFlowRate": "normal"
}
}Activate automatic cleaning cycle to maintain water freshness.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "startClean",
"parameters": {
"mode": "deep",
"duration": 300,
"useUV": true,
"drainFirst": true,
"refillAfter": true
}
}Response:
{
"code": 200,
"msg": "Cleaning cycle started",
"data": {
"cleaningId": "clean_001",
"status": "in_progress",
"estimatedCompletion": "2024-01-15T11:05:00Z",
"currentPhase": "draining"
}
}Register a smart pet camera device to your account.
POST /devices/validate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"serialNumber": "ON-CAM-001",
"deviceType": "camera",
"deviceModel": "PetCam-HD",
"manufacturer": "onenata"
}Response:
{
"code": 200,
"msg": "Camera validated successfully",
"data": {
"deviceId": "camera_001",
"status": "active",
"resolution": "1080p",
"nightVision": true,
"audioSupport": true,
"storageUsed": "2.5GB"
}
}Access real-time video feed from the camera with customizable quality settings.
GET /devices/{deviceId}/stream
Authorization: Bearer YOUR_API_KEY
// Query parameters:
// ?quality=1080p&audio=true&format=hlsResponse:
{
"code": 200,
"msg": "Stream URL generated",
"data": {
"streamUrl": "https://stream.onenata.com/live/camera_001/playlist.m3u8",
"thumbnailUrl": "https://cdn.onenata.com/thumbnails/camera_001.jpg",
"quality": "1080p",
"fps": 30,
"audioEnabled": true,
"expiresAt": "2024-01-15T12:30:00Z"
}
}Capture high-quality photos with timestamp and metadata.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "takePhoto",
"parameters": {
"quality": "high",
"timestamp": true,
"resolution": "1920x1080",
"format": "jpeg",
"saveToCloud": true,
"enableFlash": false
}
}Response:
{
"code": 200,
"msg": "Photo captured successfully",
"data": {
"photoId": "photo_001",
"url": "https://cdn.onenata.com/photos/camera_001/photo_001.jpg",
"thumbnailUrl": "https://cdn.onenata.com/thumbnails/photo_001_thumb.jpg",
"timestamp": "2024-01-15T10:30:00Z",
"fileSize": "2.5MB",
"resolution": "1920x1080"
}
}Record video with customizable duration and quality settings.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "startRecord",
"parameters": {
"duration": 300,
"quality": "1080p",
"fps": 30,
"audio": true,
"motionDetection": true,
"autoStop": true,
"saveToCloud": true
}
}Response:
{
"code": 200,
"msg": "Recording started successfully",
"data": {
"recordingId": "rec_001",
"status": "recording",
"startTime": "2024-01-15T10:30:00Z",
"estimatedEndTime": "2024-01-15T10:35:00Z",
"quality": "1080p",
"storageLocation": "cloud"
}
}Enable two-way audio to communicate with your pet remotely.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "startTalk",
"parameters": {
"duration": 60,
"volume": 80,
"noiseReduction": true,
"echoCancel": true,
"autoEnd": true
}
}Response:
{
"code": 200,
"msg": "Two-way audio session started",
"data": {
"sessionId": "talk_001",
"status": "active",
"audioUrl": "wss://audio.onenata.com/talk/camera_001",
"maxDuration": 60,
"expiresAt": "2024-01-15T10:31:00Z"
}
}Register a smart litter box device to your account.
POST /devices/validate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"serialNumber": "ON-LB-001",
"deviceType": "litterBox",
"deviceModel": "AutoClean-Pro",
"manufacturer": "onenata"
}Response:
{
"code": 200,
"msg": "Litter box validated successfully",
"data": {
"deviceId": "litterbox_001",
"status": "active",
"litterLevel": 85,
"wasteLevel": 15,
"lastCleaned": "2024-01-15T08:00:00Z",
"odorControl": "active"
}
}Monitor pet usage patterns and litter box health metrics.
GET /devices/{deviceId}/usage-stats
Authorization: Bearer YOUR_API_KEY
// Query parameters:
// ?period=7d&includeHealth=true&timezone=UTCResponse:
{
"code": 200,
"msg": "Usage statistics retrieved",
"data": {
"period": "7d",
"totalVisits": 42,
"averageVisitsPerDay": 6,
"averageDuration": 180,
"litterLevel": 85,
"wasteLevel": 15,
"healthMetrics": {
"frequencyNormal": true,
"durationNormal": true,
"alerts": []
},
"maintenanceNeeded": false
}
}Initiate automatic cleaning with customizable settings.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "startClean",
"parameters": {
"mode": "deep",
"delay": 0,
"duration": 180,
"useDeodorizer": true,
"autoRefill": true,
"safetyCheck": true
}
}Response:
{
"code": 200,
"msg": "Cleaning cycle started",
"data": {
"cleaningId": "clean_001",
"status": "in_progress",
"mode": "deep",
"startTime": "2024-01-15T10:30:00Z",
"estimatedCompletion": "2024-01-15T10:33:00Z",
"currentPhase": "waste_removal"
}
}Get insights into your pet's health based on litter box usage patterns.
GET /devices/{deviceId}/health-insights
Authorization: Bearer YOUR_API_KEY
// Query parameters:
// ?period=30d&includeRecommendations=trueResponse:
{
"code": 200,
"msg": "Health insights generated",
"data": {
"period": "30d",
"overallHealth": "good",
"patterns": {
"frequencyTrend": "stable",
"durationTrend": "normal",
"timeOfDayPattern": "consistent"
},
"alerts": [],
"recommendations": [
"Maintain current feeding schedule",
"Consider increasing water intake"
],
"vetConsultation": false
}
}Register a smart interactive toy device to your account.
POST /devices/validate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"serialNumber": "ON-TOY-001",
"deviceType": "smartToy",
"deviceModel": "PlayMate-AI",
"manufacturer": "onenata"
}Response:
{
"code": 200,
"msg": "Smart toy validated successfully",
"data": {
"deviceId": "smart_toy_001",
"status": "active",
"batteryLevel": 90,
"playModes": ["interactive", "automatic", "training"],
"aiEnabled": true,
"lastPlaySession": "2024-01-14T16:30:00Z"
}
}Monitor pet activity levels and play session analytics.
GET /devices/{deviceId}/activity
Authorization: Bearer YOUR_API_KEY
// Query parameters:
// ?period=7d&includeCalories=true&timezone=UTCResponse:
{
"code": 200,
"msg": "Activity data retrieved",
"data": {
"period": "7d",
"totalPlayTime": 420,
"averageSessionDuration": 15,
"totalSessions": 28,
"caloriesBurned": 350,
"activityLevel": "high",
"favoritePlayMode": "interactive",
"peakActivityHours": ["08:00", "18:00"],
"recommendations": ["Increase play duration", "Try training mode"]
}
}Initiate interactive play sessions with customizable settings.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "startPlay",
"parameters": {
"mode": "interactive",
"duration": 600,
"intensity": "medium",
"adaptToMood": true,
"enableAI": true,
"soundEffects": true,
"autoAdjust": true
}
}Response:
{
"code": 200,
"msg": "Play session started",
"data": {
"sessionId": "play_001",
"status": "active",
"mode": "interactive",
"startTime": "2024-01-15T10:30:00Z",
"estimatedEndTime": "2024-01-15T10:40:00Z",
"currentIntensity": "medium",
"aiAdaptation": "enabled"
}
}Activate training mode to teach new behaviors and tricks.
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "startTraining",
"parameters": {
"skill": "fetch",
"difficulty": "beginner",
"duration": 300,
"rewardSystem": true,
"progressTracking": true,
"voiceCommands": true,
"customCues": ["good boy", "well done"]
}
}Response:
{
"code": 200,
"msg": "Training session started",
"data": {
"trainingId": "train_001",
"status": "active",
"skill": "fetch",
"difficulty": "beginner",
"progress": 0,
"estimatedCompletion": "2024-01-15T10:35:00Z",
"currentPhase": "introduction"
}
}API.monitoring.description
GET /devices/{deviceId}/status
Authorization: Bearer YOUR_API_KEY{
"code": 200,
"msg": "Success",
"data": {
"deviceId": "device_001",
"isOnline": true,
"batteryLevel": 75,
"lastReportTime": "2024-01-15T10:30:00Z",
"status": {
"temperature": 25.5,
"humidity": 60,
"feedCount": 3,
"waterLevel": 80
},
"alerts": []
}
}API.control.description
POST /devices/{deviceId}/commands
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"command": "feed",
"parameters": {
"amount": 50,
"schedule": "immediate"
}
}feed - API.control.commands.feedplay_sound - API.control.commands.playSoundset_temperature - API.control.commands.setTemperaturetake_photo - API.control.commands.takePhotostart_video - API.control.commands.startVideofeed - API.control.deviceSpecific.feeder.commands.feedsetSchedule - API.control.deviceSpecific.feeder.commands.setSchedulepauseSchedule - API.control.deviceSpecific.feeder.commands.pauseSchedulecheckFood - API.control.deviceSpecific.feeder.commands.checkFoodgetLocation - API.control.deviceSpecific.gps.commands.getLocationsetFence - API.control.deviceSpecific.gps.commands.setFenceenableSOS - API.control.deviceSpecific.gps.commands.enableSOSgetHistory - API.control.deviceSpecific.gps.commands.getHistorystartPump - API.control.deviceSpecific.waterer.commands.startPumpcheckWater - API.control.deviceSpecific.waterer.commands.checkWatertestQuality - API.control.deviceSpecific.waterer.commands.testQualityreplaceFilter - API.control.deviceSpecific.waterer.commands.replaceFiltertakePhoto - API.control.deviceSpecific.camera.commands.takePhotostartRecord - API.control.deviceSpecific.camera.commands.startRecordenableNightVision - API.control.deviceSpecific.camera.commands.enableNightVisionstartTalk - API.control.deviceSpecific.camera.commands.startTalkstartClean - API.control.deviceSpecific.litterbox.commands.startCleancheckStatus - API.control.deviceSpecific.litterbox.commands.checkStatusenableDeodorize - API.control.deviceSpecific.litterbox.commands.enableDeodorizegetUsageStats - API.control.deviceSpecific.litterbox.commands.getUsageStatsstartPlay - API.control.deviceSpecific.toy.commands.startPlaysetMode - API.control.deviceSpecific.toy.commands.setModeenableAuto - API.control.deviceSpecific.toy.commands.enableAutogetActivity - API.control.deviceSpecific.toy.commands.getActivityAPI.webhooks.description
POST /webhooks
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"url": "https://your-app.com/webhook/device-status",
"events": ["device.status.changed", "device.offline", "device.alert"]
}{
"event": "device.status.changed",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"deviceId": "device_001",
"status": {
"isOnline": true,
"batteryLevel": 75,
"temperature": 25.5
}
}
}// Get device status
async function getDeviceStatus(deviceId) {
const response = await fetch(`https://api.onenata.com/v1/devices/${deviceId}/status`, {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
return data;
}
// Send control command
async function feedPet(deviceId, amount) {
const response = await fetch(`https://api.onenata.com/v1/devices/${deviceId}/commands`, {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
command: 'feed',
parameters: { amount }
})
});
return await response.json();
}import requests
class OneNataAPI:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://api.onenata.com/v1"
self.headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
def get_device_status(self, device_id):
url = f"{self.base_url}/devices/{device_id}/status"
response = requests.get(url, headers=self.headers)
return response.json()
def send_command(self, device_id, command, parameters=None):
url = f"{self.base_url}/devices/{device_id}/commands"
data = {"command": command}
if parameters:
data["parameters"] = parameters
response = requests.post(url, headers=self.headers, json=data)
return response.json()
# Usage example
api = OneNataAPI("YOUR_API_KEY")
status = api.get_device_status("device_001")
result = api.send_command("device_001", "feed", {"amount": 50})API.manufacturers.description
API.manufacturers.docDescription
API.support.technical.description
API.support.technical.emailapi-support@onenata.com
API.support.technical.responseTimeAPI.support.technical.responseTimeValue