Check a home file
const url = 'https://api.blupinta.app/v1/homes/check';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"home":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.blupinta.app/v1/homes/check \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "home": "example" }'What Blupinta’s own checks say of a home file, of any version of the format: brought to the current one as an import would, read, and checked as saving a version is. Nothing is kept. A file that isn’t a home answers format problems, each with its path.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A home file to check: any version of the format
object
The file’s content, as JSON
Examplegenerated
{ "home": "example"}Responses
Section titled “ Responses ”Check a home file
What the server says of a home file
object
The version it was checked at: the current one, the file brought to it first as an import would
Nothing in it keeps it from being saved as a version
One problem the server finds in a home
object
format: the file isn’t a home of the format (message says what, with its path); otherwise a check that blocks saving it as a version: area-without-rooms, open-room, crossing, overlap, degenerate, shared-region…
For format: what is wrong, with its path in the file
The plan it concerns, by id, when it concerns one
The problem as the checks found it: its walls, rooms, points, by the home’s ids
object
Examplegenerated
{ "readAs": 1, "checkedAt": 1, "isValid": true, "problems": [ { "kind": "example", "message": "example", "plan": "example", "detail": { "additionalProperty": "example" } } ]}Headers
Section titled “Headers”The requests the caller may make in the window: an app counts per connection, every token together
The requests left in the window
Seconds until the window starts again
invalid_input: What was sent isn’t right: problems says what, each with where
The body of a refusal
object
What /v1 answers when it refuses
The server’s id for a server_error, to quote when asking for help
What is wrong, for invalid_input, conflict, invalid_home, blocking_problems
Example
{ "error": "unauthenticated"}Headers
Section titled “Headers”The requests the caller may make in the window: an app counts per connection, every token together
The requests left in the window
Seconds until the window starts again
unauthenticated: No valid access token for this API
The body of a refusal
object
What /v1 answers when it refuses
The server’s id for a server_error, to quote when asking for help
What is wrong, for invalid_input, conflict, invalid_home, blocking_problems
Example
{ "error": "unauthenticated"}Headers
Section titled “Headers”The requests the caller may make in the window: an app counts per connection, every token together
The requests left in the window
Seconds until the window starts again
forbidden: The token lacks the scope this operation needs
The body of a refusal
object
What /v1 answers when it refuses
The server’s id for a server_error, to quote when asking for help
What is wrong, for invalid_input, conflict, invalid_home, blocking_problems
Example
{ "error": "unauthenticated"}Headers
Section titled “Headers”The requests the caller may make in the window: an app counts per connection, every token together
The requests left in the window
Seconds until the window starts again
rate_limited: Too many requests: wait as long as Retry-After says
The body of a refusal
object
What /v1 answers when it refuses
The server’s id for a server_error, to quote when asking for help
What is wrong, for invalid_input, conflict, invalid_home, blocking_problems
Example
{ "error": "unauthenticated"}Headers
Section titled “Headers”The requests the caller may make in the window: an app counts per connection, every token together
The requests left in the window
Seconds until the window starts again
Seconds to wait before asking again
server_error: Something failed on Blupinta’s side: quote errorId when asking for help
The body of a refusal
object
What /v1 answers when it refuses
The server’s id for a server_error, to quote when asking for help
What is wrong, for invalid_input, conflict, invalid_home, blocking_problems
Example
{ "error": "unauthenticated"}Headers
Section titled “Headers”The requests the caller may make in the window: an app counts per connection, every token together
The requests left in the window
Seconds until the window starts again