Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get web server logs (legacy path)

wp.cloud site-logs. The same contract as logs/site.

POST/v0/atomic-api/site-logs/{site}
Authorization
AuthAPI key · headerrequired

Spacefast API key in the wp.cloud Auth header. Accepted only by the wp.cloud-compatible /v0/atomic-api operations.

or
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

or
AuthorizationOAuth2 access token · headerrequired

OAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.

Scopes:spaces:read
Path parameters
sitestringrequired

Site ID, domain, or Spacefast Space ID.

min length 1
Request body
requiredapplication/json
startnumber | stringrequired

Start of the log window.

Show properties
Any of:
number
number
string
string
endnumber | stringrequired

End of the log window. Must not precede start.

Show properties
Any of:
number
number
string
string
page_sizeinteger

Maximum records per request. Default 500.

min 1 · max 10000
scroll_idstring

Cursor from the previous response. Send the same window and filters.

min length 1
sort_orderstring

Sort direction. Default "asc".

Allowed:ascdesc
filterobject

Filter values in PHP array notation, for example filter[status][]=404.

Show properties
cachedstring[]
min items 1 · max items 100
rendererstring[]
min items 1 · max items 100
request_typestring[]
min items 1 · max items 100
statusinteger[]
min items 1 · max items 100
user_ipstring[]
min items 1 · max items 100
Responses
200

Response for status 200

messagestringrequired
dataobjectrequired
Show properties
total_resultsnumber | nullrequired

Matching entries, or null when unknown.

logsobject[]required

Web server log entries.

scroll_idstring | nullrequired

Next-page cursor, or null at the end.

default

wp.cloud error envelope. message explains the failure. data is the Spacefast problem document, with its stable code.

messagestringrequired
dataProblemrequired
Show properties
$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

typestringrequired

Problem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.

titlestringrequired

Short human-readable summary of the problem type. The server derives it mechanically from code.

statusintegerrequired

HTTP status code of this response, repeated in the body.

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

RFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.

detailsobject

Machine-readable context for the error code.

fixstring

One sentence on what to do about this error code, the same text as the type page. Read it before retrying.

suggestionsstring[]

Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.

nextstring[]

Copy-pasteable commands or API requests an agent can run next.

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.spacefast.com/v0/atomic-api/site-logs/string' \
  -H 'Auth: YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "start": 0,
  "end": 0,
  "page_size": 1,
  "scroll_id": "string",
  "sort_order": "asc",
  "filter": {
    "cached": [
      "string"
    ],
    "renderer": [
      "string"
    ],
    "request_type": [
      "string"
    ],
    "status": [
      -9007199254740991
    ],
    "user_ip": [
      "string"
    ]
  }
}'
Response
{
  "message": "string",
  "data": {
    "total_results": 0,
    "logs": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "scroll_id": "string"
  }
}

Was this page helpful?