Read a file
One file's content: UTF-8 text, or base64 for binary files. offset and limit read a window of lines; truncated and next_offset say when the file goes on.
GET/v1/sites/{site_id}/files/content
Requires sites:read. The response carries the file’s hash.
Authorizations
Authorizationbearerin headerrequiredPath parameters
site_idstringrequiredThe site's id, or its slug (the address before .atelier201.page).
Query parameters
pathstringrequiredlength: 1–600 charsrevisionstringlength: 40–40 charsA Git commit id (40 hex characters) of the site's repository.
offsetintegerrange: 1–9007199254740991The line to start from (1-based, as search_files reports it). Omitted: the whole file.
limitintegerrange: 1–5000How many lines to return from offset. The answer says truncated and next_offset when the file goes on.
Response
Read a file
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_credits
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required
errorobjectrequiredrequest_idstringrequiredPossible codes: resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, result_not_ready, idempotency_key_reused
errorobjectrequiredrequest_idstringrequiredPossible codes: result_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large_for_plan
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired