ɳSentry API Reference
هذا المحتوى غير متوفر بلغتك بعد.
ɳSentry API Reference
Section titled “ɳSentry API Reference”ɳSentry provides REST and GraphQL APIs for error ingestion, SLO tracking, and incident management.
Error Ingestion Endpoint
Section titled “Error Ingestion Endpoint”Send errors directly from your application.
POST https://sentry.yourdomain.com/api/errors/eventsHeaders
Section titled “Headers”Authorization: Bearer YOUR_NSENTRY_DSN_KEYContent-Type: application/jsonRequest Body
Section titled “Request Body”{ "environment": "production", "level": "error", "message": "Failed to fetch user", "exception": { "values": [ { "type": "FetchError", "value": "Connection timeout", "stacktrace": { "frames": [ { "filename": "src/api/user.ts", "function": "fetchUser", "lineno": 42, "colno": 15, "source": "const user = await fetch(...)" } ] } } ] }, "release": "1.0.0", "timestamp": "2026-05-13T10:30:45Z"}Response
Section titled “Response”{ "id": "error-uuid-here", "received": true}GraphQL API
Section titled “GraphQL API”Access via https://sentry.yourdomain.com/api/graphql
Query: Errors
Section titled “Query: Errors”query GetErrors($filter: ErrorFilter!) { errors(first: 50, filter: $filter) { edges { node { id message severity occurrenceCount firstSeen lastSeen stackTrace sourceMap { filename source } } } pageInfo { hasNextPage endCursor } }}Variables:
{ "filter": { "severity": "ERROR", "service": "api", "timeRange": "24h" }}Query: SLOs
Section titled “Query: SLOs”query GetSLOs { slos { edges { node { id name service targetPercentage currentBurnRate errorBudgetRemaining status # ON_TRACK, AT_RISK, BREACHED } } }}Query: Incidents
Section titled “Query: Incidents”query GetIncidents($status: IncidentStatus) { incidents(status: $status) { edges { node { id title severity status createdAt resolvedAt assignee { name email } alerts { count types } } } }}REST Endpoints
Section titled “REST Endpoints”Create Incident
Section titled “Create Incident”POST /api/incidentsAuthorization: Bearer token
{ "title": "API latency spike", "severity": "high", "description": "p99 latency exceeded 5s threshold", "service": "api", "runbookUrl": "https://wiki.yourdomain.com/incident-response"}Update SLO
Section titled “Update SLO”PATCH /api/slos/{slo-id}Authorization: Bearer token
{ "targetPercentage": 99.9, "errorBudgetAlertThreshold": 10}Get Status Page
Section titled “Get Status Page”GET /api/status-page/{slug}
Response:{ "components": [ { "name": "API", "status": "operational", "lastUpdate": "2026-05-13T10:00:00Z" } ], "incidents": [ ... ]}Authentication
Section titled “Authentication”Generate API tokens in the ɳSentry dashboard:
Settings → API Tokens → Create Token
Token format: nsentry_xxx_yyy (DSN key for error ingestion, secret key for management API)
Rate Limits
Section titled “Rate Limits”- Error ingestion: 10,000 events/min per DSN
- GraphQL/REST: 100 requests/min per token
- Status page: No limit (public)
Pre-built SDKs available:
- JavaScript/TypeScript:
@nsentry/react,@nsentry/nextjs - Python:
nsentry-sdk - Go:
github.com/nself-org/nsentry-go - iOS:
NSentry(CocoaPods) - Android:
com.nself:nsentry(Maven)
Install & initialize per-SDK docs.
Example: Send Error from Node.js
Section titled “Example: Send Error from Node.js”const nsentry = require('@nsentry/node');
nsentry.init({ dsn: 'https://key@sentry.yourdomain.com/...', environment: 'production', tracesSampleRate: 0.1});
try { // Your code} catch (error) { nsentry.captureException(error);}See: Getting Started · Plugins · Architecture