Esempi Documenti
Endpoint
GET /api/v1/resource
Headers
| Nome | Tipo | Richiesto | Descrizione |
|---|---|---|---|
| Authorization | string | ✅ | Bearer token JWT |
| Content-Type | string | ✅ | application/json |
Request Body
{
"campo1": "valore",
"campo2": 123
}
Response
Success (200 OK)
{
"success": true,
"data": {
"id": "uuid",
"createdAt": "2024-01-01T00:00:00Z"
}
}
Errori
| Codice | Descrizione |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 500 | Internal Server Error |
Esempi
cURL
curl -X GET https://api.emblema.ai/v1/resource \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
JavaScript
const response = await fetch("/api/v1/resource", {
method: "GET",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});