Get NodeJS build logs
Retrieve logs from a specific Node.js build process.
Retrieve logs from a specific Node.js build process.
To stream live output while a build is running, poll this endpoint repeatedly
while the build state is running, passing the previously returned lines count
as from_line to fetch only new output since the last call.
Log content may contain ANSI escape sequences (color codes).
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789domainstringRequiredExample:
Domain name
mydomain.tlduuidstring · uuidRequiredExample:
Build UUID
123e4567-e89b-12d3-a456-426614174000Query parameters
from_lineinteger · nullableOptionalDefault:
Line from which to start retrieving logs
0Example: 10Responses
200
Success response
application/json
logsstring · nullableRequiredExample:
Logs from the build process, may contain ANSI escape sequences (for colors, etc.)
added 10 packages, and audited 11 packages in 8s 3 packages are looking for funding run `npm fund` for detailslinesintegerRequiredExample:
Number of log lines returned
3401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
get/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs
GET /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"logs": "added 10 packages, and audited 11 packages in 8s\n\n3 packages are looking for funding\n run `npm fund` for details",
"lines": 3
}Last updated
Was this helpful?