/v1/contexts
Supported contexts
Probeer het live
10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.
Het werkt. Haal een API-key op en gebruik hem in je project.
Verkrijg een API-sleutelCodefragmenten
curl "https://api.oanor.com/escape-api/v1/contexts" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/escape-api/v1/contexts", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/escape-api/v1/contexts");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/escape-api/v1/contexts",
headers={"x-oanor-key": "oanor_test_..."}
)
Voorbeeldrespons
Een echte respons van dit endpoint, vastgelegd bij de laatste health check.
{
"data": {
"contexts": [
{
"name": "regex",
"note": "Backslash-escapes regex metacharacters so the text matches literally.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "O'Brien, a\\.b\\*"
}
},
{
"name": "shell",
"note": "POSIX single-quote wrapping — safe to drop into a sh/bash command.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "'O'\\''Brien, a.b*'"
}
},
{
"name": "json",
"note": "A JSON string literal, including the surrounding double quotes.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "\"O'Brien, a.b*\""
}
},
{
"name": "csv",
"note": "RFC 4180 — quotes the field only if it contains a comma, quote or newline.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "\"O'Brien, a.b*\""
}
},
{
"name": "sql",
"note": "A single-quoted SQL string literal. NOT a substitute for parameterised queries / prepared statements — prefer bound parameters to prevent SQL injection.",
"example": {
"input": "O'Brien, a.b*",
"escaped": "'O''Brien, a.b*'"
}
}
]
},
"meta": {
"timestamp": "2026-06-03T01:09:42.625Z",
"request_id": "14f62a8e-c932-424d-8309-ab87f6619ac1"
},
"status": "ok",
"message": "Supported contexts",
"success": true
}