تخطَّ إلى المحتوى

ɳSentry API Reference

هذا المحتوى غير متوفر بلغتك بعد.

ɳSentry provides REST and GraphQL APIs for error ingestion, SLO tracking, and incident management.

Send errors directly from your application.

POST https://sentry.yourdomain.com/api/errors/events
Authorization: Bearer YOUR_NSENTRY_DSN_KEY
Content-Type: application/json
{
"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"
}
{
"id": "error-uuid-here",
"received": true
}

Access via https://sentry.yourdomain.com/api/graphql

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 GetSLOs {
slos {
edges {
node {
id
name
service
targetPercentage
currentBurnRate
errorBudgetRemaining
status # ON_TRACK, AT_RISK, BREACHED
}
}
}
}
query GetIncidents($status: IncidentStatus) {
incidents(status: $status) {
edges {
node {
id
title
severity
status
createdAt
resolvedAt
assignee {
name
email
}
alerts {
count
types
}
}
}
}
}
POST /api/incidents
Authorization: Bearer token
{
"title": "API latency spike",
"severity": "high",
"description": "p99 latency exceeded 5s threshold",
"service": "api",
"runbookUrl": "https://wiki.yourdomain.com/incident-response"
}
PATCH /api/slos/{slo-id}
Authorization: Bearer token
{
"targetPercentage": 99.9,
"errorBudgetAlertThreshold": 10
}
GET /api/status-page/{slug}
Response:
{
"components": [
{
"name": "API",
"status": "operational",
"lastUpdate": "2026-05-13T10:00:00Z"
}
],
"incidents": [ ... ]
}

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)

  • 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.

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