API Reference: Документация для разработчиков
Мониторинг доступности с точностью до секунды. Полная документация для интеграции, управления мониторами и получения статусов в реальном времени.
Authentication
All API requests to https://api.pulsely.io/v1 require an API key to authenticate. You can generate and manage your keys in the Pulsely dashboard under Settings > API Keys.
Include your API key in the Authorization header of every request:
Authorization: Bearer <YOUR_API_KEY>
Ensure your keys are kept secure. If a key is exposed on a public repository, rotate it immediately via the dashboard.
Endpoints
/monitors
Retrieve a list of all active monitors associated with your account. Supports pagination and filtering by status.
/monitors
Create a new uptime monitor. Specify the target URL, check interval (e.g., 60s), and notification preferences in the JSON body.
/monitors/{id}/status
Fetch the current operational status and the last 24-hour uptime percentage for a specific monitor ID.
/incidents
Retrieve a chronological list of recent incidents, including downtime duration, error codes, and resolution timestamps.
Request Examples
Use these examples to quickly integrate Pulsely with your existing infrastructure.
cURL
Fetch the status of a specific monitor:
curl -X GET "https://api.pulsely.io/v1/monitors/m_8x92/status" \
-H "Authorization: Bearer pk_live_58a92b..."
Python
Create a new HTTP monitor using the requests library:
import requests
url = "https://api.pulsely.io/v1/monitors"
headers = {
"Authorization": "Bearer pk_live_58a92b...",
"Content-Type": "application/json"
}
payload = {
"name": "Production API",
"url": "https://api.example.com/health",
"interval_seconds": 60,
"method": "GET"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Response Codes
Pulsely uses standard HTTP response codes to indicate the success or failure of an API request.
- 200 OK — The request was successful.
- 201 Created — A new monitor was successfully created.
- 400 Bad Request — The request was malformed or missing required parameters.
- 401 Unauthorized — Invalid or missing API key.
- 429 Too Many Requests — Rate limit exceeded. Please retry after the
Retry-Afterheader duration. - 500 Internal Server Error — An unexpected error occurred on the Pulsely servers.