Yuto Analytics LogoYuto Analytics

API Documentation

Overview

The Yuto Analytics API is a RESTful API that allows you to programmatically manage your monitors, retrieve status data, and integrate our monitoring capabilities into your applications.

Base URL

https://api.yutoanalytics.com/v1

Authentication

All API requests must be authenticated using your API key. You can find your API key in your account settings.

Request Header

Authorization: Bearer YOUR_API_KEY

Endpoints

Get All Monitors

GET /monitors

Returns a list of all monitors in your account.

Response Example

{
  "monitors": [
    {
      "id": "12345",
      "name": "My Website",
      "url": "https://example.com",
      "status": "up",
      "uptime": 99.9,
      "response_time": 245
    }
  ]
}

Create Monitor

POST /monitors

Creates a new monitor.

Request Body

{
  "name": "My Website",
  "url": "https://example.com",
  "type": "http",
  "interval": 300,
  "timeout": 30
}

Get Monitor Status

GET /monitors/{id}/status

Returns the current status and recent history for a specific monitor.

Update Monitor

PUT /monitors/{id}

Updates an existing monitor's configuration.

Delete Monitor

DELETE /monitors/{id}

Permanently deletes a monitor.

Rate Limits

API requests are rate limited to prevent abuse and ensure fair usage:

  • Basic Plan: 100 requests per hour
  • Pro Plan: 1,000 requests per hour
  • Enterprise Plan: 10,000 requests per hour

Rate limit information is included in response headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

Error Handling

The API uses conventional HTTP response codes to indicate success or failure:

200OK - Request successful
400Bad Request - Invalid request parameters
401Unauthorized - Invalid API key
404Not Found - Resource not found
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Server error

SDKs and Libraries

We provide official SDKs for popular programming languages:

Node.js

npm install yuto-analytics

Python

pip install yuto-analytics

PHP

composer require yuto/analytics

Go

go get github.com/yuto/analytics