The Eulerian API uses a Bearer token passed in the HTTP Authorization header.
Authorization: Bearer <votre_token_api>
- Never hardcode the token into the source code. Use an environment variable or a secrets vault (Vault, AWS Secrets Manager, etc.).
- Restrict tokens to strictly necessary permissions (principle of least privilege).
- Do not log authorization headers in application log files.
All requests must be sent via HTTPS.
The domain is specific to your Eulerian account (e.g.
https://<votre_domaine_eulerian>/ea/v2/<endpoint>
dem.api.eulerian.com ).
Content-Type: application/json
Authorization: Bearer <token>
- Respect the speed limits imposed by Eulerian (refer to your contract documentation).
- Implement an exponential backoff mechanism in case of a
429 Too Many Requests response. - Avoid excessive parallelization of calls: prefer ordered processing queues.
- For job creation requests, use a business identifier (
jobrun_id on the client side) to avoid duplicates in case of retry. - Check for the existence of a similar job before creating a new one.
is the primary mechanism for extracting large volumes of analytical data from the Eulerian platform. Unlike synchronous queries (limited to small volumes), Batch Reporting operates :
You submit a report request → Eulerian creates a and returns a jobrun_id .
You periodically check the job status ( ).
Once the job is finished ( DONE ), you download the results file.
Data extraction over more than 7 days
Volume > 10,000 lines expected
Scheduled treatments / Nightly ETL
Real-time dashboards (< 1,000 rows)
[SUBMIT] → PENDING → RUNNING → DONE
Job in queue, not yet processed
Processing is underway on Eulerian's side
Report ready for download
Error during processing (see the error field)
The results file was not uploaded on time.
Files generated by Eulerian are available for a limited time (usually 24 to 72 hours). Download and archive the results as soon as the status is DONE .
Recommended polling strategy
GET /ea/v2/report/batch/status.json?jobrun-id={jobrun_id}
Never perform overly aggressive polling: this unnecessarily consumes your API call quota.
Define an overall timeout (e.g., 4 hours). Beyond this, consider the job as failed and alert the system.
- Store the
jobrun_id persistently (database, file) so that polling can resume after a restart of your application. - Do not start a new job if an identical job is already in progress (
PENDING or RUNNING ).
TANT QUE timeout non atteint :
statut = GET /batch/status.json?jobrun-id{jobrun_id}
SI statut == DONE → télécharger résultat → FIN
SI statut == FAILED → logger erreur → FIN
SI statut == EXPIRED → relancer job → FIN
ATTENDRE intervalle_adaptatif()
7. Retrieval and processing of results
SINON → alerter équipe ops
The response contains either the file directly for streaming, or a temporary download URL.
GET /ea/v2/report/batch/download.json?jobrun-id={jobrun_id}
- the download rather than loading the entire file into memory (files can reach several hundred MB).
- Archive the raw file before any processing (principle of idempotence of processing).
- Always specify
UTF-8 encoding when opening the file. - Manage header rows dynamically (columns can change).
- Verify the number of columns in each row before inserting into the database.
- Handle null values / empty strings explicitly (do not confuse them with
0 ).
For files larger than 100 MB:
- Process line by line in streaming (never load everything into RAM).
- Insert into the database in (bulk insert).
- Implement error recovery with marking of the last processed line.
Log the response, correct the settings
The job has expired or the ID is incorrect
Exponential backoff (min. 60s)
Try again after a delay; contact support if the problem persists.
Retry with backoff, monitor the Eulerian status
Tentative 2 : +5 secondes
Tentative 3 : +15 secondes
Tentative 4 : +60 secondes
Tentative 5 : +300 secondes
Au-delà : alerter et abandonner
400 , 401 , 403 (customer errors — correct the problem first).
- Logger systematically: timestamp, endpoint called, HTTP code received,
job_id , duration of the request. - Never log the API token or end-user personal data.
- Keep error logs for at least 30 days to facilitate debugging.
- API token stored in an environment variable (never hardcoded in the code)
- HTTPS forced on all calls
- Logs do not contain the token or personal data
- Retry with exponential backoff implemented
- Global timeout on the defined polling (recommended: 4 hours)
-
jobrun_id persisted for recovery after crash - Checking the status before restarting the same job
- Date ranges divided into windows ≤ 90 days
- Column selection limited to the bare minimum
- Streaming download (no full memory loading)
- Insertion into database in batches (bulk insert)
- Alerts about jobs that
FAILED or KILLED - Error alerts for
401 / 403 (expired token) - Job processing time tracking dashboard
- Archiving raw files before processing
- Tests with short date ranges before going into production
- Validation of the output CSV format (number of columns, encoding)
- Testing behavior in the event of a
429 (rate limiting) - Resumption test after interruption during polling