Owner Check

Verify whether the supplied X-Owner-Token owns the resource

Changed on

Returns {isOwner, type}, plus format for an html-type resource. Constant-time BCrypt match. 404 when the resource does not exist (or has expired). 200 with isOwner:false when the X-Owner-Token header is absent.

get/api/{ns}/{id}/owner-check

Request

  • Base URL: https://brewpage.app
  • URL: https://brewpage.app/api/{ns}/{id}/owner-check
  • Auth: one of:
    • none
    • API key in header X-Owner-Token

Path parameters

nsstring required
idstring required

Headers

X-Owner-Tokenstring

Owner token to verify (constant-time match)

Response

OK

typestring

Resource type (html, kv, json, file, site)

format'html' | 'other' nullable

Only for an html-type resource: html for an HTML page, other for any other stored format (Markdown, code or text). Absent for every other type

ownerboolean

Changes

    • breaking

      removed the media type */* for the response with the status

    • info

      the endpoint scheme security OwnerToken was added to the API

    • info

      added the media type application/json for the response with the status

    • info

      added the optional property to the response with the status